Created
February 15, 2013 19:52
-
-
Save armadsen/4962956 to your computer and use it in GitHub Desktop.
Quickly thrown together script to build libFLAC as a 64/32-bit universal binary on Mac OS X 10.8.
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
#!/usr/bin/env bash | |
# Put this script in the libFLAC source directory, and make sure it's executable (chmod +x BuildLibFlac.sh), then run it (./BuildLibFLAC.sh) | |
# Note that this was written to be used on 10.8 with Xcode 4.6 and FLAC 1.2.1. It may/will need to be changed for future versions of the OS, tools, and/or FLAC | |
env CFLAGS="-arch x86_64" CPPFLAGS="-arch x86_64" LDFLAGS="-arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.5" ./configure --disable-asm-optimizations --enable-static --disable-shared --disable-ogg | |
make clean; make | |
cp src/libFLAC/.libs/libFLAC.a ./libFLAC64.a | |
make clean; | |
env CFLAGS="-arch i386" CPPFLAGS="-arch i386" LDFLAGS="-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.5" ./configure --disable-asm-optimizations --enable-static --disable-shared --disable-ogg | |
make clean; make | |
mv src/libFLAC/.libs/libFLAC.a ./libFLAC32.a | |
lipo libFLAC32.a libFLAC64.a -create -output libFLAC.a | |
mv libFLAC.a src/libFLAC/.libs/libFLAC.a | |
rm libFLAC32.a libFLAC64.a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment