Mercurial > 510Connectbot
annotate Makefile @ 497:73fa7329dc87
updates for android10+
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 06 Jun 2022 13:01:45 -0700 |
parents | 0a17c6e7cb0f |
children | 3feac274a27b |
rev | line source |
---|---|
0 | 1 #mc40 is "On Device Storage" |
2 #tc55 is "Internal Storage" | |
3 | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
4 na=$(shell find . -iname '*.c' -o -iname '*.h' -o -iname '*.cpp') |
438
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
5 style:=release |
479
3a83f40439d7
only bind to the MonitorService for localhost monitor connections
Carl Byington <carl@five-ten-sg.com>
parents:
459
diff
changeset
|
6 dest:=../ASM/Installers |
444
5a74f1b7c1db
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
443
diff
changeset
|
7 ver:=$(shell grep versionName app/src/main/AndroidManifest.xml | cut -d'"' -f2) |
5a74f1b7c1db
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
443
diff
changeset
|
8 id:=$(shell hg id --id || echo 1) |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
9 da:=$(shell date '+%Y-%m-%dT%H:%M:%S') |
438
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
10 version:=\ |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
11 <?xml version=\"1.0\" encoding=\"utf-8\"?>\n\ |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
12 <resources>\n\ |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
13 <string name=\"msg_version\" translatable=\"false\">510Connectbot $(ver) ($(id) $(da))</string>\n\ |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
14 </resources>\n |
493 | 15 apk:=$(dest)/510Connectbot-$(ver).$(style).apk |
16 signapk:=$(shell cat ~/.signapk) | |
438
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
17 |
170
f0f41cd3604b
set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents:
169
diff
changeset
|
18 ifeq ($(style),release) |
451
621313775834
only build arm package
Carl Byington <carl@five-ten-sg.com>
parents:
444
diff
changeset
|
19 task:=assembleArmRelease |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
20 debug:=0 |
170
f0f41cd3604b
set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents:
169
diff
changeset
|
21 else |
451
621313775834
only build arm package
Carl Byington <carl@five-ten-sg.com>
parents:
444
diff
changeset
|
22 task:=assembleArmDebug |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
23 debug:=1 |
493 | 24 signapk:= |
170
f0f41cd3604b
set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents:
169
diff
changeset
|
25 endif |
f0f41cd3604b
set debuggable flag depending on build style
Carl Byington <carl@five-ten-sg.com>
parents:
169
diff
changeset
|
26 |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
27 fn:=app/src/main/java/com/five_ten_sg/connectbot/monitor/MonitorService.java |
0 | 28 |
29 all: | |
493 | 30 make build.asm.packages |
73
accf93be8c12
update documentation; use xterm-256color as default terminal type
Carl Byington <carl@five-ten-sg.com>
parents:
1
diff
changeset
|
31 |
457
105815cce146
minimum version android 5, target and compile version api 28
Carl Byington <carl@five-ten-sg.com>
parents:
455
diff
changeset
|
32 builder: clean prep |
493 | 33 #ANDROID_HOME=/home/carl/Android/Sdk ANDROID_NDK_HOME=/home/carl/Android/Sdk/ndk-bundle ./gradlew $(task) |
34 echo ./gradlew $(task) | |
35 @echo -e "$(signapk)\n$(signapk)" | ./gradlew $(task) | |
454
7492d2cb7b75
update to latest toolchain, gradle 4.10.2
Carl Byington <carl@five-ten-sg.com>
parents:
451
diff
changeset
|
36 mv app/build/outputs/apk/arm/$(style)/app-arm-$(style).apk $(apk) |
0 | 37 |
457
105815cce146
minimum version android 5, target and compile version api 28
Carl Byington <carl@five-ten-sg.com>
parents:
455
diff
changeset
|
38 clean: |
105815cce146
minimum version android 5, target and compile version api 28
Carl Byington <carl@five-ten-sg.com>
parents:
455
diff
changeset
|
39 rm -rf app/build/* |
105815cce146
minimum version android 5, target and compile version api 28
Carl Byington <carl@five-ten-sg.com>
parents:
455
diff
changeset
|
40 rm -rf app/.externalNativeBuild || true |
105815cce146
minimum version android 5, target and compile version api 28
Carl Byington <carl@five-ten-sg.com>
parents:
455
diff
changeset
|
41 |
362
d51bf957d955
add help files to the web documentation
Carl Byington <carl@five-ten-sg.com>
parents:
360
diff
changeset
|
42 prep: |
457
105815cce146
minimum version android 5, target and compile version api 28
Carl Byington <carl@five-ten-sg.com>
parents:
455
diff
changeset
|
43 echo -e "$(version)" >app/src/main/res/values/version.xml |
362
d51bf957d955
add help files to the web documentation
Carl Byington <carl@five-ten-sg.com>
parents:
360
diff
changeset
|
44 (cd help; make) |
d51bf957d955
add help files to the web documentation
Carl Byington <carl@five-ten-sg.com>
parents:
360
diff
changeset
|
45 |
0 | 46 genkey: |
1
ab7313512aba
missing comma in DN, regenerate keystore
Carl Byington <carl@five-ten-sg.com>
parents:
0
diff
changeset
|
47 keytool -genkeypair -keystore 510Connectbot.keystore -alias 510Connectbot -dname "cn=510Connectbot , ou=510Connectbot, o=five-ten-sg, o=com, c=US" -keyalg RSA -keysize 2048 -validity 10000 |
0 | 48 |
483
84bab82d1f58
extract certificate from jks keystore
Carl Byington <carl@five-ten-sg.com>
parents:
479
diff
changeset
|
49 exportkey: |
84bab82d1f58
extract certificate from jks keystore
Carl Byington <carl@five-ten-sg.com>
parents:
479
diff
changeset
|
50 keytool -export -alias 510Connectbot -file 510Connectbot.crt -keystore 510Connectbot.keystore |
84bab82d1f58
extract certificate from jks keystore
Carl Byington <carl@five-ten-sg.com>
parents:
479
diff
changeset
|
51 openssl x509 -inform der -in 510Connectbot.crt -out 510Connectbot.pem |
84bab82d1f58
extract certificate from jks keystore
Carl Byington <carl@five-ten-sg.com>
parents:
479
diff
changeset
|
52 |
0 | 53 docs: |
54 (cd xml; make) | |
360
7eb24880b111
add help files to the web documentation
Carl Byington <carl@five-ten-sg.com>
parents:
332
diff
changeset
|
55 (cd help; make) |
0 | 56 |
116 | 57 buildicon: |
430
47de9ffed872
add feature icon for google play store
Carl Byington <carl@five-ten-sg.com>
parents:
378
diff
changeset
|
58 convert base.510.icon.png -background white -resize 500x500 -extent 1024x500 google.play.store/feature.510.icon.png |
438
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
59 cp -a base.510.icon.png app/src/main/res/drawable-xxxhdpi/icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
60 convert base.510.icon.png -resize 144x144 app/src/main/res/drawable-xxhdpi/icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
61 convert base.510.icon.png -resize 96x96 app/src/main/res/drawable-xhdpi/icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
62 convert base.510.icon.png -resize 72x72 app/src/main/res/drawable-hdpi/icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
63 convert base.510.icon.png -resize 48x48 app/src/main/res/drawable-mdpi/icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
64 convert base.510.icon.png -resize 36x36 app/src/main/res/drawable-ldpi/icon.png |
116 | 65 |
438
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
66 convert app/src/main/res/drawable-xxxhdpi/icon.png -resize 50% -colorspace Gray app/src/main/res/drawable-xxxhdpi/notification_icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
67 convert app/src/main/res/drawable-xxhdpi/icon.png -resize 50% -colorspace Gray app/src/main/res/drawable-xxhdpi/notification_icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
68 convert app/src/main/res/drawable-xhdpi/icon.png -resize 50% -colorspace Gray app/src/main/res/drawable-xhdpi/notification_icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
69 convert app/src/main/res/drawable-hdpi/icon.png -resize 50% -colorspace Gray app/src/main/res/drawable-hdpi/notification_icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
70 convert app/src/main/res/drawable-mdpi/icon.png -resize 50% -colorspace Gray app/src/main/res/drawable-mdpi/notification_icon.png |
d29cce60f393
migrate from Eclipse to Android Studio
Carl Byington <carl@five-ten-sg.com>
parents:
430
diff
changeset
|
71 convert app/src/main/res/drawable-ldpi/icon.png -resize 50% -colorspace Gray app/src/main/res/drawable-ldpi/notification_icon.png |
0 | 72 |
73 indentc: | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
74 dos2unix $(na) |
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
75 for i in $(na); do sed -i -e 's/\r//g' $$i; done |
0 | 76 indent --line-length100 \ |
77 --brace-indent4 \ | |
78 --braces-on-if-line \ | |
79 --braces-on-func-def-line \ | |
80 --case-brace-indentation4 \ | |
81 --case-indentation4 \ | |
82 --comment-indentation60 \ | |
83 --cuddle-else \ | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
84 --cuddle-do-while \ |
0 | 85 --declaration-comment-column60 \ |
86 --no-tabs \ | |
87 -nbbo \ | |
88 -npcs \ | |
89 -nprs \ | |
90 -npsl \ | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
91 -bad -bap -bbb -sob \ |
0 | 92 -saf -sai -saw \ |
93 -i4 \ | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
94 $(na) |
0 | 95 |
96 | |
97 indentjava: | |
98 astyle --style=java \ | |
99 --attach-namespaces \ | |
100 --attach-classes \ | |
101 --indent-classes \ | |
102 --indent-switches \ | |
103 --indent-cases \ | |
104 --indent-namespaces \ | |
105 --break-blocks \ | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
106 --pad-oper \ |
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
107 --pad-first-paren-out \ |
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
108 --pad-header \ |
332 | 109 --unpad-paren \ |
0 | 110 --delete-empty-lines \ |
111 --align-pointer=type \ | |
112 --break-closing-brackets \ | |
113 --keep-one-line-blocks \ | |
114 --keep-one-line-statements \ | |
115 --convert-tabs \ | |
116 --break-after-logical \ | |
117 --mode=java \ | |
459
a3239022798d
compile 32 and 64 bit arch, bump version
Carl Byington <carl@five-ten-sg.com>
parents:
457
diff
changeset
|
118 $(shell find . -iname '*.java' | grep -v /gen/) |
0 | 119 |
120 internaldocs: | |
121 doxygen | |
479
3a83f40439d7
only bind to the MonitorService for localhost monitor connections
Carl Byington <carl@five-ten-sg.com>
parents:
459
diff
changeset
|
122 |
3a83f40439d7
only bind to the MonitorService for localhost monitor connections
Carl Byington <carl@five-ten-sg.com>
parents:
459
diff
changeset
|
123 |
3a83f40439d7
only bind to the MonitorService for localhost monitor connections
Carl Byington <carl@five-ten-sg.com>
parents:
459
diff
changeset
|
124 build.asm.packages: |
493 | 125 make prep |
479
3a83f40439d7
only bind to the MonitorService for localhost monitor connections
Carl Byington <carl@five-ten-sg.com>
parents:
459
diff
changeset
|
126 make builder style=release |
3a83f40439d7
only bind to the MonitorService for localhost monitor connections
Carl Byington <carl@five-ten-sg.com>
parents:
459
diff
changeset
|
127 make builder style=debug |
492
e88d48be89a8
add TCP_NODELAY to the monitor socket
Carl Byington <carl@five-ten-sg.com>
parents:
483
diff
changeset
|
128 |
e88d48be89a8
add TCP_NODELAY to the monitor socket
Carl Byington <carl@five-ten-sg.com>
parents:
483
diff
changeset
|
129 # |
e88d48be89a8
add TCP_NODELAY to the monitor socket
Carl Byington <carl@five-ten-sg.com>
parents:
483
diff
changeset
|
130 # release procedure |
e88d48be89a8
add TCP_NODELAY to the monitor socket
Carl Byington <carl@five-ten-sg.com>
parents:
483
diff
changeset
|
131 # make any changes |
e88d48be89a8
add TCP_NODELAY to the monitor socket
Carl Byington <carl@five-ten-sg.com>
parents:
483
diff
changeset
|
132 # hg commit -m 'commit message' |
e88d48be89a8
add TCP_NODELAY to the monitor socket
Carl Byington <carl@five-ten-sg.com>
parents:
483
diff
changeset
|
133 # make build.asm.packages |