X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=3963e5589d6fdfc85a87dd230ff0d3ef048830fc;hp=5fa29c0a01a35226c421de301a134210be264c1d;hb=8d65fcc0f3b26beb19cc838ff2ad0c78ac289120;hpb=dc286d2673ef334c6bab0c4244a49a1b01e63cdc diff --git a/src/Makefile b/src/Makefile index 5fa29c0a..3963e558 100644 --- a/src/Makefile +++ b/src/Makefile @@ -40,11 +40,11 @@ ICCFLAGS-OSX += -DNDEBUG ### ========================================================================== -### Enable/disable compile for a big-endian CPU, disabled by default +### Remove below comments to compile for a big-endian machine ### ========================================================================== -GCCFLAGS += -DNBIGENDIAN -ICCFLAGS += -DNBIGENDIAN -ICCFLAGS-OSX += -DNBIGENDIAN +#GCCFLAGS += -DBIGENDIAN +#ICCFLAGS += -DBIGENDIAN +#ICCFLAGS-OSX += -DBIGENDIAN ### ========================================================================== @@ -80,8 +80,10 @@ help: @echo "Makefile options:" @echo "" @echo "make > Default: Compiler = g++" + @echo "make gcc-popcnt > Compiler = g++ + popcnt-support" @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++" @@ -107,6 +109,13 @@ gcc: CXXFLAGS="$(GCCFLAGS)" \ all +gcc-popcnt: + $(MAKE) \ + CXX='g++' \ + CXXFLAGS="$(GCCFLAGS) -DUSE_POPCNT" \ + all + + icc: $(MAKE) \ CXX='icpc' \ @@ -141,6 +150,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++' \