]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
Update makefile to use PGO with Intel C++ v11.0
[stockfish] / src / Makefile
index 2e37cccc10f5a480c3fd382b4f5666e069ec6ab7..f36de8d8046038750b5fe570cdae1ff03b97fd54 100644 (file)
@@ -1,14 +1,15 @@
-# Glaurung, a UCI chess playing engine.
+# Stockfish, a UCI chess playing engine derived from Glaurung 2.1
 # Copyright (C) 2004-2007 Tord Romstad
+# Copyright (C) 2008 Marco Costalba
 
-# This file is part of Glaurung.
+# This file is part of Stockfish.
 #
-# Glaurung is free software: you can redistribute it and/or modify
+# Stockfish is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
-# Glaurung is distributed in the hope that it will be useful,
+# Stockfish is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 ### Files
 ###
 
-EXE = glaurung
+EXE = stockfish
 
-OBJS = bitboard.o color.o pawns.o material.o endgame.o evaluate.o main.o \
+OBJS = bitboard.o pawns.o material.o endgame.o evaluate.o main.o \
        misc.o move.o movegen.o history.o movepick.o search.o piece.o \
-       position.o square.o direction.o tt.o value.o uci.o ucioption.o \
+       position.o direction.o tt.o value.o uci.o ucioption.o \
        mersenne.o book.o bitbase.o san.o benchmark.o
 
 
@@ -35,17 +36,17 @@ OBJS = bitboard.o color.o pawns.o material.o endgame.o evaluate.o main.o \
 
 all: $(EXE) .depend
 
-clean: 
-       $(RM) *.o .depend glaurung
+clean:
+       $(RM) *.o .depend stockfish
 
 
 ###
 ### Compiler:
 ###
 
-CXX = g++
+CXX = g++
 # CXX = g++-4.2
-CXX = icpc
+CXX = icpc
 
 
 ###
@@ -78,7 +79,11 @@ CXXFLAGS += -Wall -g
 # General optimization flags.  Note that -O2 might be faster than -O3 on some
 # systems; this requires testing.
 
-CXXFLAGS += -O3 -fno-exceptions -fomit-frame-pointer -fno-rtti -fstrict-aliasing
+CXXFLAGS += -O3 -fno-exceptions -fomit-frame-pointer -fno-rtti -fno-strict-aliasing
+
+# Disable most annoying warnings for the Intel C++ compiler
+
+CXXFLAGS += -wd383,869,981
 
 
 # Compiler optimization flags for the Intel C++ compiler in Mac OS X:
@@ -86,18 +91,18 @@ CXXFLAGS += -O3 -fno-exceptions -fomit-frame-pointer -fno-rtti -fstrict-aliasing
 # CXXFLAGS += -mdynamic-no-pic -no-prec-div -ipo -static -xP
 
 
-# Profiler guided optimization with the Intel C++ compiler To use it, first
+# Profiler guided optimization with the Intel C++ compiler v11. To use it, first
 # create the directory ./profdata if it does not already exist, and delete its
-# contents if it does exist.  Then compile with -prof_gen, and run the 
-# resulting binary for a while (for instance, do ./glaurung bench 128 1, and
-# wait 15 minutes for the benchmark to complete).  Then do a 'make clean', and 
+# contents if it does exist.  Then compile with -prof_gen, and run the
+# resulting binary for a while (for instance, do ./stockfish bench 128 1, and
+# wait 15 minutes for the benchmark to complete).  Then do a 'make clean', and
 # recompile with -prof_use.
 
-# CXXFLAGS += -prof_gen -prof_dir ./profdata
-# CXXFLAGS += -prof_use -prof_dir ./profdata
+# CXXFLAGS += -prof-gen -prof-dir./profdata
+# CXXFLAGS += -prof-use -ipo -prof_dir./profdata
 
 
-# Profiler guided optimization with GCC.  I've never been able to make this 
+# Profiler guided optimization with GCC.  I've never been able to make this
 # work.
 
 # CXXFLAGS += -fprofile-generate
@@ -125,7 +130,7 @@ LDFLAGS += -lm -lpthread
 # LDFLAGS += -arch x86_64
 
 
-# Backwards compatibility with Mac OS X 10.4 when compiling under 10.5 with 
+# Backwards compatibility with Mac OS X 10.4 when compiling under 10.5 with
 # GCC 4.0.  I haven't found a way to make it work with GCC 4.2.
 
 # CXXFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk