Support both 10.2 and 10.3 PPC runtime SDK SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Sat, 29 Dec 2007 17:13:21 +0000
branchSDL-1.2
changeset 41161bc3d3b2cde1
parent 4115 63b57f6b6523
child 4117 dbb5f9556796
Support both 10.2 and 10.3 PPC runtime SDK
build-scripts/fatbuild.sh
     1.1 --- a/build-scripts/fatbuild.sh	Sat Dec 29 06:21:47 2007 +0000
     1.2 +++ b/build-scripts/fatbuild.sh	Sat Dec 29 17:13:21 2007 +0000
     1.3 @@ -10,26 +10,60 @@
     1.4  # Generic, cross-platform CFLAGS you always want go here.
     1.5  CFLAGS="-O3 -g -pipe"
     1.6  
     1.7 -# PowerPC configure flags (10.3 runtime compatibility)
     1.8 -# We dynamically load X11, so using the system X11 headers is fine.
     1.9 -CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    1.10 +# Locate Xcode SDK path
    1.11 +SDK_PATH=/Developer/SDKs
    1.12 +if [ ! -d $SDK_PATH ]; then
    1.13 +    echo "Couldn't find SDK path"
    1.14 +    exit 1
    1.15 +fi
    1.16 +
    1.17 +# See if we can use 10.2 or 10.3 runtime compatibility
    1.18 +if [ -d "$SDK_PATH/MacOSX10.2.8.sdk" ]; then
    1.19 +    # PowerPC configure flags (10.2 runtime compatibility)
    1.20 +    # We dynamically load X11, so using the system X11 headers is fine.
    1.21 +    CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    1.22  --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
    1.23  
    1.24 -# PowerPC compiler flags
    1.25 -CC_PPC="gcc-4.0 -arch ppc"
    1.26 -CXX_PPC="g++-4.0 -arch ppc"
    1.27 -CFLAGS_PPC=""
    1.28 -CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \
    1.29 +    # PowerPC compiler flags
    1.30 +    CC_PPC="gcc-3.3 -arch ppc"
    1.31 +    CXX_PPC="g++-3.3 -arch ppc"
    1.32 +    CFLAGS_PPC=""
    1.33 +    CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
    1.34  -nostdinc \
    1.35 --F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks \
    1.36 --I/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \
    1.37 --isystem /Developer/SDKs/MacOSX10.3.9.sdk/usr/include"
    1.38 +-F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \
    1.39 +-I$SDK_PATH/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
    1.40 +-isystem $SDK_PATH/MacOSX10.2.8.sdk/usr/include"
    1.41  
    1.42 -# PowerPC linker flags
    1.43 -LFLAGS_PPC="-arch ppc -mmacosx-version-min=10.3 \
    1.44 --L/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \
    1.45 --F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks \
    1.46 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk"
    1.47 +    # PowerPC linker flags 
    1.48 +    LFLAGS_PPC="-arch ppc \
    1.49 +-L$SDK_PATH/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
    1.50 +-F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \
    1.51 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.2.8.sdk"
    1.52 +
    1.53 +else # 10.2 or 10.3 SDK
    1.54 +
    1.55 +    # PowerPC configure flags (10.3 runtime compatibility)
    1.56 +    # We dynamically load X11, so using the system X11 headers is fine.
    1.57 +    CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    1.58 +--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
    1.59 +
    1.60 +    # PowerPC compiler flags
    1.61 +    CC_PPC="gcc-4.0 -arch ppc"
    1.62 +    CXX_PPC="g++-4.0 -arch ppc"
    1.63 +    CFLAGS_PPC=""
    1.64 +    CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \
    1.65 +-nostdinc \
    1.66 +-F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \
    1.67 +-I$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \
    1.68 +-isystem $SDK_PATH/MacOSX10.3.9.sdk/usr/include"
    1.69 +
    1.70 +    # PowerPC linker flags
    1.71 +    LFLAGS_PPC="-arch ppc -mmacosx-version-min=10.3 \
    1.72 +-L$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \
    1.73 +-F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \
    1.74 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.3.9.sdk"
    1.75 +
    1.76 +fi # 10.2 or 10.3 SDK
    1.77  
    1.78  # Intel configure flags (10.4 runtime compatibility)
    1.79  # We dynamically load X11, so using the system X11 headers is fine.
    1.80 @@ -42,14 +76,14 @@
    1.81  CFLAGS_X86="-mmacosx-version-min=10.4"
    1.82  CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    1.83  -nostdinc \
    1.84 --F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.85 --I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include \
    1.86 --isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
    1.87 +-F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.88 +-I$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include \
    1.89 +-isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include"
    1.90  
    1.91  # Intel linker flags
    1.92  LFLAGS_X86="-arch i386 -mmacosx-version-min=10.4 \
    1.93 --L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1 \
    1.94 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
    1.95 +-L$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1 \
    1.96 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk"
    1.97  
    1.98  #
    1.99  # Find the configure script