From: Stéphane Nicolet Date: Mon, 2 Mar 2015 21:01:19 +0000 (+0100) Subject: Update Makefile for Mac OS X compilation X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=6fa6da3ee13d2b7bdbec3cd24ff8ca43233c74fb;ds=sidebyside Update Makefile for Mac OS X compilation This change in the Makefile restores the possibility to compile Stockfish on Mac OS X 10.9 and 10.10 after the C++11 has been merged. To use the default (fastest) settings, compile with: make build ARCH=x86-64-modern To test the clang settings, compile with make build ARCH=x86-64-modern COMP=clang Beware that the clang settings may provide a slightly slower (6%) executable. No functional change Resolves #275 --- diff --git a/src/Makefile b/src/Makefile index 8622be32..16eb9c55 100644 --- a/src/Makefile +++ b/src/Makefile @@ -151,7 +151,11 @@ 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) @@ -189,8 +193,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