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
|
|
|
|
WXROOT=../../..
|
|
|
|
fi
|
|
|
|
|
|
|
|
. $WXROOT/distrib/scripts/includes/configure_build.inc
|
|
|
|
|
|
|
|
. $WXROOT/distrib/scripts/mac/mac_options.inc
|
|
|
|
|
|
|
|
DIR="bld-ppc"
|
|
|
|
|
|
|
|
export CXX="g++-3.3 -arch ppc"
|
|
|
|
export CC="gcc-3.3 -arch ppc"
|
|
|
|
mkdir -p $DIR
|
|
|
|
cd $DIR
|
|
|
|
do_build
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# Do another build, but with i386 this time
|
|
|
|
DIR="bld-i386"
|
|
|
|
|
|
|
|
export CXX="g++-4.0 -arch i386"
|
|
|
|
export CC="gcc-4.0 -arch i386"
|
|
|
|
mkdir -p $DIR
|
|
|
|
cd $DIR
|
|
|
|
do_build
|
|
|
|
cd ..
|
|
|
|
|
2007-04-12 22:13:41 -04:00
|
|
|
# Copy over everything, then remove files we need to replace with lipo'd versions
|
2006-05-03 00:36:17 -04:00
|
|
|
mkdir -p bld
|
|
|
|
cp -R bld-i386/* bld
|
|
|
|
cp -R bld-i386/.pch bld/.pch
|
|
|
|
rm bld/lib/*.dylib
|
|
|
|
|
2007-04-12 22:13:41 -04:00
|
|
|
# lipo the files, but make sure not to run it on symbolic links
|
2006-05-03 00:36:17 -04:00
|
|
|
for item in `cd bld-i386/lib; ls *.dylib`
|
|
|
|
do
|
|
|
|
if [ -f bld-i386/lib/$item -a ! -L bld-i386/lib/$item ]; then
|
|
|
|
lipo -create bld-i386/lib/$item bld-ppc/lib/$item -output bld/lib/$item
|
|
|
|
else
|
|
|
|
cp -R bld-i386/lib/$item bld/lib
|
2007-04-12 22:13:41 -04:00
|
|
|
fi
|
2006-05-03 00:36:17 -04:00
|
|
|
done
|
2007-04-12 22:13:41 -04:00
|
|
|
|
2006-05-03 00:36:17 -04:00
|
|
|
# make install hacks - the copy operations mess up the timestamps and thus
|
|
|
|
# cause make to erroneously think that the libraries need rebuilt
|
|
|
|
touch bld/.pch/wxprec_monodll/wx/*.gch
|
|
|
|
touch bld/.pch/wxprec_gldll/wx/*.gch
|
|
|
|
touch bld/*.o
|
|
|
|
touch bld/lib/*
|
2007-04-12 22:13:41 -04:00
|
|
|
|
|
|
|
# one more hack - inplace wx-config has a hardcoded path in it - we need to
|
2006-05-03 00:36:17 -04:00
|
|
|
# change that path from bld-i386 to just bld in case someone wants to build things
|
|
|
|
# in tree. (wxPython does this, for example)
|
|
|
|
python -c "import os; fname = os.path.abspath('bld/wx-config'); data = open(fname).read(); data = data.replace('bld-i386', 'bld'); open(fname, 'w').write(data)"
|
|
|
|
|
|
|
|
cd bld
|
|
|
|
make prefix=$INSTALLDIR install
|
|
|
|
|