Another pass at the Mac OS X make scripts.

Ironed out issues with generating an application bundle with universal
binaries on supported systems. Fall back to bundling a single
architecture when support for universal binary generation is not
available. Tested on Mac OS X 10.5.8 (and 10.5 SDK).
This commit is contained in:
jeremiah sypult 2013-07-18 10:39:08 -05:00
parent ea49d5d2da
commit b7f5971ab8
3 changed files with 107 additions and 211 deletions

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# Let's make the user give us a target build system
@ -30,34 +30,7 @@ if [ -z "$DARWIN_GCC_ARCH" ]; then
fi
CC=gcc-4.0
APPBUNDLE=ioquake3.app
BINARY=ioquake3.${BUILDARCH}
DEDBIN=ioq3ded.${BUILDARCH}
PKGINFO=APPLIOQ3
DESTDIR=build/release-darwin-${BUILDARCH}
BASEDIR=baseq3
MPACKDIR=missionpack
BIN_OBJ="
build/release-darwin-${BUILDARCH}/${BINARY}
"
BIN_DEDOBJ="
build/release-darwin-${BUILDARCH}/${DEDBIN}
"
BASE_OBJ="
build/release-darwin-${BUILDARCH}/$BASEDIR/cgame${BUILDARCH}.dylib
build/release-darwin-${BUILDARCH}/$BASEDIR/ui${BUILDARCH}.dylib
build/release-darwin-${BUILDARCH}/$BASEDIR/qagame${BUILDARCH}.dylib
"
MPACK_OBJ="
build/release-darwin-${BUILDARCH}/$MPACKDIR/cgame${BUILDARCH}.dylib
build/release-darwin-${BUILDARCH}/$MPACKDIR/ui${BUILDARCH}.dylib
build/release-darwin-${BUILDARCH}/$MPACKDIR/qagame${BUILDARCH}.dylib
"
RENDER_OBJ="
build/release-darwin-${BUILDARCH}/renderer_opengl1_${BUILDARCH}.dylib
build/release-darwin-${BUILDARCH}/renderer_opengl2_${BUILDARCH}.dylib
"
cd `dirname $0`
if [ ! -f Makefile ]; then
@ -101,9 +74,9 @@ NCPU=`sysctl -n hw.ncpu`
# intel client and server
if [ -d build/release-darwin-${BUILDARCH} ]; then
rm -r build/release-darwin-${BUILDARCH}
fi
#if [ -d build/release-darwin-${BUILDARCH} ]; then
# rm -r build/release-darwin-${BUILDARCH}
#fi
(ARCH=${BUILDARCH} CFLAGS=$ARCH_CFLAGS LDFLAGS=$ARCH_LDFLAGS make -j$NCPU) || exit 1;
# use the following shell script to build an application bundle