]>
Commit | Line | Data |
---|---|---|
3d23c9b7 KO |
1 | #!/bin/sh |
2 | ||
3 | # you need to change this if you run from outside this dir. | |
4 | if [ "$WXROOT" = "" ]; then | |
5 | WXROOT=../../.. | |
6 | fi | |
7 | ||
8 | . $WXROOT/distrib/scripts/includes/configure_build.inc | |
9 | ||
10 | . $WXROOT/distrib/scripts/mac/mac_options.inc | |
11 | ||
12 | DIR="bld-ppc" | |
13 | ||
14 | export CXX="g++-3.3 -arch ppc" | |
15 | export CC="gcc-3.3 -arch ppc" | |
16 | mkdir -p $DIR | |
17 | cd $DIR | |
18 | do_build | |
19 | cd .. | |
20 | ||
21 | # Do another build, but with i386 this time | |
22 | DIR="bld-i386" | |
23 | ||
24 | export CXX="g++-4.0 -arch i386" | |
25 | export CC="gcc-4.0 -arch i386" | |
26 | mkdir -p $DIR | |
27 | cd $DIR | |
28 | do_build | |
29 | cd .. | |
30 | ||
31 | # Copy over everything, then remove files we need to replace with lipo'd versions | |
32 | mkdir -p bld | |
33 | cp -R bld-i386/* bld | |
34 | cp -R bld-i386/.pch bld/.pch | |
35 | rm bld/lib/*.dylib | |
36 | ||
37 | # lipo the files, but make sure not to run it on symbolic links | |
38 | for item in `cd bld-i386/lib; ls *.dylib` | |
39 | do | |
40 | if [ -f bld-i386/lib/$item -a ! -L bld-i386/lib/$item ]; then | |
41 | lipo -create bld-i386/lib/$item bld-ppc/lib/$item -output bld/lib/$item | |
42 | else | |
43 | cp -R bld-i386/lib/$item bld/lib | |
44 | fi | |
45 | done | |
46 | ||
47 | # make install hacks - the copy operations mess up the timestamps and thus | |
48 | # cause make to erroneously think that the libraries need rebuilt | |
49 | touch bld/.pch/wxprec_monodll/wx/*.gch | |
50 | touch bld/.pch/wxprec_gldll/wx/*.gch | |
51 | touch bld/*.o | |
52 | touch bld/lib/* | |
53 | ||
54 | # one more hack - inplace wx-config has a hardcoded path in it - we need to | |
55 | # change that path from bld-i386 to just bld in case someone wants to build things | |
56 | # in tree. (wxPython does this, for example) | |
57 | 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)" | |
58 | ||
59 | cd bld | |
60 | make prefix=$INSTALLDIR install | |
61 | ||
62 | if [ "$WXPYTHON" == "1" ]; then | |
63 | make -C contrib/src/animate prefix=$INSTALLDIR install | |
64 | make -C contrib/src/gizmos prefix=$INSTALLDIR install | |
65 | make -C contrib/src/stc prefix=$INSTALLDIR install | |
66 | fi |