X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=8622be3206291abd014304d14007049e762bbcd2;hp=f57773dfa0796c7990b1cae3a4efed27cd6bb5ac;hb=29ff925fd8026ceb2bd01d65a3db6bd416a5557e;hpb=3c07603dac03f0da20194097cf4eb1a396fea60d diff --git a/src/Makefile b/src/Makefile index f57773df..8622be32 100644 --- a/src/Makefile +++ b/src/Makefile @@ -36,7 +36,7 @@ PGOBENCH = ./$(EXE) bench 16 1 1000 default time ### Object files OBJS = benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o \ material.o misc.o movegen.o movepick.o pawns.o position.o \ - search.o thread.o timeman.o tt.o uci.o ucioption.o + search.o thread.o timeman.o tt.o uci.o ucioption.o syzygy/tbprobe.o ### ========================================================================== ### Section 2. High-level Configuration @@ -171,6 +171,9 @@ ifeq ($(COMP),clang) comp=clang CXX=clang++ CXXFLAGS += -pedantic -Wno-long-long -Wextra -Wshadow + ifeq ($(UNAME),Darwin) + CXXFLAGS += -std=c++0x -stdlib=libc++ + endif endif ifeq ($(comp),icc) @@ -186,8 +189,8 @@ else endif ifeq ($(UNAME),Darwin) - CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.6 - LDFLAGS += -arch $(arch) -mmacosx-version-min=10.6 + CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.10 + LDFLAGS += -arch $(arch) -mmacosx-version-min=10.10 endif ### On mingw use Windows threads, otherwise POSIX @@ -375,14 +378,14 @@ profile-build: $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_prepare) @echo "" @echo "Step 1/4. Building executable for benchmark ..." - @touch *.cpp *.h + @touch *.cpp *.h syzygy/*.cpp syzygy/*.h $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_make) @echo "" @echo "Step 2/4. Running benchmark for pgo-build ..." @$(PGOBENCH) > /dev/null @echo "" @echo "Step 3/4. Building final executable ..." - @touch *.cpp *.h + @touch *.cpp *.h syzygy/*.cpp syzygy/*.h $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_use) @echo "" @echo "Step 4/4. Deleting profile data ..." @@ -397,7 +400,7 @@ install: -strip $(BINDIR)/$(EXE) clean: - $(RM) $(EXE) $(EXE).exe *.o .depend *~ core bench.txt *.gcda + $(RM) $(EXE) $(EXE).exe *.o .depend *~ core bench.txt *.gcda ./syzygy/*.o ./syzygy/*.gcda default: help @@ -448,21 +451,18 @@ gcc-profile-prepare: gcc-profile-make: $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \ - EXTRACXXFLAGS='-fprofile-arcs' \ + EXTRACXXFLAGS='-fprofile-generate' \ EXTRALDFLAGS='-lgcov' \ all gcc-profile-use: -# Deleting corrupt ucioption.gc* profile files is necessary to avoid an -# "internal compiler error" for gcc versions 4.7.x - @rm -f ucioption.gc* $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \ - EXTRACXXFLAGS='-fbranch-probabilities' \ + EXTRACXXFLAGS='-fprofile-use -fno-peel-loops -fno-tracer' \ EXTRALDFLAGS='-lgcov' \ all gcc-profile-clean: - @rm -rf *.gcda *.gcno bench.txt + @rm -rf *.gcda *.gcno syzygy/*.gcda syzygy/*.gcno bench.txt icc-profile-prepare: $(MAKE) ARCH=$(ARCH) COMP=$(COMP) icc-profile-clean