-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
88 lines (71 loc) · 2.33 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
##
## Make sure to put the correct paths.
##
PREFIX = ${PATHTOLIME}
ifneq (,$(wildcard ${PREFIX}/lib/.))
LIBS += -L${PREFIX}/lib
endif
ifneq (,$(wildcard ${HOME}/lib/.))
LIBS += -L${HOME}/lib
endif
ifneq (,$(wildcard /opt/local/lib/.))
LIBS += -L/opt/local/lib
endif
#ifneq (,$(wildcard /sw/lib/.))
# LIBS += -L/sw/lib
#endif
ifneq (,$(wildcard /usr/lib/.))
LIBS += -L/usr/lib
endif
CPPFLAGS = -I${PREFIX}/include \
-I${PREFIX}/src \
-I${HOME}/include \
-I/opt/local/include \
-I/usr/include
# For qhull version 2011.1 or newer:
QHULL = qhullstatic
# For older qhull versions:
#QHULL = qhull
#CPPFLAGS += -DQHULL_INC_QHULL
##
## Do not change anything below unless you know what you are doing!
##
TARGET = lime.x
#CC = gcc-6 -fopenmp
CC = gcc #-fopenmp
#CC = mpicc
SRCS = src/aux.c src/curses.c src/grid.c src/LTEsolution.c \
src/main.c src/molinit.c src/photon.c src/popsin.c \
src/popsout.c src/predefgrid.c src/ratranInput.c \
src/raytrace.c src/smooth.c src/sourcefunc.c \
src/stateq.c src/statistics.c src/magfieldfit.c \
src/stokesangles.c src/writefits.c \
src/velospline.c src/old_raytrace.c src/getclosest.c \
src/tcpsocket.c src/defaults.c src/write_defgrid.c \
src/inputmodel.c
MODELS = model.c
OBJS = src/aux.o src/curses.o src/grid.o src/LTEsolution.o \
src/main.o src/molinit.o src/photon.o src/popsin.o \
src/popsout.o src/predefgrid.o src/raytrace.o \
src/ratranInput.o src/smooth.o src/sourcefunc.o \
src/stateq.o src/statistics.o src/magfieldfit.o \
src/stokesangles.o src/writefits.o \
src/velospline.o src/old_raytrace.o src/getclosest.o \
src/tcpsocket.o src/defaults.o src/write_defgrid.o \
src/inputmodel.o
MODELO = src/model.o
#CCFLAGS = -O3 -g3 -fno-strict-aliasing -falign-loops=16
CCFLAGS = -Og -g3 -fno-strict-aliasing -w -fopenmp #-falign-loops=16
LDFLAGS = -lgsl -lgslcblas -l${QHULL} -lcfitsio -lncurses -lm -lgomp
.SILENT:
.PHONY: all clean distclean
all:: ${TARGET}
${TARGET}: ${OBJS} ${MODELO}
${CC} -o $@ $^ ${LIBS} ${LDFLAGS}
${MODELO}:
${CC} ${CCFLAGS} ${CPPFLAGS} -o ${MODELO} -c ${MODELS}
${OBJS}: %.o: %.c
${CC} ${CCFLAGS} ${CPPFLAGS} -o $@ -c $<
clean::
rm -f *~ src/*.o ${TARGET}
distclean:: clean