2023-06-17 13:37:55 +02:00

22 lines
488 B
Makefile

SRCDIR:= img
DSTDIR:= build
SOURCES := $(wildcard $(SRCDIR)/*)
FILES := $(patsubst $(SRCDIR)/%,$(DSTDIR)/%,$(SOURCES))
palette.out: palette.in
node palette-gen.js < palette.in > palette.out
builddir:
@mkdir -p build
build/%.jpg: builddir palette.out img/%.jpg
repalette $@ build/$@ -p $(cat palette.out) --dither $(DITHER)
build/%.png: builddir palette.out img/%.png
repalette $@ build/$@ -p $(cat palette.out) --dither $(DITHER)
all: $(FILES)
@echo $(SOURCES)
@echo $(FILES)