Mercurial > sdl-ios-xcode
comparison build-scripts/fatbuild.sh @ 3245:d984d5bb17e9
Updated fatbuild.sh to build for 10.4u SDK
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 05 Sep 2009 09:51:39 +0000 |
parents | ff3b47d22a6d |
children | cde30895105d |
comparison
equal
deleted
inserted
replaced
3244:7c73d5b5a0d6 | 3245:d984d5bb17e9 |
---|---|
3 # Build a fat binary on Mac OS X, thanks Ryan! | 3 # Build a fat binary on Mac OS X, thanks Ryan! |
4 | 4 |
5 # Number of CPUs (for make -j) | 5 # Number of CPUs (for make -j) |
6 NCPU=`sysctl -n hw.ncpu` | 6 NCPU=`sysctl -n hw.ncpu` |
7 NJOB=$NCPU | 7 NJOB=$NCPU |
8 #NJOB=`expr $NCPU + 1` | |
9 | 8 |
10 # Generic, cross-platform CFLAGS you always want go here. | 9 # Generic, cross-platform CFLAGS you always want go here. |
11 CFLAGS="-O3 -g -pipe" | 10 CFLAGS="-O3 -g -pipe" |
12 | 11 |
13 # PowerPC configure flags (10.3 runtime compatibility) | 12 # PowerPC configure flags (10.4 runtime compatibility) |
14 # We dynamically load X11, so using the system X11 headers is fine. | 13 # We dynamically load X11, so using the system X11 headers is fine. |
15 CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \ | 14 CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \ |
16 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" | 15 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" |
17 | 16 |
18 # PowerPC compiler flags | 17 # PowerPC compiler flags |
19 CC_PPC="gcc-4.0 -arch ppc" | 18 CC_PPC="gcc-4.0 -arch ppc" |
20 CXX_PPC="g++-4.0 -arch ppc" | 19 CXX_PPC="g++-4.0 -arch ppc" |
21 CFLAGS_PPC="" | 20 CFLAGS_PPC="" |
22 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \ | 21 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \ |
23 -nostdinc \ | 22 -nostdinc \ |
24 -F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks \ | 23 -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \ |
25 -I/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \ | 24 -I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \ |
26 -isystem /Developer/SDKs/MacOSX10.3.9.sdk/usr/include" | 25 -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include" |
27 | 26 |
28 # PowerPC linker flags | 27 # PowerPC linker flags |
29 LFLAGS_PPC="-arch ppc -mmacosx-version-min=10.3 \ | 28 LFLAGS_PPC="-arch ppc -mmacosx-version-min=10.3 \ |
30 -L/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \ | 29 -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \ |
31 -F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks \ | 30 -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1 \ |
32 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk" | 31 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" |
33 | 32 |
34 # Intel configure flags (10.4 runtime compatibility) | 33 # Intel configure flags (10.4 runtime compatibility) |
35 # We dynamically load X11, so using the system X11 headers is fine. | 34 # We dynamically load X11, so using the system X11 headers is fine. |
36 CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \ | 35 CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \ |
37 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" | 36 --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib" |
41 CXX_X86="g++-4.0 -arch i386" | 40 CXX_X86="g++-4.0 -arch i386" |
42 CFLAGS_X86="-mmacosx-version-min=10.4" | 41 CFLAGS_X86="-mmacosx-version-min=10.4" |
43 CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \ | 42 CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \ |
44 -nostdinc \ | 43 -nostdinc \ |
45 -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \ | 44 -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \ |
46 -I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include \ | 45 -I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/include \ |
47 -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include" | 46 -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include" |
48 | 47 |
49 # Intel linker flags | 48 # Intel linker flags |
50 LFLAGS_X86="-arch i386 -mmacosx-version-min=10.4 \ | 49 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 \ | 50 -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \ |
51 -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1 \ | |
52 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" | 52 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk" |
53 | 53 |
54 # | 54 # |
55 # Find the configure script | 55 # Find the configure script |
56 # | 56 # |
190 # | 190 # |
191 if test x$merge = xyes; then | 191 if test x$merge = xyes; then |
192 output=.libs | 192 output=.libs |
193 sh $auxdir/mkinstalldirs build/$output | 193 sh $auxdir/mkinstalldirs build/$output |
194 cd build | 194 cd build |
195 target=`find . -mindepth 3 -type f -name '*.dylib' | head -1 | sed 's|.*/||'` | 195 target=`find . -mindepth 4 -maxdepth 4 -type f -name '*.dylib' | head -1 | sed 's|.*/||'` |
196 (lipo -create -o $output/$target `find . -mindepth 3 -type f -name "*.dylib"` && | 196 (lipo -create -o $output/$target `find . -mindepth 4 -maxdepth 4 -type f -name "*.dylib"` && |
197 ln -sf $target $output/libSDL-1.2.0.dylib && | |
198 ln -sf $target $output/libSDL.dylib && | 197 ln -sf $target $output/libSDL.dylib && |
199 lipo -create -o $output/libSDL.a */build/.libs/libSDL.a && | 198 lipo -create -o $output/libSDL.a */build/.libs/libSDL.a && |
200 cp $native_path/build/.libs/libSDL.la $output && | 199 cp $native_path/build/.libs/libSDL.la $output && |
201 cp $native_path/build/.libs/libSDL.lai $output && | 200 cp $native_path/build/.libs/libSDL.lai $output && |
202 cp $native_path/build/libSDL.la . && | 201 cp $native_path/build/libSDL.la . && |