-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.rules
173 lines (116 loc) · 6.32 KB
/
Makefile.rules
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# Disable default rules (which makes it easier to debug Makefile problems)
.SUFFIXES:
# Logic for automatic dependency generation below has been borrowed from:
# http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
$(OBJDIR)/%.o : $(SRCDIR)/%.c $(DEPDIR)/%.d | $(DEPDIR)/ $(OBJDIR)/
$(CC) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) -c -o $@ $<
$(OBJDIR)/%.o : $(SRCDIR)/%.cc $(DEPDIR)/%.d | $(DEPDIR)/ $(OBJDIR)/
$(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.d $(CXXFLAGS) -c -o $@ $<
$(OBJDIR)/client/%.o : $(SRCDIR)/client/%.cc $(DEPDIR)/client/%.d | $(DEPDIR)/client/ $(OBJDIR)/client/
$(OBJDIR)/client/%.o : $(SRCDIR)/client/%.cc $(DEPDIR)/client/%.d | $(DEPDIR)/client/ $(OBJDIR)/client/
$(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/client/$*.d $(CXXFLAGS) -c -o $@ $<
deps/: ; mkdir -p $@
deps/client/: ; mkdir -p $@
objs/: ; mkdir -p $@
objs/client/: ; mkdir -p $@
DEPFILES := $(C_SRCS:$(SRCDIR)/%.c=$(DEPDIR)/%.d) $(CXX_SRCS:$(SRCDIR)/%.cc=$(DEPDIR)/%.d)
$(DEPFILES):
include $(wildcard $(DEPFILES))
# Rules to build tests follow.
efcodec_test: $(OBJDIR)/efcodec_test.o $(OBJDIR)/efcodec.o $(OBJDIR)/random.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
perms_test: $(OBJDIR)/perms_test.o $(OBJDIR)/perms.o $(OBJDIR)/board.o $(OBJDIR)/random.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
search_test: $(OBJDIR)/search_test.o $(OBJDIR)/search.o $(OBJDIR)/board.o $(OBJDIR)/perms.o $(OBJDIR)/random.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
ternary_test: $(OBJDIR)/ternary_test.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
test: $(TESTS)
./efcodec_test
./perms_test
./search_test
./ternary_test
# Rules to build binaries follow.
backpropagate-losses: $(OBJDIR)/backpropagate-losses.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
backpropagate2: $(OBJDIR)/backpropagate2.o $(COMMON_OBJS) $(CLIENT_OBJS) $(SOLVER_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CLIENT_LDLIBS)
count-bits: $(OBJDIR)/count-bits.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
count-bytes: $(OBJDIR)/count-bytes.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
count-r1: $(OBJDIR)/count-r1.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
count-unreachable: $(OBJDIR)/count-unreachable.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
combine-bitmaps: $(OBJDIR)/combine-bitmaps.o
$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
combine-two: $(OBJDIR)/combine-two.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
decode-delta: $(OBJDIR)/decode-delta.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
encode-delta: $(OBJDIR)/encode-delta.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
expand-minimized: $(OBJDIR)/expand-minimized.o $(COMMON_OBJS) $(LOOKUP_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(LOOKUP_LDLIBS)
fix-r4-bin: $(OBJDIR)/fix-r4-bin.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
integrate-wins: $(OBJDIR)/integrate-wins.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
integrate-wins2: $(OBJDIR)/integrate-wins2.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
integrate-two: $(OBJDIR)/integrate-two.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
lookup-min: $(OBJDIR)/lookup-min.o $(COMMON_OBJS) $(LOOKUP_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(LOOKUP_LDLIBS)
lookup-rN: $(OBJDIR)/lookup-rN.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
minify-merged: $(OBJDIR)/minify-merged.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
merge-phases: $(OBJDIR)/merge-phases.o $(COMMON_OBJS) $(OBJDIR)/lost-positions.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
minimax: $(OBJDIR)/minimax.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
print-ef: $(OBJDIR)/print-ef.o $(OBJDIR)/bytes.o $(OBJDIR)/efcodec.o $(OBJDIR)/parse-int.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
print-perm: $(OBJDIR)/print-perm.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
print-r1: $(OBJDIR)/print-r1.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
potential-new-losses: $(OBJDIR)/potential-new-losses.o $(COMMON_OBJS) $(CLIENT_OBJS) $(SOLVER_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CLIENT_LDLIBS)
pushfight-standalone-server: $(OBJDIR)/pushfight-standalone-server.o $(COMMON_OBJS) $(LOOKUP_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(LOOKUP_LDLIBS)
random-walk: $(OBJDIR)/random-walk.o $(COMMON_OBJS) $(LOOKUP_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(LOOKUP_LDLIBS)
sample-bytes: $(OBJDIR)/sample-bytes.o $(OBJDIR)/random.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
solve2: $(OBJDIR)/solve2.o $(COMMON_OBJS) $(CLIENT_OBJS) $(SOLVER_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CLIENT_LDLIBS)
solve3: $(OBJDIR)/solve3.o $(COMMON_OBJS) $(CLIENT_OBJS) $(SOLVER_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CLIENT_LDLIBS)
solve-r0: $(OBJDIR)/solve-r0.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
solve-r1: $(OBJDIR)/solve-r1.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
solve-rN: $(OBJDIR)/solve-rN.o $(COMMON_OBJS) $(CLIENT_OBJS) $(SOLVER_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CLIENT_LDLIBS)
solve-lost: $(OBJDIR)/solve-lost.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
verify-input-chunks: $(OBJDIR)/verify-input-chunks.o $(COMMON_OBJS) $(OBJDIR)/input-verification.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
verify-min-index: $(OBJDIR)/verify-min-index.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
verify-minimized: $(OBJDIR)/verify-minimized.o $(COMMON_OBJS) $(LOOKUP_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(LOOKUP_LDLIBS)
verify-new: $(OBJDIR)/verify-new.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
verify-r0: $(OBJDIR)/verify-r0.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
verify-r1: $(OBJDIR)/verify-r1.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
verify-rN: $(OBJDIR)/verify-rN.o $(COMMON_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
test-client: $(OBJDIR)/client/test-client.o $(COMMON_OBJS) $(CLIENT_OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(CLIENT_LDLIBS)
# EOF