summaryrefslogtreecommitdiff
path: root/build-scripts/fatbuild.sh
diff options
context:
space:
mode:
authorRyan C. Gordon <icculus@icculus.org>2010-01-10 08:15:25 +0000
committerRyan C. Gordon <icculus@icculus.org>2010-01-10 08:15:25 +0000
commitb85e22a7e30242be0ff215698863ef19a92b8243 (patch)
tree1fa518ad5f7f47d19fa4880f502c549614c03496 /build-scripts/fatbuild.sh
parent59756ea1bf78e7b3fc26b752e40047f90477ad1f (diff)
Merge r5179:5180 from branches/SDL-1.2: fatbuild.sh Xcode 3.2 fix.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404380
Diffstat (limited to 'build-scripts/fatbuild.sh')
-rwxr-xr-xbuild-scripts/fatbuild.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/build-scripts/fatbuild.sh b/build-scripts/fatbuild.sh
index e71a6fe9..7d806b2d 100755
--- a/build-scripts/fatbuild.sh
+++ b/build-scripts/fatbuild.sh
@@ -63,6 +63,16 @@ CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \
CONFIG_X86="--build=`uname -p`-apple-darwin --host=i386-apple-darwin \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
+# They changed this to "darwin10" in Xcode 3.2 (Snow Leopard).
+GCCUSRPATH_X86="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1"
+if [ ! -d "$GCCUSRPATH" ]; then
+ GCCUSRPATH_X86="$SDK_PATH/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1"
+fi
+if [ ! -d "$GCCUSRPATH_X86" ]; then
+ echo "Couldn't find any GCC usr path for x86"
+ exit 1
+fi
+
# Intel 32-bit compiler flags
CC_X86="gcc-4.0 -arch i386"
CXX_X86="g++-4.0 -arch i386"
@@ -70,13 +80,13 @@ CFLAGS_X86="-mmacosx-version-min=10.4"
CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
-nostdinc \
-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
--I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1/include \
+-I$GCCUSRPATH_X86/include \
-isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
# Intel 32-bit linker flags
LFLAGS_X86="-arch i386 -Wl,-headerpad_max_install_names -mmacosx-version-min=10.4 \
-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
--L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin10/4.0.1 \
+-L$GCCUSRPATH_X86 \
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
# Intel 64-bit configure flags (10.5 runtime compatibility)