diff options
author | tjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-08-02 04:01:36 +0000 |
---|---|---|
committer | tjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-08-02 04:01:36 +0000 |
commit | 3b416e75cf3a6c81d4dd1d83418a3b42d739f72f (patch) | |
tree | 7654c52f2c471984a4c507ba0256e2057df086af /make-macosx-ub.sh | |
parent | e6a0afad175d5c1ec113ed652e39b30ba15180d2 (diff) | |
download | ioquake3-aero-3b416e75cf3a6c81d4dd1d83418a3b42d739f72f.tar.gz ioquake3-aero-3b416e75cf3a6c81d4dd1d83418a3b42d739f72f.zip |
bug 2723
* adds a shell script ./make-macosx-ub.sh that builds Mac OS X Universal Binary
* fixes Mac OS X x86 VM crashes (-mstackrealign)
* adds current working directory to the search path on Mac OS X to make
working with .app bundles easier
* various tweaks to make ioquake3 build against the 10.2 SDK
* changed default OpenAL .dylib location to the path of the one included with
the Framework bundled in 10.4 (for USE_OPENAL_DLOPEN)
* updated to a Universal libSDL-1.2.0.dylib
git-svn-id: svn://svn.icculus.org/quake3/trunk@830 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'make-macosx-ub.sh')
-rwxr-xr-x | make-macosx-ub.sh | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/make-macosx-ub.sh b/make-macosx-ub.sh new file mode 100755 index 0000000..11e023d --- /dev/null +++ b/make-macosx-ub.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +DESTDIR=build/release-darwin-ub +BASEDIR=baseq3 +MPACKDIR=missionpack + +BIN_OBJ=" + build/release-darwin-ppc/ioquake3.ppc + build/release-darwin-x86/ioquake3.x86 +" +BASE_OBJ=" + build/release-darwin-ppc/$BASEDIR/cgameppc.dylib + build/release-darwin-x86/$BASEDIR/cgamex86.dylib + build/release-darwin-ppc/$BASEDIR/uippc.dylib + build/release-darwin-x86/$BASEDIR/uix86.dylib + build/release-darwin-ppc/$BASEDIR/qagameppc.dylib + build/release-darwin-x86/$BASEDIR/qagamex86.dylib +" +MPACK_OBJ=" + build/release-darwin-ppc/$MPACKDIR/cgameppc.dylib + build/release-darwin-x86/$MPACKDIR/cgamex86.dylib + build/release-darwin-ppc/$MPACKDIR/uippc.dylib + build/release-darwin-x86/$MPACKDIR/uix86.dylib + build/release-darwin-ppc/$MPACKDIR/qagameppc.dylib + build/release-darwin-x86/$MPACKDIR/qagamex86.dylib +" +if [ ! -f Makefile ]; then + echo "This script must be run from the ioquake3 build directory"; +fi + +if [ ! -d /Developer/SDKs/MacOSX10.2.8.sdk ]; then + echo " +/Developer/SDKs/MacOSX10.2.8.sdk/ is missing. +The installer for this SDK is included with XCode 2.2 or newer" + exit 1; +fi + +if [ ! -d /Developer/SDKs/MacOSX10.4u.sdk ]; then + echo " +/Developer/SDKs/MacOSX10.4u.sdk/ is missing. +The installer for this SDK is included with XCode 2.2 or newer" + exit 1; +fi + +(BUILD_MACOSX_UB=ppc make && BUILD_MACOSX_UB=x86 make) || exit 1; + +if [ ! -d $DESTDIR ]; then + mkdir $DESTDIR || exit 1; +fi +if [ ! -d $DESTDIR/$BASEDIR ]; then + mkdir $DESTDIR/$BASEDIR || exit 1; +fi +if [ ! -d $DESTDIR/$MPACKDIR ]; then + mkdir $DESTDIR/$MPACKDIR || exit 1; +fi + +echo "Installing Universal Binaries in $DESTDIR" +lipo -create -o $DESTDIR/ioquake3.ub $BIN_OBJ +cp $BASE_OBJ $DESTDIR/$BASEDIR/ +cp $MPACK_OBJ $DESTDIR/$MPACKDIR/ +cp code/libs/macosx/*.dylib $DESTDIR/ + |