]> git.sesse.net Git - stockfish/commitdiff
Update Makefile for Mac OS X compilation
authorStéphane Nicolet <cassio@free.fr>
Mon, 2 Mar 2015 21:01:19 +0000 (22:01 +0100)
committerJoona Kiiski <joona.kiiski@gmail.com>
Thu, 5 Mar 2015 04:18:59 +0000 (04:18 +0000)
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

src/Makefile

index 8622be3206291abd014304d14007049e762bbcd2..16eb9c5535404e7e8217ea02d95853e1d1c682cd 100644 (file)
@@ -151,7 +151,11 @@ ifeq ($(COMP),gcc)
        comp=gcc
        CXX=g++
        CXXFLAGS += -pedantic -Wno-long-long -Wextra -Wshadow
        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)
 endif
 
 ifeq ($(COMP),mingw)
@@ -189,8 +193,8 @@ else
 endif
 
 ifeq ($(UNAME),Darwin)
 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
 endif
 
 ### On mingw use Windows threads, otherwise POSIX