summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-03-11 17:52:44 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2014-03-11 17:52:44 -0400
commit39e4c20cf742ca57da48db8c1b9f0fd09f7f038c (patch)
tree6fdc78ba75d02d1bf85a62967b24f799acad45cc /Makefile
parent69890d17a01426cf7de8b6aa1dc64b56dfb7449d (diff)
parent6c7ec4995dc309715c0cfc769d523afb173cd983 (diff)
downloadhtml5ks-39e4c20cf742ca57da48db8c1b9f0fd09f7f038c.tar.xz
html5ks-39e4c20cf742ca57da48db8c1b9f0fd09f7f038c.zip
Merge branch 'master' of happinessforme.com:html5ks
Conflicts: Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 15 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 4ce5698..dced9c9 100644
--- a/Makefile
+++ b/Makefile
@@ -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
@@ -223,6 +223,7 @@ images: $(CIMAGE)
www/dump/ui/ctc_strip.webp: www/dump/ui/ctc_strip.png
define png2webp =
+ $(CWEBP) -q 99 "$<" -o "$@"
$(PNGQUANT) --force --speed 1 --ext .png "$<"
$(if $(ZOPFLIPNG), $(ZOPFLIPNG) -m -y "$<" "$<")
$(if $(DEFLOPT), $(DEFLOPT) "$<")
@@ -231,11 +232,10 @@ define png2webp =
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: www/dump/ui/icon.png
$(CONVERT) "$<" -resize 256x256 -transparent white "$@"
@@ -247,11 +247,15 @@ www/dump/ui/bt-cf-unchecked.webp www/dump/ui/bt-cf-checked.webp: %.webp: %.png
www/dump/ui/ctc_strip-0.png: $(CTC_ANIM_SRC)
$(CONVERT) "$<" -crop 16x16 www/dump/ui/ctc_strip-%d.png
-www/dump/ui/ctc_strip-%.png: $(CTC_ANIM_SRC) www/dump/ui/ctc_strip-0.png
+$(DUMP)/ui/ctc_strip.webp: $(DUMP)/ui/ctc_strip.png
@
-www/dump/ui/ctc_anim.png: $(CTC_ANIM_TMP)
- $(APNGASM) "$@" $^ 3 100
+$(DUMP)/ui/ctc_strip-%.png: $(CTC_ANIM_SRC) $(DUMP)/ui/ctc_strip-0.png
+ @
+
+# depend on webp to wait for recompression
+$(DUMP)/ui/ctc_anim.png: $(CTC_ANIM_TMP_WEBP)
+ $(APNGASM) "$@" $(CTC_ANIM_TMP) 3 100
www/dump/ui/ctc_anim.webp: $(CTC_ANIM_TMP_WEBP)
$(WEBPMUX) -frame $(subst $(SPACE), +30 -frame ,$^) +30 -loop 0 -o "$@"
@@ -265,8 +269,9 @@ space:
$(RM) -r www/dump/font
$(RM) $(WAV) $(VIDEO) $(CTC_ANIM_TMP) $(CTC_ANIM_TMP_WEBP) $(JSOUT) $(JSOUT).map
-watch:
+dev:
$(MAKE)
+ ./nginx.sh
while inotifywait -r -e modify,delete,move --exclude="^\./\.git" --exclude="\.swp.?$$" .; do \
$(MAKE); \
done
@@ -276,5 +281,6 @@ watch:
MAKEFLAGS=-r -L
.SUFFIXES:
+.PRECIOUS: $(WAV)
.INTERMEDIATE: $(JSONO) $(Y4M) $(CTC_ANIM_TMP) $(CTC_ANIM_TMP_WEBP)
-.PHONY: video audio images js json jshint space watch
+.PHONY: video audio images js jshint clean space watch