Update 'palette-gen.js'

This commit is contained in:
2023-06-17 02:42:25 +02:00
committed by soraefir
parent 1563bb0815
commit fce65bdd30
24 changed files with 38 additions and 4 deletions

25
Makefile Normal file
View File

@ -0,0 +1,25 @@
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)
clean:
@rm -rf palette.in palette.out build