-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (57 loc) · 2.84 KB
/
Makefile
File metadata and controls
75 lines (57 loc) · 2.84 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#Compiler options
GCC = mpicc
#Libraries
INI_PARSER = parser/minIni.o
STD_LIBRARIES = -lm
FFTW_LIBRARIES = -lfftw3 -lfftw3f -lfftw3_omp -lfftw3_mpi -lfftw3f_mpi
HDF5_LIBRARIES = -lhdf5
GSL_LIBRARIES = -lgsl -lgslcblas
GSL_INCLUDES =
HDF5_INCLUDES += -I/usr/lib/x86_64-linux-gnu/hdf5/openmpi/include
HDF5_LIBRARIES += -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi -I/usr/include/hdf5/openmpi
#FIREBOLT_PATH = /home/qvgd89/firebolt2/firebolt
#FIREBOLT_INCLUDES += -I$(FIREBOLT_PATH)/include
#FIREBOLT_LIBRARIES += -L$(FIREBOLT_PATH) -lfirebolt -Wl,-rpath=$(FIREBOLT_PATH)
#Putting it together
INCLUDES = $(HDF5_INCLUDES) $(GSL_INCLUDES) $(FIREBOLT_INCLUDES)
LIBRARIES = $(INI_PARSER) $(STD_LIBRARIES) $(FFTW_LIBRARIES) $(HDF5_LIBRARIES) $(GSL_LIBRARIES) $(FIREBOLT_LIBRARIES)
CFLAGS = -Wall -Wshadow=global -fopenmp -march=native -O4
LDFLAGS =
OBJECTS = lib/*.o
all:
make minIni
mkdir -p lib
$(GCC) src/input.c -c -o lib/input.o $(INCLUDES) $(CFLAGS)
$(GCC) src/output.c -c -o lib/output.o $(INCLUDES) $(CFLAGS)
$(GCC) src/input_mpi.c -c -o lib/input_mpi.o $(INCLUDES) $(CFLAGS)
$(GCC) src/output_mpi.c -c -o lib/output_mpi.o $(INCLUDES) $(CFLAGS)
$(GCC) src/distributed_grid.c -c -o lib/distributed_grid.o $(INCLUDES) $(CFLAGS)
$(GCC) src/header.c -c -o lib/header.o $(INCLUDES) $(CFLAGS)
$(GCC) src/random.c -c -o lib/random.o $(INCLUDES) $(CFLAGS)
$(GCC) src/fft.c -c -o lib/fft.o $(INCLUDES) $(CFLAGS)
$(GCC) src/grf.c -c -o lib/grf.o $(INCLUDES) $(CFLAGS)
$(GCC) src/grf_ngeniclike.c -c -o lib/grf_ngeniclike.o $(INCLUDES) $(CFLAGS)
$(GCC) src/particle_types.c -c -o lib/particle_types.o $(INCLUDES) $(CFLAGS)
$(GCC) src/titles.c -c -o lib/titles.o $(INCLUDES) $(CFLAGS)
$(GCC) src/particle.c -c -o lib/particle.o $(INCLUDES) $(CFLAGS)
$(GCC) src/calc_powerspec.c -c -o lib/calc_powerspec.o $(INCLUDES) $(CFLAGS)
$(GCC) src/primordial.c -c -o lib/primordial.o $(INCLUDES) $(CFLAGS)
$(GCC) src/generate_grids.c -c -o lib/generate_grids.o $(INCLUDES) $(CFLAGS)
$(GCC) src/shrink_grids.c -c -o lib/shrink_grids.o $(INCLUDES) $(CFLAGS)
$(GCC) src/poisson.c -c -o lib/poisson.o $(INCLUDES) $(CFLAGS)
$(GCC) src/monge_ampere.c -c -o lib/monge_ampere.o $(INCLUDES) $(CFLAGS)
$(GCC) src/2lpt.c -c -o lib/2lpt.o $(INCLUDES) $(CFLAGS)
$(GCC) src/spt_convolve.c -c -o lib/spt_convolve.o $(INCLUDES) $(CFLAGS)
$(GCC) src/spt_grid.c -c -o lib/spt_grid.o $(INCLUDES) $(CFLAGS)
$(GCC) src/perturb_data.c -c -o lib/perturb_data.o $(INCLUDES) $(CFLAGS)
$(GCC) src/perturb_spline.c -c -o lib/perturb_spline.o $(INCLUDES) $(CFLAGS)
#$(GCC) src/firebolt_interface.c -c -o lib/firebolt_interface.o $(INCLUDES) $(CFLAGS)
$(GCC) src/grids_interp.c -c -o lib/grids_interp.o $(INCLUDES) $(CFLAGS)
$(GCC) src/mitos.c -o mitos $(INCLUDES) $(OBJECTS) $(LIBRARIES) $(CFLAGS) $(LDFLAGS)
make analyse_tools
analyse_tools:
cd analyse && make
minIni:
cd parser && make
check:
cd tests && make