diff options
Diffstat (limited to 'tools/ucl/src/Makefile')
-rw-r--r-- | tools/ucl/src/Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
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 | |||
32 | else | 32 | else |
33 | # OS X specifics. Needs to consider cross compiling for Windows. | 33 | # OS X specifics. Needs to consider cross compiling for Windows. |
34 | ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) | 34 | ifeq ($(findstring APPLE,$(CPPDEFINES)),APPLE) |
35 | # when building libs for OS X build for both i386 and ppc at the same time. | 35 | # When building for 10.4+ we need to use gcc. Otherwise clang is used, so use |
36 | # that to determine if we need to set arch and isysroot. | ||
37 | ifeq ($(findstring __clang__,$(CPPDEFINES)),__clang__) | ||
38 | CFLAGS += -mmacosx-version-min=10.5 | ||
39 | else | ||
40 | # when building libs for OS X 10.4+ build for both i386 and ppc at the same time. | ||
36 | # This creates fat objects, and ar can only create the archive but not operate | 41 | # This creates fat objects, and ar can only create the archive but not operate |
37 | # on it. As a result the ar call must NOT use the u (update) flag. | 42 | # on it. As a result the ar call must NOT use the u (update) flag. |
38 | ARCHFLAGS = -arch ppc -arch i386 | 43 | ARCHFLAGS += -arch ppc -arch i386 |
39 | # building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode) | 44 | # building against SDK 10.4 is not compatible with gcc-4.2 (default on newer Xcode) |
40 | # might need adjustment for older Xcode. | 45 | # might need adjustment for older Xcode. |
41 | CC ?= gcc-4.0 | 46 | CC = gcc-4.0 |
42 | CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 | 47 | CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 |
43 | NATIVECC ?= gcc-4.0 | 48 | NATIVECC ?= gcc-4.0 |
49 | endif | ||
44 | COMPILETARGET = darwin | 50 | COMPILETARGET = darwin |
45 | else | 51 | else |
46 | COMPILETARGET = posix | 52 | COMPILETARGET = posix |