-
Notifications
You must be signed in to change notification settings - Fork 0
/
ios-10.3-armv7s-configure
executable file
·49 lines (39 loc) · 1.35 KB
/
ios-10.3-armv7s-configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
# The device's architecture
export ARCH="armv7"
# SDK setup
export SDKVER="10.3"
export DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer"
export GCCROOT="/Applications/Xcode.app/Contents/Developer"
export SDKROOT="$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk"
export PREFIX="$PWD/iphone-$SDKVER-armv7s"
# Sanity checks
if [ ! \( -d "$DEVROOT" \) ] ; then
echo "The iPhone SDK could not be found. Folder \"$DEVROOT\" does not exist."
exit 1
fi
if [ ! \( -d "$SDKROOT" \) ] ; then
echo "The iPhone SDK could not be found. Folder \"$SDKROOT\" does not exist."
exit 1
fi
if [ ! \( -x "./configure" \) ] ; then
echo "This script must be run in the folder containing the \"configure\" script."
exit 1
fi
# Binaries
export CPP="$GCCROOT/usr/bin/gcc -E"
export CC="$GCCROOT/usr/bin/gcc"
export CXX="$GCCROOT/usr/bin/g++"
export LD="$GCCROOT/usr/bin/ld"
export PKG_CONFIG_PATH="$SDKROOT/usr/lib/pkgconfig":"$PREFIX/lib/pkgconfig"
# Flags
export CPPFLAGS="-arch armv7s -isysroot $SDKROOT -I$PREFIX/include"
export CFLAGS="$CPPFLAGS -std=c99 -pipe -no-cpp-precomp"
export CXXFLAGS="$CPPFLAGS -I$SDKROOT/usr/include/c++/4.2.1/$ARCH -pipe -no-cpp-precomp"
export LDFLAGS="-arch armv7s -isysroot $SDKROOT -L$PREFIX/lib"
# Run configure
./configure \
--prefix="$PREFIX" \
--host="$ARCH" \
--enable-static \
--disable-shared $@