-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (34 loc) · 1.32 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
CXXFLAGS = -O2
.PHONY: all check version_autogen.h
all: test/board_test test/genmove_test test/random_move test/incheck_test engine
test/board_test: board.o test/board_test.o
g++ $(CXXFLAGS) -o test/board_test board.o test/board_test.o
test/hash_test: board.o test/hash_test.o
g++ $(CXXFLAGS) -o test/hash_test board.o test/hash_test.o
test/genmove_test: board.o test/genmove_test.o
g++ $(CXXFLAGS) -o test/genmove_test board.o test/genmove_test.o
test/random_move: board.o test/random_move.o
g++ $(CXXFLAGS) -o test/random_move board.o test/random_move.o
test/incheck_test: board.o test/incheck_test.o
g++ $(CXXFLAGS) -o test/incheck_test board.o test/incheck_test.o
version_autogen.h:
./version_autogen.sh
uci.o: version_autogen.h
engine: board.o uci.o search.o history.o table.o book.o
g++ $(CXXFLAGS) -o engine uci.o board.o search.o history.o table.o book.o
check: test/board_test test/hash_test test/genmove_test test/incheck_test
./test/board_test
./test/hash_test
./test/incheck_test
./test/genmove_test
clean:
rm -f *.o *.d test/*.o test/*.d
rm -f test/board_test test/genmove_test test/incheck_test test/hash_test
rm -f test/random_move
rm -f engine
rm -f *~ test/*~
rm -f version_autogen.h
-include *.d
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c -MM -MF $(patsubst %.o,%.d,$@) -o $@ $<
$(CXX) $(CXXFLAGS) -c -o $@ $<