-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUILD.txt
executable file
·35 lines (28 loc) · 1.08 KB
/
BUILD.txt
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
# To build Serval BatPhone the first time, run the following commands:
# (or just run ./BUILD.txt, since this file is a valid shell script).
# Exit on error
set -e
# Setup and clone the submodules used.
git submodule init
git submodule update
if [ -z "`which android`" ]; then
echo "Unable to find android executable, have you setup your build environment correctly"
exit 1
fi
# Update android SDK directory in local.properties.
android update project -t `android list targets | grep \"android-8\" | awk '{print $2}'` -p .
# Build everything.
# This calls ndk-build but you must have NDK_ROOT env var set to the root of
# the NDK directory.
if [ -z "$NDK_ROOT" ]; then
echo "NDK_ROOT not set"
exit 1
fi
ant debug
# After the first time, you should be able to build it from Eclipse
# (Why eclipse doesn't at least run the ndk-build to create the
# android/java conformant native binaries is a mystery to me).
#
# BUILDING ON WINDOWS REQUIRES THIS TO ALL HAPPEN FROM IN A CYGWIN
# SHELL, AND MAY STILL CAUSE PROBLEMS. WE RECOMMEND LINUX OR OSX
# AS THE BUILD ENVIRONMENT FOR SERVAL BATPHONE.