2005-12-06 22:09:28 +00:00
|
|
|
# $Id: Makefile 3214 2005-11-17 19:43:37Z bjarni $
|
|
|
|
# This makefile is not a standalone makefile, but is called from the general one
|
|
|
|
# it contains code specific to MacOS X
|
|
|
|
|
|
|
|
ifdef RELEASE
|
|
|
|
ifndef STATIC
|
|
|
|
# all OSX releases needs to be static
|
|
|
|
# end users don't tend to have the dynamic libs installed
|
|
|
|
$(warning Compiling a dynamic release. It should be static unless you really know what you are doing!!!)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef RELEASE
|
2006-02-25 21:25:23 +00:00
|
|
|
ifndef UNIVERSAL_BINARY
|
2005-12-06 22:09:28 +00:00
|
|
|
$(warning Compiling a release build, that is not a universal binary)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2006-03-15 14:11:17 +00:00
|
|
|
ifdef TRIPLE_BINARY
|
2006-02-25 21:25:23 +00:00
|
|
|
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
|
2006-02-25 18:11:11 +00:00
|
|
|
ifndef JAGUAR
|
|
|
|
ifeq ($(shell uname), Darwin)
|
|
|
|
# it's a hardware mac, not crosscompiling
|
2006-02-27 16:58:26 +00:00
|
|
|
$(shell $(CC) os/macosx/G5_detector.c -o os/macosx/G5_detector)
|
2006-02-25 18:11:11 +00:00
|
|
|
IS_G5:=$(shell os/macosx/G5_detector)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2006-02-25 21:25:23 +00:00
|
|
|
ifdef UNIVERSAL_BINARY
|
2005-12-09 11:08:24 +00:00
|
|
|
ifndef STATIC
|
|
|
|
$(warning Compiling a universal binary, that is not static. Adding static flag)
|
|
|
|
STATIC:=1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2005-12-06 22:09:28 +00:00
|
|
|
ifdef RELEASE
|
|
|
|
ifdef DEBUG
|
|
|
|
$(warning Compiling a release build, that is a debug build)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# setup flags if none are defined
|
2006-03-15 14:03:09 +00:00
|
|
|
ifndef CFLAGS_JAGUAR
|
|
|
|
CFLAGS_JAGUAR:= -isysroot /Developer/SDKs/MacOSX10.2.8.sdk
|
|
|
|
endif
|
|
|
|
ifndef LDFLAGS_JAGUAR
|
|
|
|
LDFLAGS_JAGUAR:= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef CFLAGS_UNIVERSAL
|
|
|
|
CFLAGS_UNIVERSAL:= -isysroot /Developer/SDKs/MacOSX10.4u.sdk
|
|
|
|
endif
|
|
|
|
ifndef LDFLAGS_UNIVERSAL
|
|
|
|
LDFLAGS_UNIVERSAL:= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
|
2005-12-06 22:09:28 +00:00
|
|
|
endif
|
|
|
|
|
2006-01-07 12:53:57 +00:00
|
|
|
ifdef JAGUAR
|
2006-03-15 14:03:09 +00:00
|
|
|
CFLAGS:= $(CFLAGS_JAGUAR) -arch ppc
|
|
|
|
LDFLAGS:= $(LDFLAGS_JAGUAR)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef G5_FLAGS
|
|
|
|
G5_FLAGS := -mtune=970 -mcpu=970 -mpowerpc-gpopt
|
2006-01-07 12:53:57 +00:00
|
|
|
endif
|
|
|
|
|
2006-02-25 21:25:23 +00:00
|
|
|
ifdef UNIVERSAL_BINARY
|
2006-03-15 14:03:09 +00:00
|
|
|
TARGET_CPU_FLAGS:= -arch ppc -arch i386
|
|
|
|
LDFLAGS := $(LDFLAGS_UNIVERSAL) -arch ppc -arch i386
|
|
|
|
CFLAGS += $(CFLAGS_UNIVERSAL)
|
2006-03-15 14:11:17 +00:00
|
|
|
ifdef TRIPLE_BINARY
|
2006-03-15 14:03:09 +00:00
|
|
|
LDFLAGS += -arch ppc970
|
|
|
|
endif
|
2005-12-06 22:09:28 +00:00
|
|
|
endif
|