27 lines
740 B
Makefile
27 lines
740 B
Makefile
|
|
SRCDIR:= img
|
|
DSTDIR:= build
|
|
SOURCES := $(wildcard $(SRCDIR)/*)
|
|
FILES := $(patsubst $(SRCDIR)/%,$(DSTDIR)/%,$(SOURCES))
|
|
|
|
all: $(FILES)
|
|
@echo $(SOURCES)
|
|
@echo $(FILES)
|
|
|
|
palette.out: palette.in
|
|
node palette-gen.js < palette.in > palette.out
|
|
|
|
builddir:
|
|
@mkdir -p build
|
|
|
|
build/%.jpg: img/%.jpg builddir palette.out
|
|
@echo repalette $< $@ -p $$(cat palette.out) --dither $$DITHER
|
|
repalette $< $@ -p $$(cat palette.out) --dither $$DITHER
|
|
|
|
build/%.png: img/%.png builddir palette.out
|
|
@echo repalette $< $@ -p $$(cat palette.out) --dither $$DITHER
|
|
@echo $$DITHER ${DITHER} $${DITHER}
|
|
repalette $< $@ -p $$(cat palette.out) --dither $$DITHER
|
|
|
|
clean:
|
|
@rm -rf palette.in palette.out buildsha256-SDBYfjcax0XxVZcDRe5kCcPUOWaserg7v+wX747TwF8=
|