summaryrefslogtreecommitdiff
path: root/tools/rbspeex
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2014-03-20 22:22:17 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2014-03-20 22:26:24 +0100
commit258e4ad850097f334beb033031b62a1039e3575b (patch)
tree85e31c8df9f45d174cda8cc133aa698303b2aad8 /tools/rbspeex
parentc18908d6bd493ea11c37df20dba3bc07d04539c2 (diff)
downloadrockbox-258e4ad850097f334beb033031b62a1039e3575b.tar.gz
rockbox-258e4ad850097f334beb033031b62a1039e3575b.zip
OS X: detect clang and build for x86 target only.
Newer versions of Xcode / OS X don't support PPC code anymore and replace gcc with clang. When clang is detected assume we want to build for the default architecture only and change the minimum OS X version to 10.5. Change-Id: I5843fa9bb3d957ec6f0a537e857608ad99c31517
Diffstat (limited to 'tools/rbspeex')
-rw-r--r--tools/rbspeex/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/rbspeex/Makefile b/tools/rbspeex/Makefile
index 785a99239a..89e21f8022 100644
--- a/tools/rbspeex/Makefile
+++ b/tools/rbspeex/Makefile
@@ -35,15 +35,21 @@ COMPILETARGET = mingw
35else 35else
36# OS X specifics. Needs to consider cross compiling for Windows. 36# OS X specifics. Needs to consider cross compiling for Windows.
37ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) 37ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE)
38# when building libs for OS X build for both i386 and ppc at the same time. 38# When building for 10.4+ we need to use gcc. Otherwise clang is used, so use
39# that to determine if we need to set arch and isysroot.
40ifeq ($(findstring __clang__,$(CPPDEFINES)),__clang__)
41CFLAGS += -mmacosx-version-min=10.5
42else
43# when building libs for OS X 10.4+ build for both i386 and ppc at the same time.
39# This creates fat objects, and ar can only create the archive but not operate 44# This creates fat objects, and ar can only create the archive but not operate
40# on it. As a result the ar call must NOT use the u (update) flag. 45# on it. As a result the ar call must NOT use the u (update) flag.
41ARCHFLAGS = -arch ppc -arch i386 46ARCHFLAGS += -arch ppc -arch i386
42# building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode) 47# building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode)
43# might need adjustment for older Xcode. 48# might need adjustment for older Xcode.
44CC ?= gcc-4.0 49CC = gcc-4.0
45CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 50CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
46NATIVECC ?= gcc-4.0 51NATIVECC ?= gcc-4.0
52endif
47COMPILETARGET = darwin 53COMPILETARGET = darwin
48else 54else
49COMPILETARGET = posix 55COMPILETARGET = posix