forked from ckuhl/ImageBlockX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (33 loc) · 868 Bytes
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
PROJECT_NAME=image-block-x
EXCLUDE := .git Makefile README.md .gitignore icons/*.svg
ICONS := \
icons/image-16.png \
icons/image-24.png \
icons/image-32.png \
icons/image-64.png \
icons/image-128.png \
icons/image-256.png \
icons/image-512.png
ICONS_BLOCKED := \
icons/image_blocked-16.png \
icons/image_blocked-24.png \
icons/image_blocked-32.png \
icons/image_blocked-64.png \
icons/image_blocked-128.png \
icons/image_blocked-256.png \
icons/image_blocked-512.png
all: make
make: gen_ico
zip -r ./${PROJECT_NAME}.zip * -x ${EXCLUDE}
gen_ico: $(ICONS) $(ICONS_BLOCKED)
icons/image-%.png:
$(call conv,$*)
icons/image_blocked-%.png:
$(call conv,$*,"_blocked")
define conv
convert -transparent white -geometry $1x$1 \
icons/image$2.svg icons/image$2-$1.png
endef
.PHONY: clean
clean:
rm -fv ${PROJECT_NAME}.zip icons/*.png