diff options
Diffstat (limited to 'tools/rbspeex')
-rw-r--r-- | tools/rbspeex/Makefile | 12 |
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 | |||
35 | else | 35 | else |
36 | # OS X specifics. Needs to consider cross compiling for Windows. | 36 | # OS X specifics. Needs to consider cross compiling for Windows. |
37 | ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) | 37 | ifeq ($(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. | ||
40 | ifeq ($(findstring __clang__,$(CPPDEFINES)),__clang__) | ||
41 | CFLAGS += -mmacosx-version-min=10.5 | ||
42 | else | ||
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. |
41 | ARCHFLAGS = -arch ppc -arch i386 | 46 | ARCHFLAGS += -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. |
44 | CC ?= gcc-4.0 | 49 | CC = gcc-4.0 |
45 | CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 | 50 | CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 |
46 | NATIVECC ?= gcc-4.0 | 51 | NATIVECC ?= gcc-4.0 |
52 | endif | ||
47 | COMPILETARGET = darwin | 53 | COMPILETARGET = darwin |
48 | else | 54 | else |
49 | COMPILETARGET = posix | 55 | COMPILETARGET = posix |