Updated gcc-fat.sh to build on Mac OS X 10.5 SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Mon, 31 Dec 2007 00:03:33 +0000
branchSDL-1.2
changeset 41276cb18cf1777e
parent 4126 19bfebb38b21
child 4128 b74570c53159
Updated gcc-fat.sh to build on Mac OS X 10.5
test/gcc-fat.sh
     1.1 --- a/test/gcc-fat.sh	Sun Dec 30 21:50:41 2007 +0000
     1.2 +++ b/test/gcc-fat.sh	Mon Dec 31 00:03:33 2007 +0000
     1.3 @@ -4,30 +4,54 @@
     1.4  #
     1.5  # Usage: ./configure CC="sh gcc-fat.sh" && make && rm -rf ppc x86
     1.6  
     1.7 -# PowerPC compiler flags (10.2 runtime compatibility)
     1.8 -GCC_COMPILE_PPC="gcc-3.3 -arch ppc \
     1.9 +# Locate Xcode SDK path
    1.10 +SDK_PATH=/Developer/SDKs
    1.11 +if [ ! -d $SDK_PATH ]; then
    1.12 +    echo "Couldn't find SDK path"
    1.13 +    exit 1
    1.14 +fi
    1.15 +
    1.16 +if [ -d "$SDK_PATH/MacOSX10.2.8.sdk" ]; then
    1.17 +    # PowerPC compiler flags (10.2 runtime compatibility)
    1.18 +    GCC_COMPILE_PPC="gcc-3.3 -arch ppc \
    1.19  -DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
    1.20  -nostdinc \
    1.21 --F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
    1.22 --I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
    1.23 --isystem /Developer/SDKs/MacOSX10.2.8.sdk/usr/include"
    1.24 +-F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \
    1.25 +-I$SDK_PATH/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
    1.26 +-isystem $SDK_PATH/MacOSX10.2.8.sdk/usr/include"
    1.27  
    1.28 -GCC_LINK_PPC="\
    1.29 --L/Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
    1.30 --F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
    1.31 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk"
    1.32 +    GCC_LINK_PPC="\
    1.33 +-L$SDK_PATH/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
    1.34 +-F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \
    1.35 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.2.8.sdk"
    1.36 +
    1.37 +else # 10.2 or 10.3 SDK
    1.38 +    # PowerPC compiler flags (10.3 runtime compatibility)
    1.39 +    GCC_COMPILE_PPC="gcc-4.0 -arch ppc -mmacosx-version-min=10.3 \
    1.40 +-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \
    1.41 +-nostdinc \
    1.42 +-F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \
    1.43 +-I$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \
    1.44 +-isystem $SDK_PATH/MacOSX10.3.9.sdk/usr/include"
    1.45 +
    1.46 +    GCC_LINK_PPC="\
    1.47 +-L$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \
    1.48 +-F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \
    1.49 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.3.9.sdk"
    1.50 +
    1.51 +fi # 10.2 or 10.3 SDK
    1.52  
    1.53  # Intel compiler flags (10.4 runtime compatibility)
    1.54  GCC_COMPILE_X86="gcc-4.0 -arch i386 -mmacosx-version-min=10.4 \
    1.55  -DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    1.56  -nostdinc \
    1.57 --F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.58 --I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include \
    1.59 --isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
    1.60 +-F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.61 +-I$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include \
    1.62 +-isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include"
    1.63  
    1.64  GCC_LINK_X86="\
    1.65 --L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.0 \
    1.66 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
    1.67 +-L$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1 \
    1.68 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk"
    1.69  
    1.70  # Output both PowerPC and Intel object files
    1.71  args="$*"