Updated fatbuild.sh to build for 10.4u SDK
authorSam Lantinga <slouken@libsdl.org>
Sat, 05 Sep 2009 09:51:39 +0000
changeset 3245d984d5bb17e9
parent 3244 7c73d5b5a0d6
child 3246 c843261f74a4
Updated fatbuild.sh to build for 10.4u SDK
build-scripts/fatbuild.sh
     1.1 --- a/build-scripts/fatbuild.sh	Sat Sep 05 09:12:03 2009 +0000
     1.2 +++ b/build-scripts/fatbuild.sh	Sat Sep 05 09:51:39 2009 +0000
     1.3 @@ -5,12 +5,11 @@
     1.4  # Number of CPUs (for make -j)
     1.5  NCPU=`sysctl -n hw.ncpu`
     1.6  NJOB=$NCPU
     1.7 -#NJOB=`expr $NCPU + 1`
     1.8  
     1.9  # Generic, cross-platform CFLAGS you always want go here.
    1.10  CFLAGS="-O3 -g -pipe"
    1.11  
    1.12 -# PowerPC configure flags (10.3 runtime compatibility)
    1.13 +# PowerPC configure flags (10.4 runtime compatibility)
    1.14  # We dynamically load X11, so using the system X11 headers is fine.
    1.15  CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    1.16  --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
    1.17 @@ -19,17 +18,17 @@
    1.18  CC_PPC="gcc-4.0 -arch ppc"
    1.19  CXX_PPC="g++-4.0 -arch ppc"
    1.20  CFLAGS_PPC=""
    1.21 -CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \
    1.22 +CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    1.23  -nostdinc \
    1.24 --F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks \
    1.25 --I/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \
    1.26 --isystem /Developer/SDKs/MacOSX10.3.9.sdk/usr/include"
    1.27 +-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.28 +-I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \
    1.29 +-isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
    1.30  
    1.31  # PowerPC linker flags
    1.32  LFLAGS_PPC="-arch ppc -mmacosx-version-min=10.3 \
    1.33 --L/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \
    1.34 --F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks \
    1.35 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk"
    1.36 +-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.37 +-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1 \
    1.38 +-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
    1.39  
    1.40  # Intel configure flags (10.4 runtime compatibility)
    1.41  # We dynamically load X11, so using the system X11 headers is fine.
    1.42 @@ -43,12 +42,13 @@
    1.43  CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    1.44  -nostdinc \
    1.45  -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.46 --I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include \
    1.47 +-I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/include \
    1.48  -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
    1.49  
    1.50  # Intel linker flags
    1.51  LFLAGS_X86="-arch i386 -mmacosx-version-min=10.4 \
    1.52 --L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1 \
    1.53 +-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.54 +-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1 \
    1.55  -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
    1.56  
    1.57  #
    1.58 @@ -192,9 +192,8 @@
    1.59      output=.libs
    1.60      sh $auxdir/mkinstalldirs build/$output
    1.61      cd build
    1.62 -    target=`find . -mindepth 3 -type f -name '*.dylib' | head -1 | sed 's|.*/||'`
    1.63 -    (lipo -create -o $output/$target `find . -mindepth 3 -type f -name "*.dylib"` &&
    1.64 -     ln -sf $target $output/libSDL-1.2.0.dylib &&
    1.65 +    target=`find . -mindepth 4 -maxdepth 4 -type f -name '*.dylib' | head -1 | sed 's|.*/||'`
    1.66 +    (lipo -create -o $output/$target `find . -mindepth 4 -maxdepth 4 -type f -name "*.dylib"` &&
    1.67       ln -sf $target $output/libSDL.dylib &&
    1.68       lipo -create -o $output/libSDL.a */build/.libs/libSDL.a &&
    1.69       cp $native_path/build/.libs/libSDL.la $output &&