forked from servalproject/batphone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.txt
executable file
·38 lines (34 loc) · 1.13 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
36
37
38
# To build Serval BatPhone the first time, run the following commands:
# (or just run ./BUILD.txt, since this file is a valid shell script).
git submodule init
git submodule update
# Rebuild edify interpretor
cd native
make
cd ..
cp native/adhoc data/bin/adhoc
# XXX - This should really check which of the following works and choose
# but anyway, it's a start.
ndk=`which ndk-build`
sdkbase=`echo $ndk | sed 's,/sdk/.*$,/sdk/,'`
adb=`which adb`
sdkbase=`echo $adb | sed 's,/platform-tools/.*adb,/,'`
sdkdir=`echo ${sdkbase} |cut -f1 -d" "`
touch local.properties
cat local.properties | grep -v sdk.dir >t
mv t local.properties
echo sdk.dir=$sdkdir >>local.properties
git submodule init
git submodule update
cd jni/serval-dna
./nacl-jni-prep
cd ../..
ndk-build
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.