Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- LIBS_FLAGS="--with-bzip2=no --with-zlib=yes --with-png=yes --enable-static=yes --enable-shared=no"
- CC_PATH="CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc"
- AR_PATH="AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar"
- RANLIB_PATH="RANLIB=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib"
- CPP_PATH="CPP=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cpp"
- SDK_INCLUDE_SIM="-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/include"
- SDK_INCLUDE_OS="-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include"
- SYSROOT_SIM="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk"
- SYSROOT_OS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk"
- if [ "$1" == "i386" ] || [ "$1" == "all" ]; then
- CFLAGS_EXT="-arch i386 -Wno-extended-offsetof -miphoneos-version-min=4.2"
- LDFLAGS_EXT="-arch i386 -miphoneos-version-min=4.2"
- rm libfreetype-i386.a
- make clean
- ./configure $LIBS_FLAGS $CC_PATH CFLAGS="$CFLAGS_EXT $SDK_INCLUDE_SIM $SYSROOT_SIM" $CPP_PATH $AR_PATH $RANLIB_PATH LDFLAGS="$LDFLAGS_EXT $SYSROOT_SIM"
- make
- cp objs/.libs/libfreetype.a libfreetype-i386.a
- fi
- if [ "$1" == "x86_64" ] || [ "$1" == "all" ]; then
- CFLAGS_EXT="-arch x86_64 -Wno-extended-offsetof -miphoneos-version-min=4.2"
- LDFLAGS_EXT="-arch x86_64 -miphoneos-version-min=4.2"
- rm libfreetype-x86_64.a
- make clean
- ./configure $LIBS_FLAGS $CC_PATH CFLAGS="$CFLAGS_EXT $SDK_INCLUDE_SIM $SYSROOT_SIM" $CPP_PATH $AR_PATH $RANLIB_PATH LDFLAGS="$LDFLAGS_EXT $SYSROOT_SIM"
- make
- cp objs/.libs/libfreetype.a libfreetype-x86_64.a
- fi
- if [ "$1" == "arm7" ] || [ "$1" == "all" ]; then
- CFLAGS_EXT="-arch armv7 -pipe -std=c99 -Wno-extended-offsetof -Wno-trigraphs -fpascal-strings -O2 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=4.2"
- LDFLAGS_EXT="-arch armv7 -miphoneos-version-min=4.2"
- rm libfreetype-arm7.a
- make clean
- ./configure --host=arm-apple-darwin $LIBS_FLAGS $CC_PATH CFLAGS="$CFLAGS_EXT $SDK_INCLUDE_OS $SYSROOT_OS" $AR_PATH $RANLIB_PATH LDFLAGS="$LDFLAGS_EXT $SYSROOT_OS"
- make
- cp objs/.libs/libfreetype.a libfreetype-arm7.a
- fi
- if [ "$1" == "arm7s" ] || [ "$1" == "all" ]; then
- CFLAGS_EXT="-arch armv7s -pipe -std=c99 -Wno-extended-offsetof -Wno-trigraphs -fpascal-strings -O2 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=5.0"
- LDFLAGS_EXT="-arch armv7s -miphoneos-version-min=5.0"
- rm libfreetype-arm7s.a
- make clean
- ./configure --host=arm-apple-darwin $LIBS_FLAGS $CC_PATH CFLAGS="$CFLAGS_EXT $SDK_INCLUDE_OS $SYSROOT_OS" $AR_PATH $RANLIB_PATH LDFLAGS="$LDFLAGS_EXT $SYSROOT_OS"
- make
- cp objs/.libs/libfreetype.a libfreetype-arm7s.a
- fi
- if [ "$1" == "arm64" ] || [ "$1" == "all" ]; then
- CFLAGS_EXT="-arch arm64 -pipe -std=c99 -Wno-extended-offsetof -Wno-trigraphs -fpascal-strings -O2 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=6.0"
- LDFLAGS_EXT="-arch arm64 -miphoneos-version-min=6.0"
- rm libfreetype-arm64.a
- make clean
- ./configure --host=arm-apple-darwin $LIBS_FLAGS $CC_PATH CFLAGS="$CFLAGS_EXT $SDK_INCLUDE_OS $SYSROOT_OS" $AR_PATH $RANLIB_PATH LDFLAGS="$LDFLAGS_EXT $SYSROOT_OS"
- make
- cp objs/.libs/libfreetype.a libfreetype-arm64.a
- fi
- if [ "$1" == "universal" ] || [ "$1" == "all" ]; then
- rm libfreetype.a
- lipo -create -output libfreetype.a libfreetype-i386.a libfreetype-x86_64.a libfreetype-arm7.a libfreetype-arm7s.a libfreetype-arm64.a
- fi
Add Comment
Please, Sign In to add comment