Mercurial > sdl-ios-xcode
comparison build-scripts/fatbuild.sh @ 4116:1bc3d3b2cde1 SDL-1.2
Support both 10.2 and 10.3 PPC runtime SDK
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 29 Dec 2007 17:13:21 +0000 |
parents | e3945f84427f |
children | 3e7f2edce658 |
comparison
equal
deleted
inserted
replaced
4115:63b57f6b6523 | 4116:1bc3d3b2cde1 |
---|---|
8 #NJOB=`expr $NCPU + 1` | 8 #NJOB=`expr $NCPU + 1` |
9 | 9 |
10 # Generic, cross-platform CFLAGS you always want go here. | 10 # Generic, cross-platform CFLAGS you always want go here. |
11 CFLAGS="-O3 -g -pipe" | 11 CFLAGS="-O3 -g -pipe" |
12 | 12 |
13 # PowerPC configure flags (10.3 runtime compatibility) | 13 # Locate Xcode SDK path |
14 # We dynamically load X11, so using the system X11 headers is fine. | 14 SDK_PATH=/Developer/SDKs |
15 CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \ | 15 if [ ! -d $SDK_PATH ]; then |
16 echo "Couldn't find SDK path" | |
17 exit 1 | |
18 fi | |
19 | |
20 # See if we can use 10.2 or 10.3 runtime compatibility | |
21 if [ -d "$SDK_PATH/MacOSX10.2.8.sdk" ]; then | |
22 # PowerPC configure flags (10.2 runtime compatibility) | |
23 # We dynamically load X11, so using the system X11 headers is fine. | |
24 CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \ | |
16 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" | 25 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" |
17 | 26 |
18 # PowerPC compiler flags | 27 # PowerPC compiler flags |
19 CC_PPC="gcc-4.0 -arch ppc" | 28 CC_PPC="gcc-3.3 -arch ppc" |
20 CXX_PPC="g++-4.0 -arch ppc" | 29 CXX_PPC="g++-3.3 -arch ppc" |
21 CFLAGS_PPC="" | 30 CFLAGS_PPC="" |
22 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \ | 31 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \ |
23 -nostdinc \ | 32 -nostdinc \ |
24 -F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks \ | 33 -F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \ |
25 -I/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \ | 34 -I$SDK_PATH/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \ |
26 -isystem /Developer/SDKs/MacOSX10.3.9.sdk/usr/include" | 35 -isystem $SDK_PATH/MacOSX10.2.8.sdk/usr/include" |
27 | 36 |
28 # PowerPC linker flags | 37 # PowerPC linker flags |
29 LFLAGS_PPC="-arch ppc -mmacosx-version-min=10.3 \ | 38 LFLAGS_PPC="-arch ppc \ |
30 -L/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \ | 39 -L$SDK_PATH/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \ |
31 -F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks \ | 40 -F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \ |
32 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk" | 41 -Wl,-syslibroot,$SDK_PATH/MacOSX10.2.8.sdk" |
42 | |
43 else # 10.2 or 10.3 SDK | |
44 | |
45 # PowerPC configure flags (10.3 runtime compatibility) | |
46 # We dynamically load X11, so using the system X11 headers is fine. | |
47 CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \ | |
48 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" | |
49 | |
50 # PowerPC compiler flags | |
51 CC_PPC="gcc-4.0 -arch ppc" | |
52 CXX_PPC="g++-4.0 -arch ppc" | |
53 CFLAGS_PPC="" | |
54 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \ | |
55 -nostdinc \ | |
56 -F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \ | |
57 -I$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \ | |
58 -isystem $SDK_PATH/MacOSX10.3.9.sdk/usr/include" | |
59 | |
60 # PowerPC linker flags | |
61 LFLAGS_PPC="-arch ppc -mmacosx-version-min=10.3 \ | |
62 -L$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \ | |
63 -F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \ | |
64 -Wl,-syslibroot,$SDK_PATH/MacOSX10.3.9.sdk" | |
65 | |
66 fi # 10.2 or 10.3 SDK | |
33 | 67 |
34 # Intel configure flags (10.4 runtime compatibility) | 68 # Intel configure flags (10.4 runtime compatibility) |
35 # We dynamically load X11, so using the system X11 headers is fine. | 69 # We dynamically load X11, so using the system X11 headers is fine. |
36 CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \ | 70 CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \ |
37 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" | 71 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" |
40 CC_X86="gcc-4.0 -arch i386" | 74 CC_X86="gcc-4.0 -arch i386" |
41 CXX_X86="g++-4.0 -arch i386" | 75 CXX_X86="g++-4.0 -arch i386" |
42 CFLAGS_X86="-mmacosx-version-min=10.4" | 76 CFLAGS_X86="-mmacosx-version-min=10.4" |
43 CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \ | 77 CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \ |
44 -nostdinc \ | 78 -nostdinc \ |
45 -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \ | 79 -F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \ |
46 -I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include \ | 80 -I$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include \ |
47 -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include" | 81 -isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include" |
48 | 82 |
49 # Intel linker flags | 83 # Intel linker flags |
50 LFLAGS_X86="-arch i386 -mmacosx-version-min=10.4 \ | 84 LFLAGS_X86="-arch i386 -mmacosx-version-min=10.4 \ |
51 -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1 \ | 85 -L$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1 \ |
52 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" | 86 -Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk" |
53 | 87 |
54 # | 88 # |
55 # Find the configure script | 89 # Find the configure script |
56 # | 90 # |
57 srcdir=`dirname $0`/.. | 91 srcdir=`dirname $0`/.. |