-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·91 lines (70 loc) · 3.22 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
CXX = g++
#CXXFLAGS = -O0 -g -std=c++11
CXXFLAGS = -O2 -Wall -march=native -std=c++11
INCLUDE =
TLIB = -lm
#-----Suffix Rules---------------------------
# set up C++ suffixes and relationship between .cc and .o files
.SUFFIXES: .cpp
.o :
$(CXX) $(CXXFLAGS) $(INCLUDE) -c $<
.cpp :
$(CXX) $(CXXFLAGS) $(INCLUDE) $< -o $@ -lm $(TLIB)
#-----File Dependencies----------------------
SRC = $(SRC1) $(SRC2) $(SRC3)
SRC1 = chromosome.cpp dsmga2.cpp fastcounting.cpp global.cpp main.cpp mt19937ar.cpp myrand.cpp spin.cpp nk-wa.cpp sat.cpp
SRC2 = chromosome.cpp dsmga2.cpp fastcounting.cpp global.cpp sweep.cpp mt19937ar.cpp myrand.cpp spin.cpp nk-wa.cpp sat.cpp
SRC3 = genZobrist.cpp
OBJ = $(addsuffix .o, $(basename $(SRC)))
OBJ1 = $(addsuffix .o, $(basename $(SRC1)))
OBJ2 = $(addsuffix .o, $(basename $(SRC2)))
OBJ3 = $(addsuffix .o, $(basename $(SRC3)))
all: DSMGA2 sweep genZobrist
debug: CXXFLAGS += -DDEBUG -g
debug: DSMGA2
DSMGA2: $(OBJ1)
$(CXX) $(CXXFLAGS) $(INCLUDE) $(TLIB) -o $@ $(OBJ1)
sweep: $(OBJ2) DSMGA2
$(CXX) $(CXXFLAGS) $(INCLUDE) $(TLIB) -o $@ $(OBJ2)
genZobrist: $(OBJ3)
$(CXX) $(CXXFLAGS) $(INCLUDE) $(TLIB) -o $@ $(OBJ3)
#-----Other stuff----------------------------
depend:
makedepend -Y. $(SRC)
clean:
rm -f $(OBJ)
# DO NOT DELETE
chromosome.o: spin.h chromosome.h global.h myrand.h mt19937ar.h
chromosome.o: bitwisedistance.h nk-wa.h doublelinkedlistarray.h zkey.h sat.h
dsmga2.o: chromosome.h global.h myrand.h mt19937ar.h bitwisedistance.h
dsmga2.o: spin.h nk-wa.h doublelinkedlistarray.h zkey.h sat.h dsmga2.h
dsmga2.o: statistics.h trimatrix.h fastcounting.h
fastcounting.o: global.h myrand.h mt19937ar.h bitwisedistance.h spin.h
fastcounting.o: nk-wa.h doublelinkedlistarray.h zkey.h sat.h fastcounting.h
global.o: myrand.h mt19937ar.h statistics.h doublelinkedlistarray.h zkey.h
global.o: chromosome.h global.h bitwisedistance.h spin.h nk-wa.h sat.h
main.o: statistics.h dsmga2.h chromosome.h global.h myrand.h mt19937ar.h
main.o: bitwisedistance.h spin.h nk-wa.h doublelinkedlistarray.h zkey.h
main.o: sat.h trimatrix.h fastcounting.h
myrand.o: myrand.h mt19937ar.h
spin.o: global.h myrand.h mt19937ar.h bitwisedistance.h spin.h
spin.o: nk-wa.h doublelinkedlistarray.h zkey.h sat.h
nk-wa.o: nk-wa.h
sat.o: sat.h
chromosome.o: spin.h chromosome.h global.h myrand.h mt19937ar.h
chromosome.o: bitwisedistance.h nk-wa.h doublelinkedlistarray.h zkey.h sat.h
dsmga2.o: chromosome.h global.h myrand.h mt19937ar.h bitwisedistance.h
dsmga2.o: spin.h nk-wa.h doublelinkedlistarray.h zkey.h sat.h dsmga2.h
dsmga2.o: statistics.h trimatrix.h fastcounting.h
fastcounting.o: global.h myrand.h mt19937ar.h bitwisedistance.h spin.h
fastcounting.o: nk-wa.h doublelinkedlistarray.h zkey.h sat.h fastcounting.h
global.o: myrand.h mt19937ar.h statistics.h doublelinkedlistarray.h zkey.h
global.o: chromosome.h global.h bitwisedistance.h spin.h nk-wa.h sat.h
sweep.o: statistics.h dsmga2.h chromosome.h global.h myrand.h mt19937ar.h
sweep.o: bitwisedistance.h spin.h nk-wa.h doublelinkedlistarray.h
sweep.o: zkey.h sat.h trimatrix.h fastcounting.h
myrand.o: myrand.h mt19937ar.h
spin.o: global.h myrand.h mt19937ar.h bitwisedistance.h spin.h
spin.o: nk-wa.h doublelinkedlistarray.h zkey.h sat.h
nk-wa.o: nk-wa.h
sat.o: sat.h