]> git.saurik.com Git - wxWidgets.git/blame - distrib/scripts/mac/macbuild-lipo
compilation fix for ASCII STL build (#9661)
[wxWidgets.git] / distrib / scripts / mac / macbuild-lipo
CommitLineData
3d23c9b7
KO
1#!/bin/sh
2
9d1eeb0b 3# you need to change this if you run from outside this dir.
3d23c9b7 4if [ "$WXROOT" = "" ]; then
cc669f24
KO
5 scriptDir="$(cd $(dirname $0);pwd)"
6 WXROOT=$scriptDir/../../..
3d23c9b7
KO
7fi
8
9. $WXROOT/distrib/scripts/includes/configure_build.inc
10
11. $WXROOT/distrib/scripts/mac/mac_options.inc
12
cc669f24
KO
13OTHER_OPTS="$OTHER_OPTS --disable-precomp-headers"
14
15do_lipo_build(){
16 DIR="bld-$1"
17
18 if [ "$1" = "ppc" ]; then
19 export CXX="g++-3.3 -arch ppc -DMAC_OS_X_VERSION_MAX_ALLOWED=1040"
20 export CC="gcc-3.3 -arch ppc -DMAC_OS_X_VERSION_MAX_ALLOWED=1040"
21 export MACOSX_DEPLOYMENT_TARGET=10.3
22 else
23 export CXX="g++-4.0 -arch i386"
24 export CC="gcc-4.0 -arch i386"
25 export MACOSX_DEPLOYMENT_TARGET=10.4
26 fi
27
28 mkdir -p $DIR
29 cd $DIR
30 do_build
31
32 mkdir -p $INSTALLDIR/$1
33
34 make prefix=$INSTALLDIR/$1 install
35
36 if [ "$WXPYTHON" == "1" ]; then
37 make -C contrib/src/gizmos prefix=$INSTALLDIR/$1 install
38 make -C contrib/src/stc prefix=$INSTALLDIR/$1 install
39 fi
40
41 cd ..
42}
43
44do_lipo_build "ppc"
45do_lipo_build "i386"
46
47python $WXROOT/distrib/scripts/mac/lipo-dir.py $INSTALLDIR/ppc $INSTALLDIR/i386 $INSTALLDIR
48
49rm -rf $INSTALLDIR/ppc $INSTALLDIR/i386
50python -c "import os; fname = os.path.abspath('$INSTALLDIR/bin/wx-config'); data = open(fname).read(); data = data.replace('ppc/', ''); open(fname, 'w').write(data)"
51
52if [ $? != 0 ]; then
53 exit $?
54fi