Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hacks for building Universal Binaries on Mac.
- Loading branch information
Showing
2 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|