annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
1 #mc40 is "On Device Storage"
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
2 #tc55 is "Internal Storage"
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
3
27
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
4 style:=release
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
5 dest:=/run/user/1000/gvfs/mtp*/*torage/Download
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
6 ver:=$(shell grep versionName app/src/main/AndroidManifest.xml | cut -d'"' -f2)
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
7 apk:='app/build/outputs/apk/510ConnectbotMonitor-$(ver).apk'
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
8 id:=$(shell hg id --id || echo 1)
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
9 da:=$(shell date +%Y-%m-%d)
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
10 version:=\
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
11 <?xml version=\"1.0\" encoding=\"utf-8\"?>\n\
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
12 <resources>\n\
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
13 <string name=\"msg_version\" translatable=\"false\">510ConnectbotMonitor $(ver) ($(id) $(da))</string>\n\
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
14 </resources>\n
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
15
15
357bbbbcf201 set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents: 10
diff changeset
16 ifeq ($(style),release)
27
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
17 task:=assembleArmRelease
15
357bbbbcf201 set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents: 10
diff changeset
18 else
27
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
19 task:=assembleArmDebug
15
357bbbbcf201 set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents: 10
diff changeset
20 endif
0
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
21
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
22 all:
10
f769411a72ce setup for signed release builds
Carl Byington <carl@five-ten-sg.com>
parents: 8
diff changeset
23 hg pull; hg update
f769411a72ce setup for signed release builds
Carl Byington <carl@five-ten-sg.com>
parents: 8
diff changeset
24 make builder
f769411a72ce setup for signed release builds
Carl Byington <carl@five-ten-sg.com>
parents: 8
diff changeset
25
f769411a72ce setup for signed release builds
Carl Byington <carl@five-ten-sg.com>
parents: 8
diff changeset
26 builder:
27
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
27 rm -rf app/build/*
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
28 echo -e "$(version)" >app/src/main/res/values/version.xml
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
29 cat app/src/main/res/values/version.xml
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
30 ANDROID_HOME=/home/carl/Android/Sdk ANDROID_NDK_HOME=/home/carl/Android/Sdk/ndk-bundle ./gradlew $(task)
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
31 mv app/build/outputs/apk/arm/$(style)/app-arm-$(style).apk $(apk)
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
32 ls -al app/build/outputs/apk
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
33
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
34 docs:
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
35 (cd xml; make)
0
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
36
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
37 install:
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
38 cp $(apk) $(dest)
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
39 ls -al $(apk) $(dest)
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
40
8
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
41 buildicon:
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
42 cp -a base.510.icon.png res/drawable-xxxhdpi/icon.png
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
43 convert base.510.icon.png -resize 144x144 res/drawable-xxhdpi/icon.png
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
44 convert base.510.icon.png -resize 96x96 res/drawable-xhdpi/icon.png
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
45 convert base.510.icon.png -resize 72x72 res/drawable-hdpi/icon.png
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
46 convert base.510.icon.png -resize 48x48 res/drawable-mdpi/icon.png
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
47 convert base.510.icon.png -resize 36x36 res/drawable-ldpi/icon.png
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
48
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
49 convert res/drawable-xxxhdpi/icon.png -resize 50% -colorspace Gray res/drawable-xxxhdpi/notification_icon.png
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
50 convert res/drawable-xxhdpi/icon.png -resize 50% -colorspace Gray res/drawable-xxhdpi/notification_icon.png
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
51 convert res/drawable-xhdpi/icon.png -resize 50% -colorspace Gray res/drawable-xhdpi/notification_icon.png
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
52 convert res/drawable-hdpi/icon.png -resize 50% -colorspace Gray res/drawable-hdpi/notification_icon.png
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
53 convert res/drawable-mdpi/icon.png -resize 50% -colorspace Gray res/drawable-mdpi/notification_icon.png
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
54 convert res/drawable-ldpi/icon.png -resize 50% -colorspace Gray res/drawable-ldpi/notification_icon.png
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
55
0
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
56 indentc:
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
57 indent --line-length100 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
58 --brace-indent4 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
59 --braces-on-if-line \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
60 --braces-on-func-def-line \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
61 --case-brace-indentation4 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
62 --case-indentation4 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
63 --comment-indentation60 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
64 --cuddle-else \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
65 --declaration-comment-column60 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
66 --no-tabs \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
67 -nbbo \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
68 -npcs \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
69 -nprs \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
70 -npsl \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
71 -saf -sai -saw \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
72 -i4 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
73 $(shell find . -iname *.c -o -iname *.h -o -iname *.cpp)
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
74
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
75 indentjava:
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
76 astyle --style=java \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
77 --attach-namespaces \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
78 --attach-classes \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
79 --indent-classes \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
80 --indent-switches \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
81 --indent-cases \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
82 --indent-namespaces \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
83 --break-blocks \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
84 --pad-oper \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
85 --pad-first-paren-out \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
86 --pad-header \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
87 --unpad-paren \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
88 --delete-empty-lines \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
89 --align-pointer=type \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
90 --break-closing-brackets \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
91 --keep-one-line-blocks \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
92 --keep-one-line-statements \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
93 --convert-tabs \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
94 --break-after-logical \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
95 --mode=java \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
96 $(shell find . -iname *.java | grep -v /gen/)
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
97
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
98 docs:
1
f12df02aa228 add docs
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
99 (cd xml; make)
f12df02aa228 add docs
Carl Byington <carl@five-ten-sg.com>
parents: 0
diff changeset
100