2013-01-21 22:25:49 -07:00
|
|
|
#! /bin/sh
|
|
|
|
|
2013-11-18 15:59:25 -07:00
|
|
|
export XCODEDIR=$(xcode-select -p)
|
2013-01-21 22:25:49 -07:00
|
|
|
export BASEDIR="${XCODEDIR}/Platforms/iPhoneOS.platform/Developer"
|
|
|
|
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
|
2014-11-20 15:01:35 -07:00
|
|
|
export SDK="${BASEDIR}/SDKs/iPhoneOS.sdk"
|
|
|
|
export IPHONEOS_VERSION_MIN="5.1.1"
|
|
|
|
export CFLAGS="-Oz -mthumb -arch armv7 -isysroot ${SDK} -miphoneos-version-min=${IPHONEOS_VERSION_MIN}"
|
|
|
|
export LDFLAGS="-mthumb -arch armv7 -isysroot ${SDK} -miphoneos-version-min=${IPHONEOS_VERSION_MIN}"
|
2013-05-30 22:56:18 -07:00
|
|
|
export PREFIX="$(pwd)/libsodium-ios"
|
2013-01-21 22:25:49 -07:00
|
|
|
|
2013-05-30 22:56:18 -07:00
|
|
|
./configure --host=arm-apple-darwin10 \
|
|
|
|
--disable-shared \
|
2014-08-13 23:32:26 -07:00
|
|
|
--enable-minimal \
|
2013-05-30 22:56:18 -07:00
|
|
|
--prefix="$PREFIX" && \
|
2013-09-07 17:06:56 -07:00
|
|
|
make clean && \
|
2013-05-30 22:56:18 -07:00
|
|
|
make -j3 install && \
|
|
|
|
echo "libsodium has been installed into $PREFIX"
|