1#!/bin/sh 2 3rm -f hwmaster.ppc \ 4 hwmaster.x86 \ 5 hwmaster.x86_64 \ 6 hwmaster.bin 7make distclean 8 9OLDPATH=$PATH 10MAKE_CMD=make 11 12OSXBUILD=1 13export OSXBUILD 14 15# ppc 16PATH=/opt/cross_osx-ppc/bin:$OLDPATH 17CC=powerpc-apple-darwin9-gcc 18AS=powerpc-apple-darwin9-as 19AR=powerpc-apple-darwin9-ar 20RANLIB=powerpc-apple-darwin9-ranlib 21LIPO=powerpc-apple-darwin9-lipo 22export PATH CC AS AR RANLIB LIPO 23$MAKE_CMD MACH_TYPE=ppc $* || exit 1 24powerpc-apple-darwin9-strip -S hwmaster || exit 1 25mv hwmaster hwmaster.ppc || exit 1 26$MAKE_CMD distclean 27 28# x86 29PATH=/opt/cross_osx-x86/bin:$OLDPATH 30CC=i686-apple-darwin9-gcc 31AS=i686-apple-darwin9-as 32AR=i686-apple-darwin9-ar 33RANLIB=i686-apple-darwin9-ranlib 34LIPO=i686-apple-darwin9-lipo 35export PATH CC AS AR RANLIB LIPO 36$MAKE_CMD MACH_TYPE=x86 $* || exit 1 37i686-apple-darwin9-strip -S hwmaster || exit 1 38mv hwmaster hwmaster.x86 || exit 1 39$MAKE_CMD distclean 40 41# x86_64 42PATH=/opt/cross_osx-x86_64/usr/bin:$OLDPATH 43CC=x86_64-apple-darwin9-gcc 44AS=x86_64-apple-darwin9-as 45AR=x86_64-apple-darwin9-ar 46RANLIB=x86_64-apple-darwin9-ranlib 47LIPO=x86_64-apple-darwin9-lipo 48export PATH CC AS AR RANLIB LIPO 49$MAKE_CMD MACH_TYPE=x86_64 $* || exit 1 50x86_64-apple-darwin9-strip -S hwmaster || exit 1 51mv hwmaster hwmaster.x86_64 || exit 1 52$MAKE_CMD distclean 53 54$LIPO -create -o hwmaster.bin hwmaster.ppc hwmaster.x86 hwmaster.x86_64 || exit 1 55