-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
42 lines (29 loc) · 1.18 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
# comment
# (note: the <tab> in the command line is necessary for make to work)
# target: dependency1 dependency2 ...
# <tab> command
# uncomment if needed
# CFLAGS = -std=c++11
# uncomment to compile with optimizations (big performance boost)
# OPTFLAGS = -Ofast -flto
all:
clang++ -std=c++11 -Wall main.cpp position.cpp movegen.cpp hashtable.cpp uci.cpp search.cpp evaluation.cpp perft.cpp -o cppchess
release:
clang++ -std=c++11 -O3 main.cpp position.cpp movegen.cpp hashtable.cpp uci.cpp search.cpp evaluation.cpp perft.cpp -o cppchess -Winline
test:
clang++ -std=c++11 -Wall test_suite.cpp position.cpp movegen.cpp hashtable.cpp uci.cpp search.cpp evaluation.cpp perft.cpp -o cppchess
# Best for g++ compiler
# release:
# g++ -std=c++11 -O3 -flto main.cpp position.cpp movegen.cpp hashtable.cpp uci.cpp search.cpp evaluation.cpp perft.cpp -o cppchess -Winline
# cppchess: chess.o position.o movegen.o
# g++ $(CFLAGS) chess.o position.o movegen.o -o cppchess
# chess.o: chess.cpp
# g++ $(CFLAGS) -c chess.cpp
# position.o: position.cpp position.h
# g++ $(CFLAGS) -c position.cpp
# movegen.o: movegen.cpp movegen.h
# g++ $(CFLAGS) -c movegen.cpp
run:
./cppchess
clean:
rm *.o