From b54c331d7db7599e37af24a1fe579a6c1c573698 Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Tue, 1 Jan 2013 22:35:49 +0000 Subject: [PATCH] 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 --- make-macosx.sh | 24 ++++++++++++++++++++++-- 1 file 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} "