From b764f8d6764e76e329fc950c9fdf798516d0d618 Mon Sep 17 00:00:00 2001 From: bjarni Date: Sat, 25 Feb 2006 21:25:23 +0000 Subject: (svn r3674) -Feature: [OSX] Added support for tripple binaries (binaries optimised for G3, G5 and i686) G4 have no problems using G3 code while G5 can, but really benefit from getting their own optimised code (Apple: G5 is not just a fast G4) Also changed FAT_BINARY to UNIVERSAL_BINARY since Apple removed most (all?) references to fat binaries on their homepage two days after I added FAT_BINARY --- os/macosx/Makefile.setup | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'os/macosx/Makefile.setup') diff --git a/os/macosx/Makefile.setup b/os/macosx/Makefile.setup index 3e9e2cf27..990efb122 100644 --- a/os/macosx/Makefile.setup +++ b/os/macosx/Makefile.setup @@ -11,22 +11,29 @@ endif endif ifdef RELEASE -ifndef FAT_BINARY +ifndef UNIVERSAL_BINARY $(warning Compiling a release build, that is not a universal binary) endif endif -ifndef FAT_BINARY +ifdef TRIPPLE_BINARY +ifdef DEBUG +$(error no G5 optimisation is made in debug builds, so tripple binaries aren't possible. Use UNIVERSAL_BINARY instead if you really want a universal debug build) +endif +UNIVERSAL_BINARY:=1 +endif + +ifndef UNIVERSAL_BINARY ifndef JAGUAR ifeq ($(shell uname), Darwin) # it's a hardware mac, not crosscompiling -$(Q)$(CC_HOST) os/macosx/G5_detector.c -o os/macosx/G5_detector +$(shell $(CC_HOST) os/macosx/G5_detector.c -o os/macosx/G5_detector) IS_G5:=$(shell os/macosx/G5_detector) endif endif endif -ifdef FAT_BINARY +ifdef UNIVERSAL_BINARY ifndef STATIC $(warning Compiling a universal binary, that is not static. Adding static flag) STATIC:=1 @@ -86,7 +93,7 @@ ifdef JAGUAR LDFLAGS:= $(LDFLAGS_PPC) endif -ifdef FAT_BINARY +ifdef UNIVERSAL_BINARY # set up config files ifndef SKIP_LIB_TEST ifdef WITH_PNG @@ -100,21 +107,20 @@ $(error no x86 libpng found) endif endif endif - - ifdef UNIVERSAL_x86_PART + LIBS:= + OBJS:= + ifdef UNIVERSAL_PPC_PART + LIBPNG-CONFIG:=$(LIBPNG_PPC_CONFIG) + SDL-CONFIG:=$(SDL_PPC_CONFIG) + CC_TARGET:=$(PPC_CC) + CFLAGS:= $(CFLAGS_PPC) -arch ppc + LDFLAGS:= $(LDFLAGS_PPC) + else LIBPNG-CONFIG:=$(LIBPNG_x86_CONFIG) SDL-CONFIG:=$(SDL_x86_CONFIG) CC_TARGET:=$(x86_CC) # clear the cached list of PPC libs - LIBS:= - OBJS:= CFLAGS:= $(CFLAGS_x86) -arch i386 LDFLAGS:= $(LDFLAGS_x86) - else - LIBPNG-CONFIG:=$(LIBPNG_PPC_CONFIG) - SDL-CONFIG:=$(SDL_PPC_CONFIG) - CC_TARGET:=$(PPC_CC) - CFLAGS:= $(CFLAGS_PPC) -arch ppc - LDFLAGS:= $(LDFLAGS_PPC) endif endif -- cgit v1.2.3-54-g00ecf