diff options
-rw-r--r-- | rbutil/libtools.make | 8 | ||||
-rw-r--r-- | tools/rbspeex/Makefile | 12 | ||||
-rw-r--r-- | tools/ucl/src/Makefile | 12 |
3 files changed, 25 insertions, 7 deletions
diff --git a/rbutil/libtools.make b/rbutil/libtools.make index 4623808f94..7a125f98ea 100644 --- a/rbutil/libtools.make +++ b/rbutil/libtools.make @@ -63,7 +63,12 @@ $(info Compiler creates $(COMPILETARGET) binaries) # OS X specifics. Needs to consider cross compiling for Windows. ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) -# when building libs for OS X build for both i386 and ppc at the same time. +# When building for 10.4+ we need to use gcc. Otherwise clang is used, so use +# that to determine if we need to set arch and isysroot. +ifeq ($(findstring __clang__,$(CPPDEFINES)),__clang__) +CFLAGS += -mmacosx-version-min=10.5 +else +# when building libs for OS X 10.4+ build for both i386 and ppc at the same time. # This creates fat objects, and ar can only create the archive but not operate # on it. As a result the ar call must NOT use the u (update) flag. ARCHFLAGS += -arch ppc -arch i386 @@ -73,6 +78,7 @@ CC = gcc-4.0 CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 NATIVECC = gcc-4.0 endif +endif WINDRES = windres BUILD_DIR ?= $(TARGET_DIR)build$(COMPILETARGET) 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 else # OS X specifics. Needs to consider cross compiling for Windows. ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) -# when building libs for OS X build for both i386 and ppc at the same time. +# When building for 10.4+ we need to use gcc. Otherwise clang is used, so use +# that to determine if we need to set arch and isysroot. +ifeq ($(findstring __clang__,$(CPPDEFINES)),__clang__) +CFLAGS += -mmacosx-version-min=10.5 +else +# when building libs for OS X 10.4+ build for both i386 and ppc at the same time. # This creates fat objects, and ar can only create the archive but not operate # on it. As a result the ar call must NOT use the u (update) flag. -ARCHFLAGS = -arch ppc -arch i386 +ARCHFLAGS += -arch ppc -arch i386 # building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode) # might need adjustment for older Xcode. -CC ?= gcc-4.0 +CC = gcc-4.0 CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 NATIVECC ?= gcc-4.0 +endif COMPILETARGET = darwin else COMPILETARGET = posix diff --git a/tools/ucl/src/Makefile b/tools/ucl/src/Makefile index ca29d7c8a8..a741f1ee8c 100644 --- a/tools/ucl/src/Makefile +++ b/tools/ucl/src/Makefile @@ -32,15 +32,21 @@ COMPILETARGET = mingw else # OS X specifics. Needs to consider cross compiling for Windows. ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) -# when building libs for OS X build for both i386 and ppc at the same time. +# When building for 10.4+ we need to use gcc. Otherwise clang is used, so use +# that to determine if we need to set arch and isysroot. +ifeq ($(findstring __clang__,$(CPPDEFINES)),__clang__) +CFLAGS += -mmacosx-version-min=10.5 +else +# when building libs for OS X 10.4+ build for both i386 and ppc at the same time. # This creates fat objects, and ar can only create the archive but not operate # on it. As a result the ar call must NOT use the u (update) flag. -ARCHFLAGS = -arch ppc -arch i386 +ARCHFLAGS += -arch ppc -arch i386 # building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode) # might need adjustment for older Xcode. -CC ?= gcc-4.0 +CC = gcc-4.0 CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 NATIVECC ?= gcc-4.0 +endif COMPILETARGET = darwin else COMPILETARGET = posix |