-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (25 loc) · 880 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
TILED=tiled
KRITA=krita
OPNG=optipng
#XMLStarlet
XML=xml
# https://git.cccv.de/hub/walint/
# precompiled binaries at https://git.cccv.de/hub/walint/-/jobs
LINT=walint
TMX=$(patsubst %.tmx,%.json,$(wildcard *.tmx))
KRA=$(patsubst %.kra,%.png,$(wildcard pics/*.kra))
.PHONY: all lint
all: $(TMX) $(KRA) LICENSE.md
%.json: %.tmx tilesets/*.tsx
$(TILED) --export-map --embed-tilesets "$<" "$@"
%.png: %.kra %/*.png
$(KRITA) --export --export-filename "$@" "$<"
$(OPNG) -o7 -zm1-9 "$@"
LICENSE.md: LICENSE.links.md *.tmx tilesets/*.tsx
-echo "*This file got generated*" > $@
-echo >> $@
find . -maxdepth 1 -name "*.tmx" -exec xml sel -T -t -m '//property[@name="mapCopyright"]' -v . -n -n {} \; >> $@
find tilesets -name "*.tsx" -exec xml sel -T -t -m '//property[@name="tilesetCopyright"]' -v . -n -n {} \; >> $@
cat $< >> $@
lint:
$(LINT) --config-file=lintconfig.json