blob: 6b12e24afc5512867ef761689a74bcc5272a0f71 [file] [log] [blame]
Adrien Béraud04d822c2015-04-02 17:44:36 -04001#! /bin/bash
Adrien Béraud86759bb2016-09-28 13:54:54 -04002# Build Ring daemon and client APK for Android
Alexandre Lision43b9aeb2014-07-15 14:21:19 -04003
4if [ -z "$ANDROID_ABI" ]; then
Adrien Béraud86759bb2016-09-28 13:54:54 -04005 ANDROID_ABI="armeabi-v7a x86 x86_64"
6 echo "ANDROID_ABI not provided, building for ${ANDROID_ABI}"
Alexandre Lision43b9aeb2014-07-15 14:21:19 -04007fi
8
Adrien Béraud1906f212016-10-07 12:10:17 -04009pushd ring-android
10./make-swig.sh
11popd
12
Romain Bertozzi32692de2016-10-27 15:16:46 -040013RELEASE=0
14for i in ${@}; do
15 case "$i" in
16 release|--release)
17 RELEASE=1
18 ;;
19 *)
20 ;;
21 esac
22done
23export RELEASE
24
Adrien Béraud86759bb2016-09-28 13:54:54 -040025ANDROID_ABIS=""
26ANDROID_ABI_LIST="${ANDROID_ABI}"
27echo "Building ABIs: ${ANDROID_ABI_LIST}"
28for i in ${ANDROID_ABI_LIST}; do
29 echo "$i starts building"
30 ANDROID_NDK=$ANDROID_NDK ANDROID_SDK=$ANDROID_SDK ANDROID_ABI=$i \
Romain Bertozzi32692de2016-10-27 15:16:46 -040031 ./build-daemon.sh $* || { echo "$i build KO"; exit 1; }
Adrien Béraud86759bb2016-09-28 13:54:54 -040032 echo "$i build OK"
Alexandre Lision7d5df5d2014-10-27 13:10:01 -040033done
Adrien Béraud86759bb2016-09-28 13:54:54 -040034export ANDROID_ABIS
35make -b -j1 RELEASE=$RELEASE apk