forked from msg555/PowerTutor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (30 loc) · 1.06 KB
/
Makefile
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
all: package
ANDROID_LIB=android-9.jar
CLASSPATH=$(ANDROID_LIB):libs/achartengine-1.0.0.jar
genres:
mkdir -p gen bin
aapt package -m -J gen -M AndroidManifest.xml -S res -I $(ANDROID_LIB)
aidl:
find src/ -type f | \
grep '\.aidl$$' | \
xargs -n 1 aidl -Isrc -I$(ANDROID_LIB) -ogen
gen: genres aidl
compile: gen
mkdir -p bin
find src/ gen/ -type f | \
grep '\.java$$' | \
xargs javac -cp $(CLASSPATH) -d bin
ndk-build
dex: compile
dx --dex --output=bin/classes.dex bin/ libs/
package: dex
aapt package -M AndroidManifest.xml -S res \
-F bin/PowerTutor.apk -I $(ANDROID_LIB)
cd bin; zip PowerTutor.apk classes.dex
zip bin/PowerTutor.apk -r libs -i \*.so
jarsigner -storepass android -keystore debug.keystore \
bin/PowerTutor.apk androiddebugkey
install: package
adb install bin/PowerTutor.apk
clean:
rm -rf bin/ gen/