Textures_factory/Makefile_subformats
2021-12-15 21:55:20 +01:00

19 lines
495 B
Plaintext

# 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% $@