Files @ r3765:c9eaea3d3f78
Branch filter:

Location: cpp/openttd-patchpack/source/os/macosx/Makefile.setup - annotation

peter1138
(svn r4757) - Newstations: add saveload support for custom station speclists
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r3085:894008d3d031
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r3212:662b4c6b9bee
r3085:894008d3d031
r3354:b5f8903e38f1
r3085:894008d3d031
r3085:894008d3d031
r3085:894008d3d031
r3085:894008d3d031
r3085:894008d3d031
r2728:15f1fcbf00eb
r2728:15f1fcbf00eb
r2728:15f1fcbf00eb
r2728:15f1fcbf00eb
r2728:15f1fcbf00eb
r2728:15f1fcbf00eb
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r2722:03de2e98e9a2
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r2722:03de2e98e9a2
r3211:ed19c06bf5f0
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r2722:03de2e98e9a2
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3211:ed19c06bf5f0
r3211:ed19c06bf5f0
r3211:ed19c06bf5f0
r3211:ed19c06bf5f0
r2834:75f4fbf2be07
r2834:75f4fbf2be07
r3085:894008d3d031
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r2722:03de2e98e9a2
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3211:ed19c06bf5f0
r3294:48afb2c79c16
r3294:48afb2c79c16
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3294:48afb2c79c16
r3294:48afb2c79c16
r3294:48afb2c79c16
r3294:48afb2c79c16
r3294:48afb2c79c16
r3294:48afb2c79c16
r3354:b5f8903e38f1
r3294:48afb2c79c16
r3294:48afb2c79c16
r3294:48afb2c79c16
r3294:48afb2c79c16
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
r3354:b5f8903e38f1
# $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
ifndef UNIVERSAL_BINARY
$(warning Compiling a release build, that is not a universal binary)
endif
endif

ifdef TRIPLE_BINARY
ifdef DEBUG
$(error no G5 optimisation is made in debug builds, so triple binaries aren't possible. Use UNIVERSAL_BINARY instead if you really want a universal debug build)
endif
UNIVERSAL_BINARY:=1
endif

ifdef UNIVERSAL_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)
endif
endif

ifeq ($(shell uname), Darwin)
	# it's a hardware mac, not crosscompiling
	NATIVE_OSX:=1
endif

ifndef PPC_OSX_TARGET
PPC_OSX_TARGET:=10.3.9
endif
ifndef i386_OSX_TARGET
i386_OSX_TARGET:=10.4u
endif

ifndef G5_FLAGS
G5_FLAGS := -mtune=970 -mcpu=970 -mpowerpc-gpopt
endif

ifdef UNIVERSAL_BINARY
	OTTD_PPC:=1
	OTTD_i386:=1
	ifdef TRIPLE_BINARY
		OTTD_PPC970:=1
	endif
endif

# if any targets have been defined by now, we are crosscompiling and we will set up paths accordingly
ifdef OTTD_PPC
	CFLAGS_PPC   += -isysroot /Developer/SDKs/MacOSX$(PPC_OSX_TARGET).sdk
	LDFLAGS_PPC  += -Wl,-syslibroot,/Developer/SDKs/MacOSX$(PPC_OSX_TARGET).sdk
endif

ifdef OTTD_i386
	CFLAGS_i386  += -isysroot /Developer/SDKs/MacOSX$(i386_OSX_TARGET).sdk
	LDFLAGS_i386 += -Wl,-syslibroot,/Developer/SDKs/MacOSX$(i386_OSX_TARGET).sdk
endif

ifdef OTTD_PPC970
	ifndef OTTD_PPC
		CFLAGS_PPC   += -isysroot /Developer/SDKs/MacOSX$(PPC_OSX_TARGET).sdk
		LDFLAGS_PPC  += -Wl,-syslibroot,/Developer/SDKs/MacOSX$(PPC_OSX_TARGET).sdk
	endif
endif

ifdef JAGUAR
	CFLAGS  += -isysroot /Developer/SDKs/MacOSX10.2.8.sdk
	LDFLAGS += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk
	OTTD_PPC:=1
endif

# setting up flags to make a binary, that fits the system it builds on
ifdef NATIVE_OSX
	ifndef UNIVERSAL_BINARY
		# we are not crosscompiling for other macs
		ifndef JAGUAR
			# the next line fails if it got whitespace in front of it
$(shell $(CC) os/macosx/G5_detector.c -o os/macosx/G5_detector)
			IS_G5:=$(shell os/macosx/G5_detector)
			ifeq ($(shell uname -r), 6.8)
			# OSX 10.2.8 uses Darwin 6.8, so we better set JAGUAR so we avoid the stuff that was added in 10.3 or later
				JAGUAR:=1
				OTTD_PPC:=1
			endif
		endif
	endif
endif

ifdef NATIVE_OSX
	ifndef OTTD_PPC
		ifndef OTTD_i386
			ifndef OTTD_PPC970
				# no flags have been set for target versions of OSX, so we will set it to compile for the current host
				ifeq ($(shell uname -p), powerpc)
					ifdef IS_G5
						OTTD_PPC970:=1
					else
						OTTD_PPC:=1
					endif
				else
					# we are not using a PowerPC CPU, so we assume that it's an Intel mac
					OTTD_i386:=1
				endif
			endif
		endif
	endif
endif