]> Pileus Git - ~andy/spades/blobdiff - makefile
Update graphics branch
[~andy/spades] / makefile
index 0e800dcca1c57b1ccab160ab387ade52e8e9fb28..6964ec3a317af28345701e9e154a053260938276 100644 (file)
--- a/makefile
+++ b/makefile
@@ -24,17 +24,41 @@ clean:
        rm -rf bin gen obj
 
 logcat:
-       adb logcat Spades:D '*:S'
+       adb logcat Spades:D AndroidRuntime:E '*:S'
 
 run: bin/install.stamp
        adb shell am start -W -a android.intent.action.MAIN -n $(PACKAGE)/.Main
-       
 
 install bin/install.stamp: $(OUTPUT)
-       adb uninstall $(PACKAGE)
        adb install -r $+
        touch bin/install.stamp
 
+uninstall:
+       adb uninstall $(PACKAGE)
+       rm bin/install.stamp
+
+graphics:
+       git checkout graphics  --    \
+               'opt/drawable/*.svg' \
+               'opt/drawable/*.xcf' \
+               'res/drawable/*.png' \
+               'res/drawable/*.jpg'
+       git reset HEAD --            \
+               'opt/drawable/*.svg' \
+               'opt/drawable/*.xcf' \
+               'res/drawable/*.png' \
+               'res/drawable/*.jpg'
+
+convert:
+       for svg in opt/drawable/*.svg; do        \
+               png=$${svg/svg/png};             \
+               png=$${png/opt/res};             \
+               rsvg-convert -w 2048 -h 2048     \
+                       $$svg -o $$png;          \
+               convert -trim -resize '256x256!' \
+                       $$png $$png;             \
+       done
+
 # Rules
 %.apk: %.dex %.res | bin
        @echo "APK    $@.in"