-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
83 lines (68 loc) · 2.31 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
.PHONY: clean fresh run gendeps
LDFLAGS += -pthread
OBJECTS = pentagod.o \
alarm.o \
fileio.o \
gtpgeneral.o \
gtpagent.o \
string.o \
board.o \
move.o \
agentmcts.o \
agentmctsthread.o \
agentpns.o \
agentab.o \
# solverpns.o \
# solverpns2.o \
# solverpns_tt.o \
ifdef DEBUG
CPPFLAGS += -std=c++0x -g3 -Wall
else
CPPFLAGS += -std=c++0x -O3 -funroll-loops -Wall
OSTYPE := $(shell uname -s)
ifeq ($(OSTYPE),Darwin)
CPPFLAGS += -m64
LDFLAGS += -m64
else
CPPFLAGS += -march=native
endif
endif
all: pentagod
mm: mm.cpp
g++ -O3 -Wall -o mm mm.cpp
pentagod: $(OBJECTS)
$(CXX) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
clean:
rm -f *.o pentagod
fresh: clean all
profile:
valgrind --tool=callgrind ./pentagod
gendeps:
ls *.cpp -1 | xargs -L 1 cpp -M -MM
############ everything below is generated by: make gendeps
agentab.o: agentab.cpp agentab.h agent.h types.h board.h move.h string.h \
xorshift.h moveiterator.h hashset.h time.h alarm.h log.h
agentmcts.o: agentmcts.cpp agentmcts.h time.h types.h move.h string.h \
board.h xorshift.h depthstats.h thread.h compacttree.h log.h agent.h \
moveiterator.h hashset.h alarm.h
agentmctsthread.o: agentmctsthread.cpp agentmcts.h time.h types.h move.h \
string.h board.h xorshift.h depthstats.h thread.h compacttree.h log.h \
agent.h moveiterator.h hashset.h
agentpns.o: agentpns.cpp agentpns.h agent.h types.h board.h move.h \
string.h xorshift.h moveiterator.h hashset.h compacttree.h thread.h \
log.h time.h alarm.h
alarm.o: alarm.cpp alarm.h time.h
board.o: board.cpp board.h move.h string.h xorshift.h
fileio.o: fileio.cpp fileio.h
gtpagent.o: gtpagent.cpp pentagogtp.h gtp.h string.h game.h board.h \
move.h xorshift.h agent.h types.h moveiterator.h hashset.h agentmcts.h \
time.h depthstats.h thread.h compacttree.h log.h agentpns.h agentab.h \
fileio.h
gtpgeneral.o: gtpgeneral.cpp pentagogtp.h gtp.h string.h game.h board.h \
move.h xorshift.h agent.h types.h moveiterator.h hashset.h agentmcts.h \
time.h depthstats.h thread.h compacttree.h log.h agentpns.h agentab.h
move.o: move.cpp move.h string.h log.h
pentagod.o: pentagod.cpp pentagogtp.h gtp.h string.h game.h board.h \
move.h xorshift.h agent.h types.h moveiterator.h hashset.h agentmcts.h \
time.h depthstats.h thread.h compacttree.h log.h agentpns.h agentab.h
string.o: string.cpp string.h types.h