2006-05-03 00:36:17 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2007-04-12 22:13:41 -04:00
|
|
|
# you need to change this if you run from outside this dir.
|
2006-05-03 00:36:17 -04:00
|
|
|
if [ "$WXROOT" = "" ]; then
|
2008-03-30 14:30:48 -04:00
|
|
|
scriptDir="$(cd $(dirname $0);pwd)"
|
|
|
|
WXROOT=$scriptDir/../../..
|
2006-05-03 00:36:17 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
. $WXROOT/distrib/scripts/includes/configure_build.inc
|
|
|
|
|
|
|
|
. $WXROOT/distrib/scripts/mac/mac_options.inc
|
|
|
|
|
2008-03-30 14:30:48 -04:00
|
|
|
OTHER_OPTS="$OTHER_OPTS --disable-precomp-headers"
|
|
|
|
|
|
|
|
do_lipo_build(){
|
|
|
|
DIR="bld-$1"
|
|
|
|
|
|
|
|
if [ "$1" = "ppc" ]; then
|
|
|
|
export CXX="g++-3.3 -arch ppc -DMAC_OS_X_VERSION_MAX_ALLOWED=1040"
|
|
|
|
export CC="gcc-3.3 -arch ppc -DMAC_OS_X_VERSION_MAX_ALLOWED=1040"
|
|
|
|
export MACOSX_DEPLOYMENT_TARGET=10.3
|
|
|
|
else
|
|
|
|
export CXX="g++-4.0 -arch i386"
|
|
|
|
export CC="gcc-4.0 -arch i386"
|
|
|
|
export MACOSX_DEPLOYMENT_TARGET=10.4
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p $DIR
|
|
|
|
cd $DIR
|
|
|
|
do_build
|
|
|
|
|
|
|
|
mkdir -p $INSTALLDIR/$1
|
|
|
|
|
|
|
|
make prefix=$INSTALLDIR/$1 install
|
|
|
|
|
|
|
|
if [ "$WXPYTHON" == "1" ]; then
|
|
|
|
make -C contrib/src/gizmos prefix=$INSTALLDIR/$1 install
|
|
|
|
make -C contrib/src/stc prefix=$INSTALLDIR/$1 install
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
}
|
|
|
|
|
|
|
|
do_lipo_build "ppc"
|
|
|
|
do_lipo_build "i386"
|
|
|
|
|
|
|
|
python $WXROOT/distrib/scripts/mac/lipo-dir.py $INSTALLDIR/ppc $INSTALLDIR/i386 $INSTALLDIR
|
|
|
|
|
|
|
|
rm -rf $INSTALLDIR/ppc $INSTALLDIR/i386
|
|
|
|
python -c "import os; fname = os.path.abspath('$INSTALLDIR/bin/wx-config'); data = open(fname).read(); data = data.replace('ppc/', ''); open(fname, 'w').write(data)"
|
|
|
|
|
|
|
|
if [ $? != 0 ]; then
|
|
|
|
exit $?
|
|
|
|
fi
|