diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-05-21 00:13:31 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-05-21 00:13:31 -0400 |
commit | 3270f8a28ba180f06076fbf244a6fb31dbdfdbed (patch) | |
tree | a0c15ce7e18df15f82972f294a1dabedea47cf41 | |
parent | 2115f39810df87050097173ff9ab7820c2ffbb1a (diff) |
Teach the Makefile to create the .apk (unsigned)
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile | 43 | ||||
-rw-r--r-- | res/drawable-hdpi/minak.png | bin | 6213 -> 6538 bytes | |||
-rw-r--r-- | res/drawable-mdpi/minak.png | bin | 3925 -> 4019 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/minak.png | bin | 9112 -> 9588 bytes | |||
-rw-r--r-- | res/drawable-xxhdpi/minak.png | bin | 14978 -> 15850 bytes | |||
-rw-r--r-- | res/drawable-xxxhdpi/minak.png | bin | 21843 -> 23201 bytes |
7 files changed, 35 insertions, 10 deletions
@@ -1,6 +1,8 @@ /.settings /bin /gen +/build.xml +/local.properties *~ .nfs* @@ -1,32 +1,55 @@ +# Programs ##################################################################### + +# Usage: $(call SVG2PNG,in-file,out-file[,width,height,background-color]) # SVG2PNG: Each is buggy in their own way # ImageMagick: doesn't support transparency -#SVG2PNG = convert $1 -format png $(if $3,-resize $3x)$(if $4,$4) $(if $5,-bacground $5) $2 +#SVG2PNG = convert $1 -format png $(if $3,-resize $3x)$(if $4,$4) $(if $5,-background $5) $2 # librsvg: doesn't support <style> element #SVG2PNG = rsvg-convert $1 -o $2 $(if $3,-w $3) $(if $4,-h $4) $(if $5,--background-color=$5) # Inkscape: messes up gradients -_SVG2PNG = inkscape $1 --export-png $2 $(if $3,-w $3) $(if $4,-h $4) $(if $5,-b '$5') +SVG2PNG = inkscape $1 --export-png $2 $(if $3,-w $3) $(if $4,-h $4) $(if $5,-b '$5') + +ANDROID = android +ANT = ant +MKDIRS = mkdir -p +RM = rm -f -# Hacky thing to also run it through pngcrush -SVG2PNG = { $(call _SVG2PNG,$1,$2.tmp.png,$3) && pngcrush $2.tmp.png $2 && rm $2.tmp.png; } || { rm $2.tmp.png; false; } +################################################################################ icons = minak densities = mdpi hdpi xhdpi xxhdpi xxxhdpi -all: $(addsuffix $(addsuffix .png,$(icons)),$(addprefix res/drawable-,$(addsuffix /,$(densities)))) +resources = $(addsuffix $(addsuffix .png,$(icons)),$(addprefix res/drawable-,$(addsuffix /,$(densities)))) + +all: bin/minak-release-unsigned.apk + +bin/minak-release-unsigned.apk: $(resources) build.xml + $(ANT) release + +build.xml: + $(ANDROID) update project -p . res/drawable-mdpi/%.png: res/drawable/%.svg - mkdir -p $(@D) + $(MKDIRS) $(@D) $(call SVG2PNG,$<,$@,48) res/drawable-hdpi/%.png: res/drawable/%.svg - mkdir -p $(@D) + $(MKDIRS) $(@D) $(call SVG2PNG,$<,$@,72) res/drawable-xhdpi/%.png: res/drawable/%.svg - mkdir -p $(@D) + $(MKDIRS) $(@D) $(call SVG2PNG,$<,$@,96) res/drawable-xxhdpi/%.png: res/drawable/%.svg - mkdir -p $(@D) + $(MKDIRS) $(@D) $(call SVG2PNG,$<,$@,144) res/drawable-xxxhdpi/%.png: res/drawable/%.svg - mkdir -p $(@D) + $(MKDIRS) $(@D) $(call SVG2PNG,$<,$@,192) +clean: PHONY + $(RM) -r bin gen build.xml +distclean: clean PHONY + $(RM) local.properties +maintainerclean: distclean PHONY + $(RM) -- $(resources) + .DELETE_ON_ERROR: +.PHONY: PHONY diff --git a/res/drawable-hdpi/minak.png b/res/drawable-hdpi/minak.png Binary files differindex d045266..6f37351 100644 --- a/res/drawable-hdpi/minak.png +++ b/res/drawable-hdpi/minak.png diff --git a/res/drawable-mdpi/minak.png b/res/drawable-mdpi/minak.png Binary files differindex 468620d..0c50a08 100644 --- a/res/drawable-mdpi/minak.png +++ b/res/drawable-mdpi/minak.png diff --git a/res/drawable-xhdpi/minak.png b/res/drawable-xhdpi/minak.png Binary files differindex 906e11c..bc54b6f 100644 --- a/res/drawable-xhdpi/minak.png +++ b/res/drawable-xhdpi/minak.png diff --git a/res/drawable-xxhdpi/minak.png b/res/drawable-xxhdpi/minak.png Binary files differindex 6dc30bb..1c5ca0a 100644 --- a/res/drawable-xxhdpi/minak.png +++ b/res/drawable-xxhdpi/minak.png diff --git a/res/drawable-xxxhdpi/minak.png b/res/drawable-xxxhdpi/minak.png Binary files differindex 85f1f90..cdc8147 100644 --- a/res/drawable-xxxhdpi/minak.png +++ b/res/drawable-xxxhdpi/minak.png |