switch from quad9 to cloudflare
[projets/cm-custom.git] / Makefile
1 PRIVKEY = tools/testkey.pk8
2 PUBKEY = tools/testkey.x509.pem
3
4 ZIPS_DIRS = $(wildcard dist-*)
5 FILES_COMMON = $(shell find META-INF -type f)
6
7 .SECONDEXPANSION:
8 .PHONY: $(ZIPS_DIRS:dist-%=clean-%)
9
10 #all: $(ZIPS_DIRS:dist-%=cm-custom-%-signed.zip)
11 all: $(ZIPS_DIRS:dist-%=cm-custom-%.zip)
12
13 clean: $(ZIPS_DIRS:dist-%=clean-%)
14
15 # clean targets
16 $(ZIPS_DIRS:dist-%=clean-%):
17         rm -f $(@:clean-%=cm-custom-%.zip) $(@:clean-%=cm-custom-%-signed.zip)
18
19 # signature targets
20 $(ZIPS_DIRS:dist-%=cm-custom-%-signed.zip): cm-custom-%-signed.zip : cm-custom-%.zip
21         java -jar tools/SignApk.jar -w -a 4 $(PUBKEY) $(PRIVKEY) $< $@
22         @echo "$@ is ready"
23
24 # build target
25 $(ZIPS_DIRS:dist-%=cm-custom-%.zip): cm-custom-%.zip : $(FILES_COMMON) $$(shell find dist-$$* -type f)
26         zip $@ $(FILES_COMMON)
27         cd dist-$* && \
28                 zip ../$@ $$(find . -type f)
29