-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (34 loc) · 1.13 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
OFILES = src/simulation_context.o \
src/simulation_impulse.o \
src/dipole.o \
src/netlist.o \
src/nodelist.o \
src/simulation.o \
src/solver.o \
src/yana_map.o \
src/cirpp.o \
src/uforth.o \
src/stehfest.o
COMMON_CFLAGS = `gsl-config --cflags` -fPIC -Wall -Werror -Isrc
RELEASE_CFLAGS = $(COMMON_CFLAGS) -O9 -mfpmath=sse -fopenmp
DEBUG_CFLAGS = $(COMMON_CFLAGS) -O0 -ggdb3 -Wno-error=unknown-pragmas
.PHONY: all debug install
install all: CFLAGS = $(RELEASE_CFLAGS)
debug: CFLAGS = $(DEBUG_CFLAGS)
all: binaries
debug: binaries
# -fopenmp
binaries: libyanapack.so yanapack
libyanapack.so: $(OFILES)
gcc -shared $(OFILES) -o libyanapack.so `gsl-config --libs` -lgomp
yanapack_test: $(OFILES) src/test.o
gcc $(OFILES) src/test.o -o yanapack_test `gsl-config --libs` -lgomp
yanapack: $(OFILES) src/main.o
gcc $(OFILES) src/main.o -o yanapack `gsl-config --libs` -lgomp -ledit
gbf: gbf.c
gcc -ggdb3 gbf.c -o gbf `pkg-config --libs --cflags libpulse-simple` -lm
clean:
rm -f libyanapack.so yanapack_test yanapack $(OFILES) src/test.o src/main.o
install: yanapack
install -d $(DESTDIR)/usr/bin
install yanapack $(DESTDIR)/usr/bin