Reverted accidental commit. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Sun, 17 Jan 2010 05:19:32 +0000
branchSDL-1.2
changeset 4397fb1fc6c9289e
parent 4396 f5d3f7fa071d
child 4398 fe15c4e8efe6
Reverted accidental commit.
build-scripts/fatbuild.sh
     1.1 --- a/build-scripts/fatbuild.sh	Sun Jan 17 05:17:59 2010 +0000
     1.2 +++ b/build-scripts/fatbuild.sh	Sun Jan 17 05:19:32 2010 +0000
     1.3 @@ -5,98 +5,96 @@
     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 32-bit configure flags (10.4 runtime compatibility)
    1.13 -# We dynamically load X11, so using the system X11 headers is fine.
    1.14 -CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    1.15 +# Locate Xcode SDK path
    1.16 +SDK_PATH=/Developer/SDKs
    1.17 +if [ ! -d $SDK_PATH ]; then
    1.18 +    echo "Couldn't find SDK path"
    1.19 +    exit 1
    1.20 +fi
    1.21 +
    1.22 +# See if we can use 10.2 or 10.3 runtime compatibility
    1.23 +if [ -d "$SDK_PATH/MacOSX10.2.8.sdk" ]; then
    1.24 +    # PowerPC configure flags (10.2 runtime compatibility)
    1.25 +    # We dynamically load X11, so using the system X11 headers is fine.
    1.26 +    CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    1.27  --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
    1.28  
    1.29 -# PowerPC 32-bit compiler flags
    1.30 -CC_PPC="gcc-4.0 -arch ppc"
    1.31 -CXX_PPC="g++-4.0 -arch ppc"
    1.32 -CFLAGS_PPC="-mmacosx-version-min=10.4"
    1.33 -CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    1.34 +    # PowerPC compiler flags
    1.35 +    CC_PPC="gcc-3.3 -arch ppc"
    1.36 +    CXX_PPC="g++-3.3 -arch ppc"
    1.37 +    CFLAGS_PPC=""
    1.38 +    CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
    1.39  -nostdinc \
    1.40 --F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.41 --I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \
    1.42 --isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
    1.43 +-F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \
    1.44 +-I$SDK_PATH/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
    1.45 +-isystem $SDK_PATH/MacOSX10.2.8.sdk/usr/include"
    1.46  
    1.47 -# PowerPC 32-bit linker flags
    1.48 -LFLAGS_PPC="-arch ppc -mmacosx-version-min=10.4 \
    1.49 --F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.50 --L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1 \
    1.51 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
    1.52 +    # PowerPC linker flags 
    1.53 +    LFLAGS_PPC="-Wl,-headerpad_max_install_names -arch ppc \
    1.54 +-L$SDK_PATH/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
    1.55 +-F$SDK_PATH/MacOSX10.2.8.sdk/System/Library/Frameworks \
    1.56 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.2.8.sdk"
    1.57  
    1.58 -# PowerPC 64-bit configure flags (10.5 runtime compatibility)
    1.59 -# We dynamically load X11, so using the system X11 headers is fine.
    1.60 -CONFIG_PPC64="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    1.61 +else # 10.2 or 10.3 SDK
    1.62 +
    1.63 +    # PowerPC configure flags (10.3 runtime compatibility)
    1.64 +    # We dynamically load X11, so using the system X11 headers is fine.
    1.65 +    CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    1.66  --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
    1.67  
    1.68 -# PowerPC 64-bit compiler flags
    1.69 -CC_PPC64="gcc-4.0 -arch ppc64"
    1.70 -CXX_PPC64="g++-4.0 -arch ppc64"
    1.71 -CFLAGS_PPC64="-mmacosx-version-min=10.5"
    1.72 -CPPFLAGS_PPC64="-DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
    1.73 +    # PowerPC compiler flags
    1.74 +    CC_PPC="gcc-4.0 -arch ppc"
    1.75 +    CXX_PPC="g++-4.0 -arch ppc"
    1.76 +    CFLAGS_PPC=""
    1.77 +    CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \
    1.78  -nostdinc \
    1.79 --F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks \
    1.80 --I/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include \
    1.81 --isystem /Developer/SDKs/MacOSX10.5.sdk/usr/include"
    1.82 +-F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \
    1.83 +-I$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \
    1.84 +-isystem $SDK_PATH/MacOSX10.3.9.sdk/usr/include"
    1.85  
    1.86 -# PowerPC 64-bit linker flags
    1.87 -LFLAGS_PPC64="-arch ppc64 -mmacosx-version-min=10.5 \
    1.88 --F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks \
    1.89 --L/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/ppc64 \
    1.90 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk"
    1.91 +    # PowerPC linker flags
    1.92 +    LFLAGS_PPC="-Wl,-headerpad_max_install_names -arch ppc -mmacosx-version-min=10.3 \
    1.93 +-L$SDK_PATH/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \
    1.94 +-F$SDK_PATH/MacOSX10.3.9.sdk/System/Library/Frameworks \
    1.95 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.3.9.sdk"
    1.96  
    1.97 -# Intel 32-bit configure flags (10.4 runtime compatibility)
    1.98 +fi # 10.2 or 10.3 SDK
    1.99 +
   1.100 +# Intel configure flags (10.4 runtime compatibility)
   1.101  # We dynamically load X11, so using the system X11 headers is fine.
   1.102  CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \
   1.103  --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
   1.104  
   1.105 -# Intel 32-bit configure flags (10.4 runtime compatibility)
   1.106 -# We dynamically load X11, so using the system X11 headers is fine.
   1.107 -CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \
   1.108 ---x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
   1.109 +# They changed this to "darwin10" in Xcode 3.2 (Snow Leopard).
   1.110 +GCCUSRPATH="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1"
   1.111 +if [ ! -d "$GCCUSRPATH" ]; then
   1.112 +    GCCUSRPATH="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1"
   1.113 +fi
   1.114  
   1.115 -# Intel 32-bit compiler flags
   1.116 +if [ ! -d "$GCCUSRPATH" ]; then
   1.117 +    echo "Couldn't find any GCC usr path"
   1.118 +    exit 1
   1.119 +fi
   1.120 +
   1.121 +# Intel compiler flags
   1.122  CC_X86="gcc-4.0 -arch i386"
   1.123  CXX_X86="g++-4.0 -arch i386"
   1.124  CFLAGS_X86="-mmacosx-version-min=10.4"
   1.125  CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
   1.126  -nostdinc \
   1.127 --F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
   1.128 --I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/include \
   1.129 --isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
   1.130 -
   1.131 -# Intel 32-bit linker flags
   1.132 -LFLAGS_X86="-arch i386 -mmacosx-version-min=10.4 \
   1.133 --F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
   1.134 --L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1 \
   1.135 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
   1.136 -
   1.137 -# Intel 64-bit configure flags (10.5 runtime compatibility)
   1.138 -# We dynamically load X11, so using the system X11 headers is fine.
   1.139 -CONFIG_X64="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \
   1.140 ---x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
   1.141 +-F$SDK_PATH/MacOSX10.4u.sdk/System/Library/Frameworks \
   1.142 +-I$GCCUSRPATH/include \
   1.143 +-isystem $SDK_PATH/MacOSX10.4u.sdk/usr/include"
   1.144  
   1.145 -# Intel 64-bit compiler flags
   1.146 -CC_X64="gcc-4.0 -arch x86_64"
   1.147 -CXX_X64="g++-4.0 -arch x86_64"
   1.148 -CFLAGS_X64="-mmacosx-version-min=10.5"
   1.149 -CPPFLAGS_X64="-DMAC_OS_X_VERSION_MIN_REQUIRED=1050 \
   1.150 --nostdinc \
   1.151 --F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks \
   1.152 --I/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/include \
   1.153 --isystem /Developer/SDKs/MacOSX10.5.sdk/usr/include"
   1.154 -
   1.155 -# Intel 64-bit linker flags
   1.156 -LFLAGS_X64="-arch x86_64 -mmacosx-version-min=10.5 \
   1.157 --F/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks \
   1.158 --L/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/x86_64 \
   1.159 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk"
   1.160 +# Intel linker flags
   1.161 +LFLAGS_X86="-Wl,-headerpad_max_install_names -arch i386 -mmacosx-version-min=10.4 \
   1.162 +-L$GCCUSRPATH \
   1.163 +-Wl,-syslibroot,$SDK_PATH/MacOSX10.4u.sdk"
   1.164  
   1.165  #
   1.166  # Find the configure script
   1.167 @@ -108,8 +106,8 @@
   1.168  #
   1.169  # Figure out which phase to build:
   1.170  # all,
   1.171 -# configure, configure-ppc, configure-ppc64, configure-x86, configure-x64
   1.172 -# make, make-ppc, make-ppc64, make-x86, make-x64, merge
   1.173 +# configure, configure-ppc, configure-x86,
   1.174 +# make, make-ppc, make-x86, merge
   1.175  # install
   1.176  # clean
   1.177  if test x"$1" = x; then
   1.178 @@ -120,52 +118,32 @@
   1.179  case $phase in
   1.180      all)
   1.181          configure_ppc="yes"
   1.182 -        #configure_ppc64="yes"
   1.183          configure_x86="yes"
   1.184 -        configure_x64="yes"
   1.185          make_ppc="yes"
   1.186 -        #make_ppc64="yes"
   1.187          make_x86="yes"
   1.188 -        make_x64="yes"
   1.189          merge="yes"
   1.190          ;;
   1.191      configure)
   1.192          configure_ppc="yes"
   1.193 -        configure_ppc64="yes"
   1.194          configure_x86="yes"
   1.195 -        configure_x64="yes"
   1.196          ;;
   1.197      configure-ppc)
   1.198          configure_ppc="yes"
   1.199          ;;
   1.200 -    configure-ppc64)
   1.201 -        configure_ppc64="yes"
   1.202 -        ;;
   1.203      configure-x86)
   1.204          configure_x86="yes"
   1.205          ;;
   1.206 -    configure-x64)
   1.207 -        configure_x64="yes"
   1.208 -        ;;
   1.209      make)
   1.210          make_ppc="yes"
   1.211 -        make_ppc64="yes"
   1.212          make_x86="yes"
   1.213 -        make_x64="yes"
   1.214          merge="yes"
   1.215          ;;
   1.216      make-ppc)
   1.217          make_ppc="yes"
   1.218          ;;
   1.219 -    make-ppc64)
   1.220 -        make_ppc64="yes"
   1.221 -        ;;
   1.222      make-x86)
   1.223          make_x86="yes"
   1.224          ;;
   1.225 -    make-x64)
   1.226 -        make_x64="yes"
   1.227 -        ;;
   1.228      merge)
   1.229          merge="yes"
   1.230          ;;
   1.231 @@ -193,24 +171,16 @@
   1.232          ;;
   1.233      clean)
   1.234          clean_ppc="yes"
   1.235 -        clean_ppc64="yes"
   1.236          clean_x86="yes"
   1.237 -        clean_x64="yes"
   1.238          ;;
   1.239      clean-ppc)
   1.240          clean_ppc="yes"
   1.241          ;;
   1.242 -    clean-ppc64)
   1.243 -        clean_ppc64="yes"
   1.244 -        ;;
   1.245      clean-x86)
   1.246          clean_x86="yes"
   1.247          ;;
   1.248 -    clean-x64)
   1.249 -        clean_x64="yes"
   1.250 -        ;;
   1.251      *)
   1.252 -        echo "Usage: $0 [all|configure[-ppc|-ppc64|-x86|-x64]|make[-ppc|-ppc64|-x86|-x64]|merge|install|clean[-ppc|-ppc64|-x86|-x64]]"
   1.253 +        echo "Usage: $0 [all|configure[-ppc|-x86]|make[-ppc|-x86]|merge|install|clean]"
   1.254          exit 1
   1.255          ;;
   1.256  esac
   1.257 @@ -218,15 +188,9 @@
   1.258      powerpc)
   1.259          native_path=ppc
   1.260          ;;
   1.261 -    powerpc64)
   1.262 -        native_path=ppc64
   1.263 -        ;;
   1.264      *86)
   1.265          native_path=x86
   1.266          ;;
   1.267 -    x86_64)
   1.268 -        native_path=x64
   1.269 -        ;;
   1.270      *)
   1.271          echo "Couldn't figure out native architecture path"
   1.272          exit 1
   1.273 @@ -236,7 +200,7 @@
   1.274  #
   1.275  # Create the build directories
   1.276  #
   1.277 -for dir in build build/ppc build/ppc64 build/x86 build/x64; do
   1.278 +for dir in build build/ppc build/x86; do
   1.279      if test -d $dir; then
   1.280          :
   1.281      else
   1.282 @@ -245,7 +209,7 @@
   1.283  done
   1.284  
   1.285  #
   1.286 -# Build the PowerPC 32-bit binary
   1.287 +# Build the PowerPC binary
   1.288  #
   1.289  if test x$configure_ppc = xyes; then
   1.290      (cd build/ppc && \
   1.291 @@ -256,18 +220,7 @@
   1.292  fi
   1.293  
   1.294  #
   1.295 -# Build the PowerPC 64-bit binary
   1.296 -#
   1.297 -if test x$configure_ppc64 = xyes; then
   1.298 -    (cd build/ppc64 && \
   1.299 -     sh ../../configure $CONFIG_PPC64 CC="$CC_PPC64" CXX="$CXX_PPC64" CFLAGS="$CFLAGS $CFLAGS_PPC64" CPPFLAGS="$CPPFLAGS_PPC64" LDFLAGS="$LFLAGS_PPC64") || exit 2
   1.300 -fi
   1.301 -if test x$make_ppc64 = xyes; then
   1.302 -    (cd build/ppc64 && ls include && make -j$NJOB) || exit 3
   1.303 -fi
   1.304 -
   1.305 -#
   1.306 -# Build the Intel 32-bit binary
   1.307 +# Build the Intel binary
   1.308  #
   1.309  if test x$configure_x86 = xyes; then
   1.310      (cd build/x86 && \
   1.311 @@ -278,25 +231,15 @@
   1.312  fi
   1.313  
   1.314  #
   1.315 -# Build the Intel 32-bit binary
   1.316 -#
   1.317 -if test x$configure_x64 = xyes; then
   1.318 -    (cd build/x64 && \
   1.319 -     sh ../../configure $CONFIG_X64 CC="$CC_X64" CXX="$CXX_X64" CFLAGS="$CFLAGS $CFLAGS_X64" CPPFLAGS="$CPPFLAGS_X64" LDFLAGS="$LFLAGS_X64") || exit 2
   1.320 -fi
   1.321 -if test x$make_x64 = xyes; then
   1.322 -    (cd build/x64 && make -j$NJOB) || exit 3
   1.323 -fi
   1.324 -
   1.325 -#
   1.326  # Combine into fat binary
   1.327  #
   1.328  if test x$merge = xyes; then
   1.329      output=.libs
   1.330      sh $auxdir/mkinstalldirs build/$output
   1.331      cd build
   1.332 -    target=`find . -mindepth 4 -maxdepth 4 -type f -name '*.dylib' | head -1 | sed 's|.*/||'`
   1.333 -    (lipo -create -o $output/$target `find . -mindepth 4 -maxdepth 4 -type f -name "*.dylib"` &&
   1.334 +    target=`find . -mindepth 3 -type f -name '*.dylib' | head -1 | sed 's|.*/||'`
   1.335 +    (lipo -create -o $output/$target `find . -mindepth 3 -type f -name "*.dylib"` &&
   1.336 +     ln -sf $target $output/libSDL-1.2.0.dylib &&
   1.337       ln -sf $target $output/libSDL.dylib &&
   1.338       lipo -create -o $output/libSDL.a */build/.libs/libSDL.a &&
   1.339       cp $native_path/build/.libs/libSDL.la $output &&