forked from savoirfairelinux/jami-client-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile.sh
executable file
·48 lines (41 loc) · 1019 Bytes
/
compile.sh
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
#! /bin/bash
# Build Ring daemon and client APK for Android
if [ -z "$ANDROID_ABI" ]; then
ANDROID_ABI="armeabi-v7a arm64-v8a x86 x86_64"
echo "ANDROID_ABI not provided, building for ${ANDROID_ABI}"
fi
pushd ring-android
./make-swig.sh
popd
# Flags:
# --release: build in release mode
# --daemon: Only build the daemon for the selected archs
RELEASE=0
DAEMON_ONLY=0
for i in ${@}; do
case "$i" in
release|--release)
RELEASE=1
;;
daemon|--daemon)
DAEMON_ONLY=1
;;
*)
;;
esac
done
export RELEASE
export DAEMON_ONLY
ANDROID_ABIS=""
ANDROID_ABI_LIST="${ANDROID_ABI}"
echo "Building ABIs: ${ANDROID_ABI_LIST}"
for i in ${ANDROID_ABI_LIST}; do
echo "$i starts building"
ANDROID_NDK=$ANDROID_NDK ANDROID_SDK=$ANDROID_SDK ANDROID_ABI=$i \
./build-daemon.sh $* || { echo "$i build KO"; exit 1; }
echo "$i build OK"
done
if [[ $DAEMON_ONLY -eq 0 ]]; then
export ANDROID_ABIS
make -b -j1 RELEASE=$RELEASE apk
fi