Allow the SDK path to be rebased
authorSam Lantinga
Wed, 01 Dec 2010 12:22:29 -0800
changeset 4924455c0dad84df
parent 4923 1002d074d459
child 4925 514f811a4887
Allow the SDK path to be rebased
Fixed bug compiling on Mac OS X 10.5
build-scripts/fatbuild.sh
     1.1 --- a/build-scripts/fatbuild.sh	Wed Dec 01 12:17:12 2010 -0800
     1.2 +++ b/build-scripts/fatbuild.sh	Wed Dec 01 12:22:29 2010 -0800
     1.3 @@ -8,6 +8,11 @@
     1.4      NJOB=$NCPU
     1.5  fi
     1.6  
     1.7 +# SDK path
     1.8 +if test x$SDK_PATH = x; then
     1.9 +    SDK_PATH=/Developer/SDKs
    1.10 +fi
    1.11 +
    1.12  # Generic, cross-platform CFLAGS you always want go here.
    1.13  CFLAGS="-O3 -g -pipe"
    1.14  
    1.15 @@ -22,15 +27,15 @@
    1.16  CFLAGS_PPC="-mmacosx-version-min=10.4"
    1.17  CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    1.18  -nostdinc \
    1.19 --F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.20 --I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \
    1.21 --isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
    1.22 +-F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.23 +-I$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \
    1.24 +-isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include"
    1.25  
    1.26  # PowerPC 32-bit linker flags
    1.27  LFLAGS_PPC="-arch ppc -Wl,-headerpad_max_install_names -mmacosx-version-min=10.4 \
    1.28 --F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.29 --L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1 \
    1.30 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
    1.31 +-F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.32 +-L$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1 \
    1.33 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk"
    1.34  
    1.35  # PowerPC 64-bit configure flags (10.5 runtime compatibility)
    1.36  # We dynamically load X11, so using the system X11 headers is fine.
    1.37 @@ -43,15 +48,15 @@
    1.38  CFLAGS_PPC64="-mmacosx-version-min=10.5"
    1.39  CPPFLAGS_PPC64="-DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
    1.40  -nostdinc \
    1.41 --F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks \
    1.42 --I/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \
    1.43 --isystem /Developer/SDKs/MacOSX10.5.sdk/usr/include"
    1.44 +-F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \
    1.45 +-I$SDK_PATH/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \
    1.46 +-isystem $SDK_PATH/MacOSX10.5.sdk/usr/include"
    1.47  
    1.48  # PowerPC 64-bit linker flags
    1.49  LFLAGS_PPC64="-arch ppc64 -Wl,-headerpad_max_install_names -mmacosx-version-min=10.5 \
    1.50 --F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks \
    1.51 --L/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/ppc64 \
    1.52 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk"
    1.53 +-F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \
    1.54 +-L$SDK_PATH/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/ppc64 \
    1.55 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.5.sdk"
    1.56  
    1.57  # Intel 32-bit configure flags (10.4 runtime compatibility)
    1.58  # We dynamically load X11, so using the system X11 headers is fine.
    1.59 @@ -65,7 +70,7 @@
    1.60  
    1.61  # They changed this to "darwin10" in Xcode 3.2 (Snow Leopard).
    1.62  GCCUSRPATH_X86="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1"
    1.63 -if [ ! -d "$GCCUSRPATH" ]; then
    1.64 +if [ ! -d "$GCCUSRPATH_X86" ]; then
    1.65      GCCUSRPATH_X86="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1"
    1.66  fi
    1.67  if [ ! -d "$GCCUSRPATH_X86" ]; then
    1.68 @@ -79,15 +84,15 @@
    1.69  CFLAGS_X86="-mmacosx-version-min=10.4"
    1.70  CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    1.71  -nostdinc \
    1.72 --F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.73 +-F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.74  -I$GCCUSRPATH_X86/include \
    1.75 --isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
    1.76 +-isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include"
    1.77  
    1.78  # Intel 32-bit linker flags
    1.79  LFLAGS_X86="-arch i386 -Wl,-headerpad_max_install_names -mmacosx-version-min=10.4 \
    1.80 --F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.81 +-F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.82  -L$GCCUSRPATH_X86 \
    1.83 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
    1.84 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk"
    1.85  
    1.86  # Intel 64-bit configure flags (10.5 runtime compatibility)
    1.87  # We dynamically load X11, so using the system X11 headers is fine.
    1.88 @@ -100,15 +105,15 @@
    1.89  CFLAGS_X64="-mmacosx-version-min=10.5"
    1.90  CPPFLAGS_X64="-DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
    1.91  -nostdinc \
    1.92 --F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks \
    1.93 --I/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/include \
    1.94 --isystem /Developer/SDKs/MacOSX10.5.sdk/usr/include"
    1.95 +-F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \
    1.96 +-I$SDK_PATH/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/include \
    1.97 +-isystem $SDK_PATH/MacOSX10.5.sdk/usr/include"
    1.98  
    1.99  # Intel 64-bit linker flags
   1.100  LFLAGS_X64="-arch x86_64 -Wl,-headerpad_max_install_names -mmacosx-version-min=10.5 \
   1.101 --F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks \
   1.102 --L/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/x86_64 \
   1.103 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk"
   1.104 +-F$SDK_PATH/MacOSX10.5.sdk/System/Library/Frameworks \
   1.105 +-L$SDK_PATH/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/x86_64 \
   1.106 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.5.sdk"
   1.107  
   1.108  #
   1.109  # Find the configure script