X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2FMakefile;h=5b101cbdaa2be1d1291ed771b87382e4592185c2;hp=8622be3206291abd014304d14007049e762bbcd2;hb=a3943b2aa76b278aaeb348fb37123f72507da0bd;hpb=2dbb1adf2ac3c1655fd6b696c2e73c92e56e78d4 diff --git a/src/Makefile b/src/Makefile index 8622be32..5b101cbd 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),) @@ -151,14 +152,18 @@ ifeq ($(COMP),gcc) comp=gcc CXX=g++ CXXFLAGS += -pedantic -Wno-long-long -Wextra -Wshadow - LDFLAGS += -Wl,--no-as-needed + ifneq ($(UNAME),Darwin) + LDFLAGS += -Wl,--no-as-needed + else + LDFLAGS += -Wl + endif endif ifeq ($(COMP),mingw) comp=mingw CXX=g++ CXXFLAGS += -Wextra -Wshadow - LDFLAGS += -static-libstdc++ -static-libgcc + LDFLAGS += -static endif ifeq ($(COMP),icc) @@ -189,8 +194,8 @@ else endif ifeq ($(UNAME),Darwin) - CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.10 - LDFLAGS += -arch $(arch) -mmacosx-version-min=10.10 + CXXFLAGS += -arch $(arch) -mmacosx-version-min=10.9 + LDFLAGS += -arch $(arch) -mmacosx-version-min=10.9 endif ### On mingw use Windows threads, otherwise POSIX @@ -304,12 +309,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