Textures_factory/Makefile_subformats

19 lines
495 B
Text
Raw Permalink Normal View History

2021-12-15 20:55:20 +00:00
# Variables définitions
SRC := $(wildcard $(PNG1024_DIR)/*.png)
TARGET_512 :=$(subst $(PNG1024_DIR)/, $(PNG512_DIR)/, $(SRC))
TARGET_256 :=$(subst $(PNG1024_DIR)/, $(PNG256_DIR)/, $(SRC))
all: $(TARGET_512) $(TARGET_256)
$(PNG512_DIR)/%.png: $(PNG1024_DIR)/%.png
@ echo "Converting $< -> $@"
@ mkdir --parents $(PNG512_DIR)
@ convert $< -resize 50% $@
$(PNG256_DIR)/%.png: $(PNG1024_DIR)/%.png
@ echo "Converting $< -> $@"
@ mkdir --parents $(PNG256_DIR)
@ convert $< -resize 25% $@