Created
May 2, 2009 13:29
-
-
Save niw/105558 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
PREFIX=/path/to/prefix | |
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin | |
# configure for iPhone device | |
mkdir -p build_for_armv6 | |
pushd build_for_armv6 | |
../configure --prefix=${PREFIX} \ | |
--host=arm-apple-darwin \ | |
--enable-static \ | |
--disable-shared \ | |
CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1 \ | |
CXX=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-g++-4.0.1 \ | |
CFLAGS="-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk" \ | |
CXXFLAGS="-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk" \ | |
CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp \ | |
CXXCPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp \ | |
AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar | |
popd | |
# configure for iPhone simulator | |
mkdir -p build_for_sim | |
pushd build_for_sim | |
../configure --prefix=${PREFIX} \ | |
--host=i686-apple-darwin \ | |
--enable-static \ | |
--disable-shared \ | |
CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/i686-apple-darwin9-gcc-4.0.1 \ | |
CXX=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/i686-apple-darwin9-g++-4.0.1 \ | |
CFLAGS="-arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.sdk" \ | |
CXXFLAGS="-arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.sdk" \ | |
CPP=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/cpp \ | |
CXXCPP=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/cpp \ | |
AR=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ar | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment