-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (34 loc) · 1.53 KB
/
Makefile
File metadata and controls
53 lines (34 loc) · 1.53 KB
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
CXX = g++
# Release
CXXFLAGS = -std=c++11 -Wall -Wno-unused-const-variable -Wno-strict-aliasing -Wno-maybe-uninitialized -Wno-unused-variable -Wno-unknown-warning-option -Ivendor/googletest -Ivendor/gflags -O3 -DNDEBUG
LDFLAGS = -O3 -lpthread
# Debug
# CXXFLAGS = -std=c++11 -Wall -Wno-unused-const-variable -Wno-tautological-constant-out-of-range-compare -Ivendor/googletest -Ivendor/gflags -O1 -g -fsanitize=address #-pg -DNDEBUG
# LDFLAGS = -O1 -fsanitize=address -fno-omit-frame-pointer -lpthread #-pg -DNDEBUG
trax: main.o trax.o search.o gflags.o gflags_completions.o gflags_reporting.o perft.o tt.o thread.o trax.o
$(CXX) $^ $(LDFLAGS) -o $@
test: trax_test
./trax_test
trax_test: trax_test.o trax.o search.o gtest-all.o gflags.o gflags_completions.o gflags_reporting.o perft.o tt.o thread.o trax.o
$(CXX) $^ $(LDFLAGS) -o $@
trax_test.o: trax_test.cc trax.h timer.h search.h tt.h thread.h
trax.o: trax.cc trax.h
main.o: main.cc trax.h search.h perft.h tt.h thread.o
search.o: search.cc search.h trax.h tt.h thread.h
perft.o: perft.cc perft.h trax.h
tt.o: tt.cc tt.h trax.h
thread.o: thread.cc thread.h trax.h
gtest-all.o: vendor/googletest/gtest/gtest-all.cc
$(CXX) -std=c++03 -c $^ $(CXXFLAGS) -o $@
gflags.o: vendor/gflags/gflags.cc
$(CXX) -std=c++03 -c $^ -o $@
gflags_completions.o: vendor/gflags/gflags_completions.cc
$(CXX) -std=c++03 -c $^ -o $@
gflags_reporting.o: vendor/gflags/gflags_reporting.cc
$(CXX) -std=c++03 -c $^ -o $@
clean:
rm -f *.o trax trax_test
lint:
cpplint *.cc *.h
cloc *.cc *.h
.PHONY: all test clean lint