annotate Makefile @ 31:0bc0b4798d9e

fix saystring(12) command for proper unicode and document it
author Carl Byington <carl@five-ten-sg.com>
date Sun, 28 Apr 2019 14:45:56 -0700
parents e6784ab8964c
children
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
31
0bc0b4798d9e fix saystring(12) command for proper unicode and document it
Carl Byington <carl@five-ten-sg.com>
parents: 29
diff changeset
4 na=$(shell find . -iname '*.c' -o -iname '*.h' -o -iname '*.cpp')
27
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
5 style:=release
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
6 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
7 ver:=$(shell grep versionName app/src/main/AndroidManifest.xml | cut -d'"' -f2)
31
0bc0b4798d9e fix saystring(12) command for proper unicode and document it
Carl Byington <carl@five-ten-sg.com>
parents: 29
diff changeset
8 apk:='app/build/outputs/apk/510ConnectbotMonitor-$(ver).$(style).apk'
27
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
9 id:=$(shell hg id --id || echo 1)
31
0bc0b4798d9e fix saystring(12) command for proper unicode and document it
Carl Byington <carl@five-ten-sg.com>
parents: 29
diff changeset
10 da:=$(shell date '+%Y-%m-%dT%H:%M:%S')
27
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
11 version:=\
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
12 <?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
13 <resources>\n\
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
14 <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
15 </resources>\n
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
16
15
357bbbbcf201 set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents: 10
diff changeset
17 ifeq ($(style),release)
27
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
18 task:=assembleArmRelease
31
0bc0b4798d9e fix saystring(12) command for proper unicode and document it
Carl Byington <carl@five-ten-sg.com>
parents: 29
diff changeset
19 debug:=0
15
357bbbbcf201 set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents: 10
diff changeset
20 else
27
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
21 task:=assembleArmDebug
31
0bc0b4798d9e fix saystring(12) command for proper unicode and document it
Carl Byington <carl@five-ten-sg.com>
parents: 29
diff changeset
22 debug:=1
15
357bbbbcf201 set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents: 10
diff changeset
23 endif
0
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
24
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
25 all:
10
f769411a72ce setup for signed release builds
Carl Byington <carl@five-ten-sg.com>
parents: 8
diff changeset
26 hg pull; hg update
f769411a72ce setup for signed release builds
Carl Byington <carl@five-ten-sg.com>
parents: 8
diff changeset
27 make builder
f769411a72ce setup for signed release builds
Carl Byington <carl@five-ten-sg.com>
parents: 8
diff changeset
28
f769411a72ce setup for signed release builds
Carl Byington <carl@five-ten-sg.com>
parents: 8
diff changeset
29 builder:
27
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
30 rm -rf app/build/*
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
31 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
32 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
33 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
34 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
35 ls -al app/build/outputs/apk
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
36
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
37 docs:
807f7e4eaebe starting update to latest toolchain
Carl Byington <carl@five-ten-sg.com>
parents: 15
diff changeset
38 (cd xml; make)
0
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
39
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
40 install:
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
41 cp $(apk) $(dest)
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
42 ls -al $(apk) $(dest)
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
43
8
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
44 buildicon:
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
45 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
46 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
47 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
48 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
49 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
50 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
51
e7cdd6eaaeb3 use custom icon
Carl Byington <carl@five-ten-sg.com>
parents: 1
diff changeset
52 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
53 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
54 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
55 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
56 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
57 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
58
0
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
59 indentc:
31
0bc0b4798d9e fix saystring(12) command for proper unicode and document it
Carl Byington <carl@five-ten-sg.com>
parents: 29
diff changeset
60 dos2unix $(na)
0bc0b4798d9e fix saystring(12) command for proper unicode and document it
Carl Byington <carl@five-ten-sg.com>
parents: 29
diff changeset
61 for i in $(na); do sed -i -e 's/\r//g' $$i; done
0
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
62 indent --line-length100 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
63 --brace-indent4 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
64 --braces-on-if-line \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
65 --braces-on-func-def-line \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
66 --case-brace-indentation4 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
67 --case-indentation4 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
68 --comment-indentation60 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
69 --cuddle-else \
31
0bc0b4798d9e fix saystring(12) command for proper unicode and document it
Carl Byington <carl@five-ten-sg.com>
parents: 29
diff changeset
70 --cuddle-do-while \
0
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
71 --declaration-comment-column60 \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
72 --no-tabs \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
73 -nbbo \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
74 -npcs \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
75 -nprs \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
76 -npsl \
31
0bc0b4798d9e fix saystring(12) command for proper unicode and document it
Carl Byington <carl@five-ten-sg.com>
parents: 29
diff changeset
77 -bad -bap -bbb -sob \
0
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
78 -saf -sai -saw \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
79 -i4 \
31
0bc0b4798d9e fix saystring(12) command for proper unicode and document it
Carl Byington <carl@five-ten-sg.com>
parents: 29
diff changeset
80 $(na)
0
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
81
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
82 indentjava:
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
83 astyle --style=java \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
84 --attach-namespaces \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
85 --attach-classes \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
86 --indent-classes \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
87 --indent-switches \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
88 --indent-cases \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
89 --indent-namespaces \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
90 --break-blocks \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
91 --pad-oper \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
92 --pad-first-paren-out \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
93 --pad-header \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
94 --unpad-paren \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
95 --delete-empty-lines \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
96 --align-pointer=type \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
97 --break-closing-brackets \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
98 --keep-one-line-blocks \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
99 --keep-one-line-statements \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
100 --convert-tabs \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
101 --break-after-logical \
5564580fe160 initial version
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
102 --mode=java \
31
0bc0b4798d9e fix saystring(12) command for proper unicode and document it
Carl Byington <carl@five-ten-sg.com>
parents: 29
diff changeset
103 $(shell find . -iname '*.java' | grep -v /gen/)