Commit ba2ad0371cdd3c25116c3f93a11ed113d5c4a30e
1 parent
0d385abe
Exists in
master
and in
5 other branches
Incluindo construção automatica dos ícones
Showing
1 changed file
with
28 additions
and
2 deletions
Show diff stats
android/Makefile
| ... | ... | @@ -27,14 +27,40 @@ JAVAH=javah |
| 27 | 27 | NDKBUILD=/opt/android-ndk-r8/ndk-build |
| 28 | 28 | CLASSPATH=br/com/bb/pw3270 |
| 29 | 29 | |
| 30 | -Debug: jni/lib3270jni.h | |
| 30 | +MKDIR=/bin/mkdir -p | |
| 31 | +CONVERT=rsvg-convert | |
| 32 | + | |
| 33 | +RESOLUTION=xhdpi mdpi ldpi hdpi | |
| 34 | + | |
| 35 | +Debug: jni/lib3270jni.h $(foreach DIR, $(RESOLUTION), res/drawable-$(DIR)/ic_launcher.png) | |
| 31 | 36 | @$(NDKBUILD) |
| 32 | 37 | |
| 33 | 38 | clean: |
| 34 | 39 | @rm -fr obj |
| 35 | 40 | @rm -f jni/lib3270jni.h |
| 41 | + @rm -f $(foreach DIR, $(RESOLUTION), res/drawable-$(DIR)/ic_launcher.png) | |
| 42 | + | |
| 43 | +res/drawable-xhdpi/ic_launcher.png: ../src/pw3270/pixmaps/pw3270.svg | |
| 44 | + @echo " GEN `basename $@`" | |
| 45 | + @$(MKDIR) `dirname $@` | |
| 46 | + @$(CONVERT) --format=png --width=96 --height=96 --output=$@ $< | |
| 47 | + | |
| 48 | +res/drawable-mdpi/ic_launcher.png: ../src/pw3270/pixmaps/pw3270.svg | |
| 49 | + @echo " GEN `basename $@`" | |
| 50 | + @$(MKDIR) `dirname $@` | |
| 51 | + @$(CONVERT) --format=png --width=48 --height=48 --output=$@ $< | |
| 52 | + | |
| 53 | +res/drawable-ldpi/ic_launcher.png: ../src/pw3270/pixmaps/pw3270.svg | |
| 54 | + @echo " GEN `basename $@`" | |
| 55 | + @$(MKDIR) `dirname $@` | |
| 56 | + @$(CONVERT) --format=png --width=36 --height=36 --output=$@ $< | |
| 57 | + | |
| 58 | +res/drawable-hdpi/ic_launcher.png: ../src/pw3270/pixmaps/pw3270.svg | |
| 59 | + @echo " GEN `basename $@`" | |
| 60 | + @$(MKDIR) `dirname $@` | |
| 61 | + @$(CONVERT) --format=png --width=72 --height=72 --output=$@ $< | |
| 36 | 62 | |
| 37 | 63 | jni/lib3270jni.h: bin/classes/$(CLASSPATH)/lib3270.class |
| 38 | - @echo $@ ... | |
| 64 | + @echo " GEN `basename $@`" | |
| 39 | 65 | @$(JAVAH) -o $@ -classpath bin/classes $(subst /,.,$(CLASSPATH)).lib3270 |
| 40 | 66 | ... | ... |