Mercurial > 510ConnectbotMonitor
annotate Makefile @ 32:759c61d72006 default tip
fix makefile for xml docs
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sun, 28 Apr 2019 17:20:53 -0700 |
parents | 0bc0b4798d9e |
children |
rev | line source |
---|---|
0 | 1 #mc40 is "On Device Storage" |
2 #tc55 is "Internal Storage" | |
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 | 24 |
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 | 39 |
40 install: | |
41 cp $(apk) $(dest) | |
42 ls -al $(apk) $(dest) | |
43 | |
8 | 44 buildicon: |
45 cp -a base.510.icon.png res/drawable-xxxhdpi/icon.png | |
46 convert base.510.icon.png -resize 144x144 res/drawable-xxhdpi/icon.png | |
47 convert base.510.icon.png -resize 96x96 res/drawable-xhdpi/icon.png | |
48 convert base.510.icon.png -resize 72x72 res/drawable-hdpi/icon.png | |
49 convert base.510.icon.png -resize 48x48 res/drawable-mdpi/icon.png | |
50 convert base.510.icon.png -resize 36x36 res/drawable-ldpi/icon.png | |
51 | |
52 convert res/drawable-xxxhdpi/icon.png -resize 50% -colorspace Gray res/drawable-xxxhdpi/notification_icon.png | |
53 convert res/drawable-xxhdpi/icon.png -resize 50% -colorspace Gray res/drawable-xxhdpi/notification_icon.png | |
54 convert res/drawable-xhdpi/icon.png -resize 50% -colorspace Gray res/drawable-xhdpi/notification_icon.png | |
55 convert res/drawable-hdpi/icon.png -resize 50% -colorspace Gray res/drawable-hdpi/notification_icon.png | |
56 convert res/drawable-mdpi/icon.png -resize 50% -colorspace Gray res/drawable-mdpi/notification_icon.png | |
57 convert res/drawable-ldpi/icon.png -resize 50% -colorspace Gray res/drawable-ldpi/notification_icon.png | |
58 | |
0 | 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 | 62 indent --line-length100 \ |
63 --brace-indent4 \ | |
64 --braces-on-if-line \ | |
65 --braces-on-func-def-line \ | |
66 --case-brace-indentation4 \ | |
67 --case-indentation4 \ | |
68 --comment-indentation60 \ | |
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 | 71 --declaration-comment-column60 \ |
72 --no-tabs \ | |
73 -nbbo \ | |
74 -npcs \ | |
75 -nprs \ | |
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 | 78 -saf -sai -saw \ |
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 | 81 |
82 indentjava: | |
83 astyle --style=java \ | |
84 --attach-namespaces \ | |
85 --attach-classes \ | |
86 --indent-classes \ | |
87 --indent-switches \ | |
88 --indent-cases \ | |
89 --indent-namespaces \ | |
90 --break-blocks \ | |
91 --pad-oper \ | |
92 --pad-first-paren-out \ | |
93 --pad-header \ | |
94 --unpad-paren \ | |
95 --delete-empty-lines \ | |
96 --align-pointer=type \ | |
97 --break-closing-brackets \ | |
98 --keep-one-line-blocks \ | |
99 --keep-one-line-statements \ | |
100 --convert-tabs \ | |
101 --break-after-logical \ | |
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/) |