diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2014-02-27 15:45:42 -0500 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2014-02-27 16:49:35 -0500 |
commit | 84250d6a817b6dc6ad426055d76e4bdb0262cba5 (patch) | |
tree | 310a2b38882abc59b6d47a3e6b3039eec6d309c1 | |
parent | cdfb9bbb3f7760a204c2d7d5b473b159fbff9785 (diff) | |
download | html5ks-84250d6a817b6dc6ad426055d76e4bdb0262cba5.tar.xz html5ks-84250d6a817b6dc6ad426055d76e4bdb0262cba5.zip |
more build system stuff
-rwxr-xr-x | .travis.sh | 2 | ||||
-rw-r--r-- | Makefile | 28 |
2 files changed, 16 insertions, 14 deletions
@@ -17,6 +17,8 @@ case "$1" in curl http://dl.katawa-shoujo.com/gold_1.1/%5B4ls%5D_katawa_shoujo_1.1-%5Blinux-x86%5D%5BB5C707D5%5D.tar.bz2 | tar -xj --strip-components 2 --wildcards "Katawa Shoujo-linux-x86/game/script-a*.rpyc" "Katawa Shoujo-linux-x86/game/imachine.rpyc" "Katawa Shoujo-linux-x86/game/ui-strings*.rpyc" "Katawa Shoujo-linux-x86/game/data.rpa" mv *.rpyc unrpyc + + npm config set tmp /tmp ;; install) MAKEOPTS="-s ${MAKEOPTS}" @@ -9,12 +9,7 @@ WEBPMUX ?= webpmux CONVERT ?= convert APNGASM ?= apngasm UGLIFYJS ?= uglifyjs -ifdef MINIMAL -ZOPFLIPNG ?= : -DEFLOPT ?= : -DEFLUFF ?= cat -PNGQUANT ?= : -else +ifndef MINIMAL ZOPFLIPNG ?= zopflipng DEFLOPT ?= wine DeflOpt DEFLUFF ?= defluff @@ -106,13 +101,23 @@ images: $(CIMAGE) $(DUMP)/ui/ctc_strip.webp: $(DUMP)/ui/ctc_strip.png -%.webp: %.png - $(CWEBP) -q 99 -m 6 "$<" -o "$@" +define png2webp = $(PNGQUANT) --force --speed 1 --ext .png "$<" +ifdef ZOPFLIPNG $(ZOPFLIPNG) -m -y "$<" "$<" +endif +ifdef DEFLOPT $(DEFLOPT) "$<" +endif +ifdef 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 "$@" @@ -122,12 +127,7 @@ www/favicon.ico: $(DUMP)/ui/icon.png $(DUMP)/ui/bt-cf-unchecked.webp $(DUMP)/ui/bt-cf-checked.webp: %.webp: %.png $(CONVERT) -trim "$<" "$<" - $(CWEBP) -q 99 -m 6 "$<" -o "$@" - $(PNGQUANT) --force --speed 1 --ext .png "$<" - $(ZOPFLIPNG) -m -y "$<" "$<" - $(DEFLOPT) "$<" - $(DEFLUFF) < "$<" > "$<".tmp - mv -f "$<".tmp "$<" + $(png2webp) $(DUMP)/ui/ctc_strip-0.png: $(CTC_ANIM_SRC) $(CONVERT) "$<" -crop 16x16 $(DUMP)/ui/ctc_strip-%d.png |