23 lines
482 B
Makefile
Raw Permalink Normal View History

2023-06-17 02:42:25 +02:00
SRCDIR:= img
DSTDIR:= build
SOURCES := $(shell find ${SRCDIR} -type f -print)
FILES := $(patsubst $(SRCDIR)/%,$(DSTDIR)/%,$(SOURCES))
all: $(FILES)
palette.out: palette.in
node palette-gen.js
builddir:
@mkdir -p build
@mkdir -p build/gif
build/%: img/% builddir palette.out
repalette $< $@ -p $$(cat palette.out) --dither $(DITHER)
build/%.gif: img/%.gif builddir palette.out
gifsicle --use-colormap gifpalette.out < $< > $@
clean:
@rm -rf palette.in palette.out build