-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
62 lines (31 loc) · 1.59 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
EXEC = 2LPTic
OBJS = main.o power.o allvars.o fft.o save.o read_param.o utils.o init_particles.o
## nrsrc/nrutil.o nrsrc/qromb.o nrsrc/polint.o nrsrc/trapzd.o
#INCL = allvars.h proto.h fft.h utils.h nrsrc/nrutil.h Makefile
INCL = allvars.h proto.h fft.h utils.h power.h Makefile
#OPT += -DPRODUCEGAS # Set this to automatically produce gas particles
# for a single DM species in the input file by interleaved by a half a grid spacing
#OPT += -DMULTICOMPONENTGLASSFILE # set this if the initial glass file contains multiple components
#OPT += -DDIFFERENT_TRANSFER_FUNC # set this if you want to implement a transfer function that depends on
# particle type
OPT += -DNO64BITID # switch this on if you want normal 32-bit IDs
#OPT += -DCORRECT_CIC # only switch this on if particles start from a glass (as opposed to grid)
#OPT += -DONLY_ZA # swith this on if you want ZA initial conditions (2LPT otherwise)
OPTIONS = $(OPT)
FFTW_INCL = -I/opt/local/include
FFTW_LIBS = -L/opt/local/lib
GSL_LIBS= -L/opt/local/lib/
GSL_INCL = -I/opt/local/include/
CC = mpicc
MPICHLIB =
OPTIMIZE = -O3 -Wall # optimization and warning flags (default)
FFTW_LIB = $(FFTW_LIBS) -ldrfftw_mpi -ldfftw_mpi -ldrfftw -ldfftw
LIBS = -lm $(MPICHLIB) $(FFTW_LIB) $(GSL_LIBS) -lgsl -lgslcblas
CFLAGS = $(OPTIONS) $(OPTIMIZE) $(FFTW_INCL) $(GSL_INCL)
all : $(EXEC)
$(EXEC): $(OBJS)
$(CC) $(OPTIMIZE) $(OBJS) $(LIBS) -o $(EXEC)
$(OBJS): $(INCL)
.PHONY : clean
clean:
rm -f $(OBJS) $(EXEC)