forked from ALaDyn/piccante
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
72 lines (48 loc) · 1.58 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
COMPILER = mpic++
EXE = piccante
OBJ = main-1.o grid.o structures.o current.o em_field.o particle_species.o output_manager.o utilities.o jsoncpp.o jsonparser.o
OPT = -O3
LFLAGS = -Wall
LIB = -lgsl -lgslcblas
all : $(EXE)
boost : OPT = -O3 -DUSE_BOOST
boost : LIB = -lgsl -lgslcblas -lboost_filesystem -lboost_system
boost : $(EXE)
hdf5 : OPT = -O3 -DUSE_BOOST -I/usr/lib/hdf5-1.8.12/hdf5/include -DUSE_HDF5
hdf5 : LIB = -lgsl -lgslcblas -lboost_filesyste -lboost_system -lhdf5 -L/usr/lib/hdf5-1.8.12/hdf5/lib
hdf5 : $(EXE)
warn : OPT = -O3 -Wall -Winline -Wextra
warn : $(EXE)
debug : OPT = -O0 -g
debug : $(EXE)
perf : OPT = -O3 -g -pg
perf : $(EXE)
scal : COMPILER = scalasca -instrument mpic++
scal : OPT = -O3 -g
scal : $(EXE)
vec : OPT = -O3 -ftree-vectorize -msse2 -ftree-vectorizer-verbose=5
vec : $(EXE)
$(EXE) : $(OBJ)
$(COMPILER) -o $(EXE) $(OPT) $(OBJ) $(LIB)
main-1.o: main-1.cpp
$(COMPILER) $(OPT) -c main-1.cpp
grid.o : grid.cpp
$(COMPILER) $(OPT) -c grid.cpp
structures.o : structures.cpp
$(COMPILER) $(OPT) -c structures.cpp
current.o : current.cpp
$(COMPILER) $(OPT) -c current.cpp
em_field.o: em_field.cpp
$(COMPILER) $(OPT) -c em_field.cpp
particle_species.o: particle_species.cpp
$(COMPILER) $(OPT) -c particle_species.cpp
output_manager.o: output_manager.cpp
$(COMPILER) $(OPT) -c output_manager.cpp
utilities.o: utilities.cpp
$(COMPILER) $(OPT) -c utilities.cpp
jsoncpp.o: jsoncpp.cpp
$(COMPILER) $(OPT) -c jsoncpp.cpp
jsonparser.o: jsonparser.cpp
$(COMPILER) $(OPT) -c jsonparser.cpp
clean :
rm -f $(OBJ)