Enable material hash table in Eval
[purplehaze.git] / Makefile
blob67027a673ab77160504a55f9751e104213bc99f1
1 print_warnings = yes
2 revision_number = yes
3 optimize = yes
4 profiler = no
5 gdb = no
6 null_move_pruning = yes
7 debug = no
9 ifndef compiler
10 compiler = gcc
11 endif
12 ifeq ($(compiler),gcc)
13 CXX = g++
14 endif
15 ifeq ($(compiler),intel)
16 CXX = icpc
17 endif
18 ifeq ($(compiler),clang)
19 CXX = clang++
20 endif
22 CXXFLAGS = -std=c++0x -pipe
24 ifeq ($(print_warnings),yes)
25 ifeq ($(compiler),intel)
26 CXXFLAGS += -Wall -Wremarks -wd981 -wd2259
27 else
28 CXXFLAGS += -Wall -pedantic-errors -Wcast-qual -Wshadow -Wextra
29 endif
30 endif
32 ifeq ($(revision_number),yes)
33 CXXFLAGS += -DVERSION=\"$(shell git describe HEAD)\"
34 endif
36 ifeq ($(gdb),yes)
37 CXXFLAGS += -g
38 endif
40 ifeq ($(optimize),yes)
41 ifeq ($(compiler),intel)
42 CXXFLAGS += -fast
43 else
44 CXXFLAGS += -O3 -march=native -mtune=native
45 endif
46 endif
48 ifeq ($(profiler),yes)
49 CXXFLAGS += -pg -lprofiler
50 endif
52 ifeq ($(null_move_pruning),yes)
53 CXXFLAGS += -DNMP
54 endif
56 ifeq ($(debug),no)
57 CXXFLAGS += -DNDEBUG
58 endif
60 SOURCES = $(shell ls src/*.cpp)
61 OBJECTS = $(SOURCES:.cpp=.o)
62 EXECUTABLE = purplehaze
64 all: $(SOURCES) $(EXECUTABLE)
66 $(EXECUTABLE): $(OBJECTS)
67 $(CXX) -o $@ $(OBJECTS)
69 clean:
70 rm -f $(OBJECTS) $(EXECUTABLE)
72 .cpp.o:
73 $(CXX) $(CXXFLAGS) -c -o $@ $<