forked from meolunr/MBEStyle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
26 lines (20 loc) · 1.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
APK_OUTPUTS := app/build/outputs/apk
ICONS_TARGET_DIR := app/src/main/res/drawable-nodpi
ICONS_SOURCE_DIR := assets/icons
ICONS_SOURCE := $(wildcard ${ICONS_SOURCE_DIR}/*.png)
ICONS_PNG := $(notdir ${ICONS_SOURCE})
ICONS_TARGETS := $(addprefix ${ICONS_TARGET_DIR}/,${ICONS_PNG})
SHEET_TILES := 8
debug: ${APK_OUTPUTS}/debug/PixelStyle.apk
release: ${APK_OUTPUTS}/release/PixelStyle.apk
sheets: assets/dev/all-xxl.png
${ICONS_TARGETS}: ${ICONS_SOURCE}
@magick $(addprefix ${ICONS_SOURCE_DIR}/,$(notdir $@)) -scale 1200% $@
${APK_OUTPUTS}/debug/PixelStyle.apk: ${ICONS_TARGETS} app/src/main/res/xml/appfilter.xml
@./gradlew assembleDebug
${APK_OUTPUTS}/release/PixelStyle.apk: ${ICONS_TARGETS} app/src/main/res/xml/appfilter.xml
@./gradlew assembleRelease
assets/dev/all.png: ${ICONS_SOURCE}
@magick montage $^ -tile ${SHEET_TILES}x$(shell calc 'ceil ($(shell echo ${ICONS_SOURCE} | wc -w) / ${SHEET_TILES})' | xargs) -geometry 16x16+0+0 -background none $@
assets/dev/all-xxl.png: assets/dev/all.png
@magick $< -scale 1200% $@