buildmacuniversal.sh
changeset 101 98288e66c2e1
child 107 dbffd9a2b4a8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildmacuniversal.sh	Fri Jan 27 19:40:20 2006 +0000
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Build a Universal binary, gcc 3.3 on PowerPC and gcc 4 on Intel...
+make BINDIR=bin-ppc CC=gcc-3.3 LD=gcc-3.3 EXTRACFLAGS="-arch ppc" EXTRALDFLAGS="-arch ppc" $* || exit 1
+make BINDIR=bin-i386 CC=gcc-4.0 LD=gcc-4.0 EXTRACFLAGS="-arch i386" EXTRALDFLAGS="-arch i386" $* || exit 1
+
+mkdir -p bin
+for feh in `ls bin-ppc` ; do
+    echo "Gluing bin-ppc/$feh and bin-i386/$feh into bin/$feh ..."
+    lipo -create -o bin/$feh bin-ppc/$feh bin-i386/$feh
+done
+
+rm -rf bin-ppc bin-i386
+exit 0
+