diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 10 insertions, 14 deletions
@@ -4,7 +4,7 @@ SPACE := $(null) $(null) FFMPEG ?= ffmpeg FFMPEG += -v warning -y CWEBP ?= cwebp -CWEBP += -quiet -alpha_cleanup +CWEBP += -quiet -alpha_cleanup -m 6 WEBPMUX ?= webpmux CONVERT ?= convert APNGASM ?= apngasm @@ -17,7 +17,7 @@ PACKR ?= packr CLOSURE_COMPILER ?= java -jar compiler.jar ifndef MINIMAL ZOPFLIPNG ?= zopflipng -DEFLOPT ?= wine DeflOpt +#DEFLOPT ?= wine DeflOpt DEFLUFF ?= defluff PNGQUANT ?= pngquant endif @@ -108,25 +108,19 @@ images: $(CIMAGE) $(DUMP)/ui/ctc_strip.webp: $(DUMP)/ui/ctc_strip.png define png2webp = + $(CWEBP) -q 99 "$<" -o "$@" $(PNGQUANT) --force --speed 1 --ext .png "$<" -ifdef ZOPFLIPNG - $(ZOPFLIPNG) -m -y "$<" "$<" -endif -ifdef DEFLOPT - $(DEFLOPT) "$<" -endif -ifdef DEFLUFF - $(DEFLUFF) < "$<" > "$<".tmp + $(if $(ZOPFLIPNG), $(ZOPFLIPNG) -m -y "$<" "$<") + $(if $(DEFLOPT),$(DEFLOPT) "$<") + $(if $(DEFLUFF),$(DEFLUFF) < "$<" > "$<".tmp) mv -f "$<".tmp "$<" -endif endef %.webp: %.png - $(CWEBP) -q 99 -m 6 "$<" -o "$@" $(png2webp) %.webp: %.jpg - $(CWEBP) -q 90 -m 6 "$<" -o "$@" + $(CWEBP) -q 90 "$<" -o "$@" www/favicon.ico: $(DUMP)/ui/icon.png $(CONVERT) "$<" -resize 256x256 -transparent white "$@" @@ -141,7 +135,8 @@ $(DUMP)/ui/ctc_strip-0.png: $(CTC_ANIM_SRC) $(DUMP)/ui/ctc_strip-%.png: $(CTC_ANIM_SRC) $(DUMP)/ui/ctc_strip-0.png @ -$(DUMP)/ui/ctc_anim.png: $(CTC_ANIM_TMP) +# depend on webp to wait for recompression +$(DUMP)/ui/ctc_anim.png: $(CTC_ANIM_TMP_WEBP) $(APNGASM) "$@" $^ 3 100 $(DUMP)/ui/ctc_anim.webp: $(CTC_ANIM_TMP_WEBP) @@ -202,5 +197,6 @@ watch: MAKEFLAGS=-r .SUFFIXES: +.SECONDARY: $(WAV) .INTERMEDIATE: $(Y4M) $(CTC_ANIM_TMP) $(CTC_ANIM_TMP_WEBP) .PHONY: video audio images js jshint clean space watch |