aboutsummaryrefslogtreecommitdiff
path: root/ios_get_libwallet.api.sh
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-04-26 22:42:17 +0200
committerJaquee <jaquee.monero@gmail.com>2017-05-05 12:03:06 +0200
commitfff5c716c813e741c552d310fb4ce1c07d3b07d8 (patch)
treed5e7600526255f3d26e6550ea690d2986cd699ea /ios_get_libwallet.api.sh
parent2e53c524a13c4b4ef3cccfc7c7cfc4243144d6f9 (diff)
downloadmonzero-gui-fff5c716c813e741c552d310fb4ce1c07d3b07d8.tar.gz
monzero-gui-fff5c716c813e741c552d310fb4ce1c07d3b07d8.tar.xz
monzero-gui-fff5c716c813e741c552d310fb4ce1c07d3b07d8.zip
add ios_get_libwallet.api.sh
Diffstat (limited to 'ios_get_libwallet.api.sh')
-rwxr-xr-xios_get_libwallet.api.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/ios_get_libwallet.api.sh b/ios_get_libwallet.api.sh
new file mode 100755
index 00000000..3592829c
--- /dev/null
+++ b/ios_get_libwallet.api.sh
@@ -0,0 +1,41 @@
+#!/bin/bash -e
+if [ -z $BUILD_TYPE ]; then
+ BUILD_TYPE=release
+fi
+
+ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+if [ -z $BOOST_LIBRARYDIR ]; then
+ BOOST_LIBRARYDIR=${ROOT_DIR}/../ofxiOSBoost/build/ios/prefix/lib
+fi
+if [ -z $BOOST_INCLUDEDIR ]; then
+ BOOST_INCLUDEDIR=${ROOT_DIR}/../ofxiOSBoost/build/ios/prefix/include
+fi
+if [ -z $OPENSSL_INCLUDE_DIR ]; then
+ OPENSSL_INCLUDE_DIR=${ROOT_DIR}/../openssl/1.0.2j/include
+fi
+if [ -z $OPENSSL_ROOT_DIR ]; then
+ OPENSSL_ROOT_DIR=${ROOT_DIR}/../openssl/1.0.2j
+fi
+
+echo "Building IOS armv7"
+rm -r monero/build
+mkdir -p monero/build/release
+pushd monero/build/release
+cmake -D IOS=ON -D ARCH=armv7 -D BOOST_LIBRARYDIR=${BOOST_INCLUDEDIR} -D BOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -D OPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} -D OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} -D CMAKE_BUILD_TYPE=debug -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="/Users/jacob/crypto/monero-core/monero" ../..
+make -j4 && make install
+popd
+echo "Building IOS arm64"
+rm -r monero/build
+mkdir -p monero/build/release
+pushd monero/build/release
+cmake -D IOS=ON -D ARCH=arm64 -D BOOST_LIBRARYDIR=${BOOST_INCLUDEDIR} -D BOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -D OPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} -D OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} -D CMAKE_BUILD_TYPE=debug -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="/Users/jacob/crypto/monero-core/monero" ../..
+make -j4 && make install
+popd
+
+echo "Creating fat library for armv7 and arm64"
+pushd monero
+mkdir -p lib-ios
+lipo -create lib-armv7/libwallet_merged.a lib-arm64/libwallet_merged.a -output lib-ios/libwallet_merged.a
+lipo -create lib-armv7/libunbound.a lib-arm64/libunbound.a -output lib-ios/libunbound.a
+lipo -create lib-armv7/libepee.a lib-arm64/libepee.a -output lib-ios/libepee.a
+popd \ No newline at end of file