This repository has been archived by the owner on May 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
96 lines (69 loc) · 2.7 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
ifeq ($(build), parallel)
OMPFILE := serial.cpp
MYCPP := g++ -g -std=c++11 -fPIC -fopenmp
else
OMPFILE := serial.cpp
MYCPP := g++ -g -std=c++11 -fPIC
endif
AGENTFILES := chain.cpp pick.cpp options.cpp
AGENTOPTS := -shared -ldl $(AGENTFILES)
all: folders rainfall navigate mods
@echo Make complete
mods: mod/likelihood.so mod/histogram.so mod/flat.so mod/blob.so mod/grid.so mod/adaptive.so mod/fixstep.so mod/rrburnin.so mod/bimodal2dgauss.so
@echo Modules complete
rainfall: bin/master.o bin/chain.o bin/options.o bin/pick.o bin/ompswitch.o
$(MYCPP) -ldl bin/master.o bin/chain.o bin/options.o bin/pick.o -orainfall bin/ompswitch.o
@echo MCMC core code complete
navigate: bin/navigate.o bin/chain.o bin/options.o bin/pick.o
$(MYCPP) -ldl bin/navigate.o bin/chain.o bin/options.o bin/pick.o -onavigate
#--------------------------------------------------------------
#Core code
#--------------------------------------------------------------
bin/master.o: master.cpp
$(MYCPP) -c master.cpp -obin/master.o
bin/chain.o: chain.cpp
$(MYCPP) -c chain.cpp -obin/chain.o
bin/pick.o: pick.cpp
$(MYCPP) -c pick.cpp -obin/pick.o
bin/options.o: options.cpp
$(MYCPP) -c options.cpp -obin/options.o
bin/ompswitch.o: $(OMPFILE)
$(MYCPP) -c $(OMPFILE) -obin/ompswitch.o
bin/navigate.o: navigate.cpp
$(MYCPP) -c navigate.cpp -obin/navigate.o
#--------------------------------------------------------------
#Utilities
#--------------------------------------------------------------
#--------------------------------------------------------------
#Housekeeping
#--------------------------------------------------------------
folders:
mkdir -p bin
mkdir -p mod
clean:
rm -f rainfall
rm -f mod/*.so
rm -f bin/*.o
cleanmods:
rm -f mod/*.so
#--------------------------------------------------------------
#Agents
#--------------------------------------------------------------
mod/likelihood.so: likelihood.cpp $(AGENTFILES)
$(MYCPP) $(AGENTOPTS) likelihood.cpp -omod/likelihood.so
mod/flat.so: flat.cpp $(AGENTFILES)
$(MYCPP) $(AGENTOPTS) flat.cpp -omod/flat.so
mod/blob.so: blob.cpp $(AGENTFILES)
$(MYCPP) $(AGENTOPTS) blob.cpp -omod/blob.so
mod/histogram.so: histogram.cpp $(AGENTFILES)
$(MYCPP) $(AGENTOPTS) histogram.cpp -omod/histogram.so
mod/grid.so: grid.cpp $(AGENTFILES)
$(MYCPP) $(AGENTOPTS) grid.cpp -omod/grid.so
mod/adaptive.so: adaptive.cpp $(AGENTFILES)
$(MYCPP) $(AGENTOPTS) adaptive.cpp -omod/adaptive.so
mod/fixstep.so: fixstep.cpp $(AGENTFILES)
$(MYCPP) $(AGENTOPTS) fixstep.cpp -omod/fixstep.so
mod/rrburnin.so: rrburnin.cpp $(AGENTFILES)
$(MYCPP) $(AGENTOPTS) rrburnin.cpp -omod/rrburnin.so
mod/bimodal2dgauss.so: bimodal2dgauss.cpp $(AGENTFILES)
$(MYCPP) $(AGENTOPTS) bimodal2dgauss.cpp -omod/bimodal2dgauss.so