X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=dafea2ddba2c649d4d8248d5fd6a34ec6223cbf3;hp=28fbb0d67187e855a1914dc2008598cfd7a3c02d;hb=c43c5fe9e0c9a99947b940133df2cb2bbb57c3f9;hpb=20788783768ad5317eb1273bf0971f2e994635dd diff --git a/src/Makefile b/src/Makefile index 28fbb0d6..dafea2dd 100644 --- a/src/Makefile +++ b/src/Makefile @@ -39,6 +39,14 @@ ICCFLAGS += -DNDEBUG ICCFLAGS-OSX += -DNDEBUG +### ========================================================================== +### Remove below comments to compile for a big-endian machine +### ========================================================================== +#GCCFLAGS += -DBIGENDIAN +#ICCFLAGS += -DBIGENDIAN +#ICCFLAGS-OSX += -DBIGENDIAN + + ### ========================================================================== ### Run built-in benchmark for pgo-builds with: 32MB hash 1 thread 10 depth ### These settings are generally fast, but may be changed experimentally @@ -47,9 +55,9 @@ PGOBENCH = ./$(EXE) bench 32 1 10 default depth ### General compiler settings. Do not change -GCCFLAGS += -g -Wall -fno-exceptions -fno-rtti -fno-strict-aliasing -ICCFLAGS += -g -Wall -fno-exceptions -fno-rtti -fno-strict-aliasing -wd383,869,981,10187,10188,11505,11503 -ICCFLAGS-OSX += -g -Wall -fno-exceptions -fno-rtti -fno-strict-aliasing -wd383,869,981,10187,10188,11505,11503 +GCCFLAGS += -g -Wall -fno-exceptions -fno-rtti +ICCFLAGS += -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 +ICCFLAGS-OSX += -g -Wall -fno-exceptions -fno-rtti -wd383,869,981,10187,10188,11505,11503 ### General linker settings. Do not change @@ -74,6 +82,7 @@ help: @echo "make > Default: Compiler = g++" @echo "make icc > Compiler = icpc" @echo "make icc-profile > Compiler = icpc + automatic pgo-build" + @echo "make icc-profile-popcnt > Compiler = icpc + automatic pgo-build + popcnt-support" @echo "make osx-ppc32 > PPC-Mac OS X 32 bit. Compiler = g++" @echo "make osx-ppc64 > PPC-Mac OS X 64 bit. Compiler = g++" @echo "make osx-x86 > x86-Mac OS X 32 bit. Compiler = g++" @@ -133,6 +142,40 @@ icc-profile: $(MAKE) icc-profile-use @rm -rf profdir bench.txt +icc-profile-make-with-popcnt: + $(MAKE) \ + CXX='icpc' \ + CXXFLAGS="$(ICCFLAGS) -DUSE_POPCNT" \ + CXXFLAGS+='-prof-gen=srcpos -prof_dir ./profdir' \ + all + +icc-profile-use-with-popcnt: + $(MAKE) \ + CXX='icpc' \ + CXXFLAGS="$(ICCFLAGS) -DUSE_POPCNT" \ + CXXFLAGS+='-prof_use -prof_dir ./profdir' \ + all + +icc-profile-popcnt: + @rm -rf profdir + @mkdir profdir + @touch *.cpp *.h + $(MAKE) icc-profile-make + @echo "" + @echo "Running benchmark for pgo-build (popcnt disabled)..." + @$(PGOBENCH) > /dev/null + @touch *.cpp *.h + $(MAKE) icc-profile-make-with-popcnt + @echo "" + @echo "Running benchmark for pgo-build (popcnt enabled)..." + @$(PGOBENCH) > /dev/null + @echo "Benchmarks finished. Build final executable now ..." + @echo "" + @touch *.cpp *.h + $(MAKE) icc-profile-use-with-popcnt + @rm -rf profdir bench.txt + + osx-ppc32: $(MAKE) \ CXX='g++' \ @@ -258,6 +301,6 @@ $(EXE): $(OBJS) ### Dependencies. Do not change .depend: - $(CXX) -msse -MM $(OBJS:.o=.cpp) > $@ + $(CXX) -MM $(OBJS:.o=.cpp) > $@ include .depend