diff options
author | Richard Allen <ra@ra.is> | 2013-01-01 22:35:49 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-12 21:33:13 +0000 |
commit | 7096b804a64db3e27e76d48e57e29b696696777d (patch) | |
tree | 9505fe47e4eb6cb2504fcb4d4d23588abf5cc2bd | |
parent | 1bfbf1c613fe195063690f10d1fb414b461ca291 (diff) |
Have make-macosx.sh require the user to specify which architecture she/he wants to build for and suggest building UB's if the user is unaware of what architectures are
-rwxr-xr-x | make-macosx.sh | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/make-macosx.sh b/make-macosx.sh index ebc56c90..c3d72eb8 100755 --- a/make-macosx.sh +++ b/make-macosx.sh @@ -1,7 +1,5 @@ #!/bin/sh # -# BUILDARCH can be set to either i386, x86_64 or ppc -BUILDARCH=x86_64 CC=gcc-4.0 APPBUNDLE=ioquake3.app @@ -13,6 +11,28 @@ DESTDIR=build/release-darwin-${BUILDARCH} BASEDIR=baseq3 MPACKDIR=missionpack +# Lets make the user give us a target build system + +if [ $# -ne 1 ]; then + echo "Usage: $0 target_architecture" + echo "Example: $0 i386" + echo + echo "If you don't know or care about architectures please consider using make-macosx-ub.sh instead of this script." + exit 1 +fi + +if [ "$1" == "i386" ]; then + BUILDARCH=i386 +elif [ "$1" == "x86_64" ]; then + BUILDARCH=x86_64 +elif [ "$1" == "ppc" ]; then + BUILDARCH=ppc +else + echo "Invalid architecture: $1" + echo "Valid architectures are i386, x86_64 or ppc" + exit 1 +fi + BIN_OBJ=" build/release-darwin-${BUILDARCH}/ioquake3.${BUILDARCH} " |