-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (48 loc) · 1.19 KB
/
Makefile
File metadata and controls
59 lines (48 loc) · 1.19 KB
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
########## User-definable stuff ##########
#
###Compiler and compilation options
COMP = mpicc
OPTIONS = -Wall -O3
#
### Behavioural flags
#Use double precision integer (enable in general)
DEFINEFLAGS += -D_LONGIDS
DEFINEFLAGS += -D_DEBUG
#
###Path to libraries and headers
###If two or more of the dependencies reside in the same paths, only
###one instance is necessary.
#GSL
GSL_INC = -I/home/alonso/include
GSL_LIB = -L/home/alonso/lib
#FFTW
FFTW_INC =
FFTW_LIB =
#
########## End of user-definable ##########
#OPTIONS += -fopenmp
#ifeq ($(strip $(USE_SINGLE_PRECISION)),yes)
#DEFINEFLAGS += -D_SPREC
#LIB_FFTW = -lfftw3f_omp -lfftw3f
#else
#LIB_FFTW = -lfftw3_omp -lfftw3
#endif
LIB_FFTW = -lfftw3f_mpi -lfftw3f
OPTIONS += $(DEFINEFLAGS)
INC_ALL = -I./src $(GSL_INC) $(FFTW_INC)
LIB_ALL = $(GSL_LIB) $(FFTW_LIB) -lgsl -lgslcblas $(LIB_FFTW) -lm
COMMONO = src/common.o
GRIDO = src/grid_tools.o
IOO = src/io.o
MAIN = src/main.c
OFILES = $(COMMONO) $(GRIDO) $(IOO)
EXE = DensTools
default : $(EXE)
%.o : %.c
$(COMP) $(OPTIONS) $(INC_ALL) -c $< -o $@
$(EXE) : $(OFILES)
$(COMP) $(OPTIONS) $(INC_ALL) $(OFILES) $(MAIN) -o $(EXE) $(LIB_ALL)
clean :
rm -f src/*.o
cleaner :
rm -f *~ src/*.o src/*~ $(EXE)