comparison build-scripts/fatbuild.sh @ 1743:70a4d819e95e

Future proof C++ code
author Sam Lantinga <slouken@libsdl.org>
date Fri, 28 Apr 2006 05:43:58 +0000
parents af4352da64d8
children 7f39af143e38
comparison
equal deleted inserted replaced
1742:af4352da64d8 1743:70a4d819e95e
9 # Generic, cross-platform CFLAGS you always want go here. 9 # Generic, cross-platform CFLAGS you always want go here.
10 CFLAGS="-O3 -g -pipe" 10 CFLAGS="-O3 -g -pipe"
11 11
12 # PowerPC compiler flags (10.2 runtime compatibility) 12 # PowerPC compiler flags (10.2 runtime compatibility)
13 CC_PPC="gcc-3.3 -arch ppc" 13 CC_PPC="gcc-3.3 -arch ppc"
14 CXX_PPC="g++-3.3 -arch ppc"
14 CFLAGS_PPC="" 15 CFLAGS_PPC=""
15 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \ 16 CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
16 -nostdinc \ 17 -nostdinc \
17 -F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \ 18 -F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
18 -I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \ 19 -I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
24 -F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \ 25 -F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
25 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk" 26 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk"
26 27
27 # Intel compiler flags (10.4 runtime compatibility) 28 # Intel compiler flags (10.4 runtime compatibility)
28 CC_X86="gcc-4.0 -arch i386" 29 CC_X86="gcc-4.0 -arch i386"
30 CXX_X86="g++-4.0 -arch i386"
29 CFLAGS_X86="-mmacosx-version-min=10.4" 31 CFLAGS_X86="-mmacosx-version-min=10.4"
30 CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \ 32 CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
31 -nostdinc \ 33 -nostdinc \
32 -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \ 34 -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
33 -I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include \ 35 -I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include \
153 # 155 #
154 # Build the PowerPC binary 156 # Build the PowerPC binary
155 # 157 #
156 if test x$configure_ppc = xyes; then 158 if test x$configure_ppc = xyes; then
157 (cd build/ppc && \ 159 (cd build/ppc && \
158 sh ../../configure --build=`uname -p`-apple-darwin --host=powerpc-apple-darwin CC="$CC_PPC" CFLAGS="$CFLAGS $CFLAGS_PPC" CPPFLAGS="$CPPFLAGS_PPC" LDFLAGS="$LFLAGS_PPC") || exit 2 160 sh ../../configure --build=`uname -p`-apple-darwin --host=powerpc-apple-darwin CC="$CC_PPC" CXX="$CXX_PPC" CFLAGS="$CFLAGS $CFLAGS_PPC" CPPFLAGS="$CPPFLAGS_PPC" LDFLAGS="$LFLAGS_PPC") || exit 2
159 fi 161 fi
160 if test x$make_ppc = xyes; then 162 if test x$make_ppc = xyes; then
161 (cd build/ppc && ls include && make -j$NJOB) || exit 3 163 (cd build/ppc && ls include && make -j$NJOB) || exit 3
162 fi 164 fi
163 165
164 # 166 #
165 # Build the Intel binary 167 # Build the Intel binary
166 # 168 #
167 if test x$configure_x86 = xyes; then 169 if test x$configure_x86 = xyes; then
168 (cd build/x86 && \ 170 (cd build/x86 && \
169 sh ../../configure --build=`uname -p`-apple-darwin --host=i386-apple-darwin CC="$CC_X86" CFLAGS="$CFLAGS $CFLAGS_X86" CPPFLAGS="$CPPFLAGS_X86" LDFLAGS="$LFLAGS_X86") || exit 2 171 sh ../../configure --build=`uname -p`-apple-darwin --host=i386-apple-darwin CC="$CC_X86" CXX="$CXX_X86" CFLAGS="$CFLAGS $CFLAGS_X86" CPPFLAGS="$CPPFLAGS_X86" LDFLAGS="$LFLAGS_X86") || exit 2
170 fi 172 fi
171 if test x$make_x86 = xyes; then 173 if test x$make_x86 = xyes; then
172 (cd build/x86 && make -j$NJOB) || exit 3 174 (cd build/x86 && make -j$NJOB) || exit 3
173 fi 175 fi
174 176