BTILE_DIRS=wall floor tunnel underground
BTILE_SRC=$(shell find $(patsubst %, $(VPATH)/bitmap/%, $(BTILE_DIRS)) -name "*.png")
-BTILE_PNGS=$(patsubst $(VPATH)/bitmap/%, %, $(BTILE_SRC))
+BTILE_PNGS=$(patsubst $(VPATH)/bitmap/%, bunker/%, $(BTILE_SRC))
# Vector images to rasterize without resizing
# Bitmap tile rule
define btile
-$(1)/%.png: bitmap/$(1)/%.png
- @mkdir -p `dirname bunker/$$@`
- @convert $$< -resize 64x64 bunker/$$@
+bunker/$(1)/%.png: bitmap/$(1)/%.png
+ @mkdir -p `dirname $$@`
+ @convert $$< -resize 64x64 $$@
endef
$(foreach tiledir,$(BTILE_DIRS),$(eval $(call btile,$(tiledir))))