X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=65ef297ee837bc3c37566e8e2f33ddb3f212e92c;hp=16eb9c5535404e7e8217ea02d95853e1d1c682cd;hb=bae4679de2db252764610f8dc0dfce125fac461e;hpb=6fa6da3ee13d2b7bdbec3cd24ff8ca43233c74fb diff --git a/src/Makefile b/src/Makefile index 16eb9c55..65ef297e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -141,6 +141,7 @@ endif ### 3.1 Selecting compiler (default = gcc) CXXFLAGS += -Wall -Wcast-qual -fno-exceptions -fno-rtti -std=c++11 $(EXTRACXXFLAGS) +DEPENDFLAGS += -std=c++11 LDFLAGS += $(EXTRALDFLAGS) ifeq ($(COMP),) @@ -162,7 +163,7 @@ ifeq ($(COMP),mingw) comp=mingw CXX=g++ CXXFLAGS += -Wextra -Wshadow - LDFLAGS += -static-libstdc++ -static-libgcc + LDFLAGS += -static endif ifeq ($(COMP),icc) @@ -177,6 +178,7 @@ ifeq ($(COMP),clang) CXXFLAGS += -pedantic -Wno-long-long -Wextra -Wshadow ifeq ($(UNAME),Darwin) CXXFLAGS += -std=c++0x -stdlib=libc++ + DEPENDFLAGS += -std=c++0x -stdlib=libc++ endif endif @@ -308,12 +310,8 @@ endif ifeq ($(comp),gcc) ifeq ($(optimize),yes) ifeq ($(debug),no) - GCC_MAJOR := `$(CXX) -dumpversion | cut -f1 -d.` - GCC_MINOR := `$(CXX) -dumpversion | cut -f2 -d.` - ifeq (1,$(shell expr \( $(GCC_MAJOR) \> 4 \) \| \( $(GCC_MAJOR) \= 4 \& $(GCC_MINOR) \>= 5 \))) - CXXFLAGS += -flto - LDFLAGS += $(CXXFLAGS) - endif + CXXFLAGS += -flto + LDFLAGS += $(CXXFLAGS) endif endif endif