Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use all cores/CPUs when building universal binaries.
  • Loading branch information
icculus committed Oct 30, 2006
1 parent 9b8484e commit aa3e0a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions buildmacuniversal.sh
@@ -1,8 +1,10 @@
#!/bin/sh

CPUCOUNT=`sysctl -n hw.ncpu`

# 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
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

mkdir -p bin
for feh in `ls bin-ppc` ; do
Expand Down

0 comments on commit aa3e0a1

Please sign in to comment.