]> git.sesse.net Git - stockfish/blob - src/Makefile
Remove Position::xxx_list() functions
[stockfish] / src / Makefile
1 # Glaurung, a UCI chess playing engine.
2 # Copyright (C) 2004-2007 Tord Romstad
3
4 # This file is part of Glaurung.
5 #
6 # Glaurung is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # Glaurung is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19
20 ###
21 ### Files
22 ###
23
24 EXE = glaurung
25
26 OBJS = bitboard.o color.o pawns.o material.o endgame.o evaluate.o main.o \
27         misc.o move.o movegen.o history.o movepick.o search.o piece.o \
28         position.o square.o direction.o tt.o value.o uci.o ucioption.o \
29         mersenne.o book.o bitbase.o san.o benchmark.o
30
31
32 ###
33 ### Rules
34 ###
35
36 all: $(EXE) .depend
37
38 clean:
39         $(RM) *.o .depend glaurung
40
41
42 ###
43 ### Compiler:
44 ###
45
46 # CXX = g++
47 # CXX = g++-4.2
48 CXX = icpc
49
50
51 ###
52 ### Dependencies
53 ###
54
55 $(EXE): $(OBJS)
56         $(CXX) $(LDFLAGS) -o $@ $(OBJS)
57
58 .depend:
59         $(CXX) -MM $(OBJS:.o=.cpp) > $@
60
61 include .depend
62
63
64 ###
65 ### Compiler and linker switches
66 ###
67
68 # Enable/disable debugging:
69
70 CXXFLAGS += -DNDEBUG
71
72
73 # Compile with full warnings, and symbol names
74
75 CXXFLAGS += -Wall -g
76
77
78 # General optimization flags.  Note that -O2 might be faster than -O3 on some
79 # systems; this requires testing.
80
81 CXXFLAGS += -O3 -fno-exceptions -fomit-frame-pointer -fno-rtti -fno-strict-aliasing
82
83 # Disable most annoying warnings for the Intel C++ compiler
84
85 CXXFLAGS += -wd383,869,981
86
87
88 # Compiler optimization flags for the Intel C++ compiler in Mac OS X:
89
90 # CXXFLAGS += -mdynamic-no-pic -no-prec-div -ipo -static -xP
91
92
93 # Profiler guided optimization with the Intel C++ compiler.  To use it, first
94 # create the directory ./profdata if it does not already exist, and delete its
95 # contents if it does exist.  Then compile with -prof_gen, and run the
96 # resulting binary for a while (for instance, do ./glaurung bench 128 1, and
97 # wait 15 minutes for the benchmark to complete).  Then do a 'make clean', and
98 # recompile with -prof_use.
99
100 # CXXFLAGS += -prof_gen -prof_dir profdata
101 # CXXFLAGS += -prof_use -prof_dir ./profdata
102
103
104 # Profiler guided optimization with GCC.  I've never been able to make this
105 # work.
106
107 # CXXFLAGS += -fprofile-generate
108 # LDFLAGS += -fprofile-generate
109 # CXXFLAGS += -fprofile-use
110 # CXXFLAGS += -fprofile-use
111
112
113 # General linker flags
114
115 LDFLAGS += -lm -lpthread
116
117
118 # Compiler switches for generating binaries for various CPUs in Mac OS X.
119 # Note that 'arch ppc' and 'arch ppc64' only works with g++, and not with
120 # the intel compiler.
121
122 # CXXFLAGS += -arch ppc
123 # CXXFLAGS += -arch ppc64
124 # CXXFLAGS += -arch i386
125 # CXXFLAGS += -arch x86_64
126 # LDFLAGS += -arch ppc
127 # LDFLAGS += -arch ppc64
128 # LDFLAGS += -arch i386
129 # LDFLAGS += -arch x86_64
130
131
132 # Backwards compatibility with Mac OS X 10.4 when compiling under 10.5 with
133 # GCC 4.0.  I haven't found a way to make it work with GCC 4.2.
134
135 # CXXFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk
136 # CXXFLAGS += -mmacosx-version-min=10.4
137 # LDFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk
138 # LDFLAGS += -Wl,-syslibroot /Developer/SDKs/MacOSX10.4u.sdk
139 # LDFLAGS += -mmacosx-version-min=10.4
140
141
142 # Backwards compatibility with Mac OS X 10.4 when compiling with ICC.  Doesn't
143 # work yet. :-(
144
145 # CXXFLAGS += -DMAC_OS_X_VERSION_MIN_REQUIRED=1040
146 # CXXFLAGS += -DMAC_OS_X_VERSION_MAX_ALLOWED=1040
147 # CXXFLAGS += -D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=1040
148 # CXXFLAGS += -F/Developer/SDKs/MacOSX10.4u.sdk/
149 # LDFLAGS += -Wl,-syslibroot -Wl,/Developer/SDKs/MacOSX10.4u.sdk