comparison Makefile @ 27:807f7e4eaebe

starting update to latest toolchain
author Carl Byington <carl@five-ten-sg.com>
date Thu, 08 Nov 2018 11:39:13 -0800
parents 357bbbbcf201
children e6784ab8964c
comparison
equal deleted inserted replaced
26:3a5df66c0480 27:807f7e4eaebe
1 #mc40 is "On Device Storage" 1 #mc40 is "On Device Storage"
2 #tc55 is "Internal Storage" 2 #tc55 is "Internal Storage"
3 3
4 style=release 4 style:=release
5 dest=/run/user/1000/gvfs/mtp*/*torage/Download 5 dest:=/run/user/1000/gvfs/mtp*/*torage/Download
6 apk='bin/510ConnectbotMonitor-$(style).apk' 6 ver:=$(shell grep versionName app/src/main/AndroidManifest.xml | cut -d'"' -f2)
7 apk:='app/build/outputs/apk/510ConnectbotMonitor-$(ver).apk'
8 id:=$(shell hg id --id || echo 1)
9 da:=$(shell date +%Y-%m-%d)
10 version:=\
11 <?xml version=\"1.0\" encoding=\"utf-8\"?>\n\
12 <resources>\n\
13 <string name=\"msg_version\" translatable=\"false\">510ConnectbotMonitor $(ver) ($(id) $(da))</string>\n\
14 </resources>\n
15
7 ifeq ($(style),release) 16 ifeq ($(style),release)
8 debuggable=false 17 task:=assembleArmRelease
9 else 18 else
10 debuggable=true 19 task:=assembleArmDebug
11 endif 20 endif
12 21
13 all: 22 all:
14 hg pull; hg update 23 hg pull; hg update
15 make builder 24 make builder
16 25
17 builder: 26 builder:
18 sed -i -e 's/android:debuggable=".*"/android:debuggable="$(debuggable)"/g' AndroidManifest.xml 27 rm -rf app/build/*
19 rm -rf gen bin 28 echo -e "$(version)" >app/src/main/res/values/version.xml
20 android update project -p . -t android-16 29 cat app/src/main/res/values/version.xml
21 ant $(style) 30 ANDROID_HOME=/home/carl/Android/Sdk ANDROID_NDK_HOME=/home/carl/Android/Sdk/ndk-bundle ./gradlew $(task)
31 mv app/build/outputs/apk/arm/$(style)/app-arm-$(style).apk $(apk)
32 ls -al app/build/outputs/apk
33
34 docs:
35 (cd xml; make)
22 36
23 install: 37 install:
24 cp $(apk) $(dest) 38 cp $(apk) $(dest)
25 ls -al $(apk) $(dest) 39 ls -al $(apk) $(dest)
26 40