-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
65 lines (46 loc) · 1.87 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
# Hans A. Winther (2020) ([email protected])
SHELL := /bin/bash
# Set compiler (use =c++17 if you have this availiable)
CC = g++ -std=c++11
# Paths to GSL library
INC = -I/mn/stornext/u3/hansw/winther/local/include
LIBS = -L/mn/stornext/u3/hansw/winther/local/lib -lgsl -lgslcblas
#=======================================================
# Options
#=======================================================
OPTIONS =
# Add bounds checking
OPTIONS += -D_GLIBCXX_DEBUG
# Show warnings if atempting to evaluate a spline out of bounds
OPTIONS += -D_SPLINE_WARNINGS_ON
# Show info about the solution as we integrate
# OPTIONS = -D_FIDUCIAL_VERBOSE_ODE_SOLVER_TRUE
# Add OpenMP parallelization
# OPTIONS += -D_USEOPEMP
# CC += -fopenmp
#=======================================================
C = -O3 -g $(OPTIONS)
#=======================================================
VPATH=src/
TARGETS := cmb
all: $(TARGETS)
# OBJECT FILES
OBJS = Main.o Utils.o BackgroundCosmology.o RecombinationHistory.o Perturbations.o PowerSpectrum.o Spline.o ODESolver.o
# DEPENDENCIES
Main.o : BackgroundCosmology.h RecombinationHistory.h Perturbations.h PowerSpectrum.h
Spline.o : Spline.h
ODESolver.o : ODESolver.h
Utils.o : Utils.h Spline.h ODESolver.h
BackgroundCosmology.o : BackgroundCosmology.h Utils.h Spline.h ODESolver.h
RecombinationHistory.o : RecombinationHistory.h BackgroundCosmology.h
Perturbations.o : Perturbations.h BackgroundCosmology.h RecombinationHistory.h
PowerSpectrum.o : PowerSpectrum.h BackgroundCosmology.h RecombinationHistory.h Perturbations.h
Examples.o : Utils.h Spline.h ODESolver.h
examples: Examples.o Utils.o Spline.o ODESolver.o
${CC} -o $@ $^ $C $(INC) $(LIBS)
cmb: $(OBJS)
${CC} -o $@ $^ $C $(INC) $(LIBS)
%.o: %.cpp
${CC} -c -o $@ $< $C $(INC)
clean:
rm -rf $(TARGETS) *.o