Skip to content

Latest commit

 

History

History
executable file
·
17 lines (12 loc) · 549 Bytes

buildmacuniversal.sh

File metadata and controls

executable file
·
17 lines (12 loc) · 549 Bytes
 
1
2
#!/bin/sh
Oct 30, 2006
Oct 30, 2006
3
4
CPUCOUNT=`sysctl -n hw.ncpu`
5
# Build a Universal binary, gcc 3.3 on PowerPC and gcc 4 on Intel...
Oct 30, 2006
Oct 30, 2006
6
7
make -j$CPUCOUNT BINDIR=bin-ppc CC=gcc-3.3 LD=gcc-3.3 EXTRACFLAGS="-arch ppc" EXTRALDFLAGS="-arch ppc" $* || exit 1
make -j$CPUCOUNT BINDIR=bin-i386 CC=gcc-4.0 LD=gcc-4.0 EXTRACFLAGS="-arch i386" EXTRALDFLAGS="-arch i386" $* || exit 1
8
9
10
11
12
13
14
15
16
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