Created
December 2, 2019 19:56
-
-
Save mpociot/2bac951d4fd4078837603b37430aea79 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
PLATFORM=iPhoneOS # iPhoneSimulator # iPhoneOS | |
HOST=arm-apple-darwin # i386-apple-darwin10 # arm-apple-darwin10 | |
ARCH=arm64 # i386 # armv7s #armv7 | |
SDK_VERSION=13.0 | |
XCODE_ROOT=`xcode-select -print-path` | |
PLATFORM_PATH=$XCODE_ROOT/Platforms/$PLATFORM.platform/Developer | |
SDK_PATH=$PLATFORM_PATH/SDKs/$PLATFORM$SDK_VERSION.sdk | |
FLAGS="-isysroot $SDK_PATH -arch $ARCH -miphoneos-version-min=$SDK_VERSION" | |
PLATFORM_BIN_PATH=$XCODE_ROOT/Toolchains/XcodeDefault.xctoolchain/usr/bin | |
CC=$PLATFORM_BIN_PATH/clang | |
CXX=$PLATFORM_BIN_PATH/clang++ | |
CFLAGS="$FLAGS -std=gnu99" | |
CXXFLAGS="$FLAGS -std=gnu++11 -stdlib=libc++" | |
LDFLAGS=$FLAGS | |
export CC CXX CFLAGS CXXFLAGS LDFLAGS | |
CONFIGURE_FLAGS="--host=$HOST --enable-embed=static --disable-phpdbg --enable-static --without-pear --disable-opcache --without-iconv --disable-cgi --disable-shared --disable-cli --enable-mysqlnd --with-pdo-mysql --with-mysqli --with-tsrm-pthreads" | |
./configure $CONFIGURE_FLAGS | |
make |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment