forked from mixaz/droid-VNC-server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·52 lines (41 loc) · 927 Bytes
/
build.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
49
50
51
52
#!/usr/bin/env bash
# $ vnc-build -a [16..25] -w
set -e
DAEMON_BUILD_PATH=libs/armeabi-v7a
LIB_BUILD_PATH=nativeMethods/libs/armeabi-v7a
CWD=$(pwd)
usage() {
echo "Usage: $0 -w -a API_LEVEL"
}
clean() {
if [ -n "$WRAPPER_LIB" ]; then
rm ${LIB_BUILD_PATH}/libdvnc_flinger_sdk${API_LEVEL}.so || true
fi
rm ${DAEMON_BUILD_PATH}/* || true
}
build_wrapper() {
cd /Volumes/android
source build/envsetup.sh
lunch aosp_arm-eng
ls external/nativeMethods &> /dev/null || ln -s ${CWD}/nativeMethods external/nativeMethods
mmma external/nativeMethods
cd ${CWD}
}
while getopts ":a:w" o; do
case $o in
a) API_LEVEL=$OPTARG ;;
w) WRAPPER_LIB='yes' ;;
\?) usage
exit 1 ;;
esac
done
if [ -z "$API_LEVEL" ]; then
echo "No API level specified"
usage
exit 1
fi
clean
ndk-build
if [ -n "$WRAPPER_LIB" ]; then
build_wrapper
fi