diff options
author | bjarni <bjarni@openttd.org> | 2005-12-09 11:08:24 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2005-12-09 11:08:24 +0000 |
commit | 79b76e239776992fb80ecfb20ef60be5f85e8d15 (patch) | |
tree | 9d7e8a513a14468359dca6c32e2de0bf9e5bf0b6 /os/macosx/Makefile.setup | |
parent | e486e56050fe0366ca2538be0b268710b75ba7f4 (diff) | |
download | openttd-79b76e239776992fb80ecfb20ef60be5f85e8d15.tar.xz |
(svn r3273) -Fix: [OSX] PPC part of universal binaries now target 10.3 instead of 10.4
10.2 support appears to be broken right now
Changed BUILD_UNIVERSAL_BINARY into FAT_BINARY (I got tired of typing)
Diffstat (limited to 'os/macosx/Makefile.setup')
-rw-r--r-- | os/macosx/Makefile.setup | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/os/macosx/Makefile.setup b/os/macosx/Makefile.setup index f41e63307..f42f34bf4 100644 --- a/os/macosx/Makefile.setup +++ b/os/macosx/Makefile.setup @@ -11,11 +11,18 @@ endif endif ifdef RELEASE -ifndef BUILD_UNIVERSAL_BINARY +ifndef FAT_BINARY $(warning Compiling a release build, that is not a universal binary) endif endif +ifdef FAT_BINARY +ifndef STATIC +$(warning Compiling a universal binary, that is not static. Adding static flag) +STATIC:=1 +endif +endif + ifdef RELEASE ifdef DEBUG $(warning Compiling a release build, that is a debug build) @@ -23,15 +30,21 @@ endif endif # setup flags if none are defined -ifndef UNIVERSAL_CFLAGS - UNIVERSAL_CFLAGS:= -isysroot /Developer/SDKs/MacOSX10.4u.sdk +ifndef CFLAGS_PPC + CFLAGS_PPC:= -isysroot /Developer/SDKs/MacOSX10.3.9.sdk endif -ifndef UNIVERSAL_LDFLAGS - UNIVERSAL_LDFLAGS:= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk +ifndef LDFLAGS_PPC + LDFLAGS_PPC:= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk endif ifndef PPC_CC PPC_CC:=powerpc-apple-darwin8-gcc-4.0.0 endif +ifndef CFLAGS_x86 + CFLAGS_x86:= -isysroot /Developer/SDKs/MacOSX10.4u.sdk +endif +ifndef LDFLAGS_x86 + LDFLAGS_x86:= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk +endif ifndef x86_CC x86_CC:=i686-apple-darwin8-gcc-4.0.0 endif @@ -50,12 +63,12 @@ ifdef WITH_SDL ifndef SDL_x86_CONFIG SDL_x86_CONFIG:=$(SDL-CONFIG) endif + ifndef x86_SDL_LIB + x86_SDL_LIB:=$(shell echo "`$(SDL_x86_CONFIG) --prefix`/lib/libSDL-1.2.0.dylib") + endif endif -ifdef BUILD_UNIVERSAL_BINARY - CFLAGS:= $(UNIVERSAL_CFLAGS) - LDFLAGS:= $(UNIVERSAL_LDFLAGS) - +ifdef FAT_BINARY # set up config files ifndef SKIP_LIB_TEST ifdef WITH_PNG @@ -87,16 +100,18 @@ $(error no x86 SDL lib found) endif ifdef UNIVERSAL_x86_PART - CFLAGS += -arch i386 LIBPNG-CONFIG:=$(LIBPNG_x86_CONFIG) SDL-CONFIG:=$(SDL_x86_CONFIG) CC_TARGET:=$(x86_CC) # clear the cached list of PPC libs LIBS:= + CFLAGS:= $(CFLAGS_x86) -arch i386 + LDFLAGS:= $(LDFLAGS_x86) else - CFLAGS += -arch ppc LIBPNG-CONFIG:=$(LIBPNG_PPC_CONFIG) SDL-CONFIG:=$(SDL_PPC_CONFIG) CC_TARGET:=$(PPC_CC) + CFLAGS:= $(CFLAGS_PPC) -arch ppc + LDFLAGS:= $(LDFLAGS_PPC) endif endif |