summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-11-26 20:53:15 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2013-11-26 20:53:15 -0500
commit10ded496d84b208d61cbd956ce28934c886ef8e6 (patch)
treeb0239cca72fc75be61b172488d0e029d91d4911e
parent9d86b215eb990ca52af89c94776dae24f4463e46 (diff)
downloadhtml5ks-10ded496d84b208d61cbd956ce28934c886ef8e6.tar.xz
html5ks-10ded496d84b208d61cbd956ce28934c886ef8e6.zip
Build stuff.
-rw-r--r--Makefile8
-rwxr-xr-xsetup.sh10
2 files changed, 11 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 5b0b99d..2d29b9d 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ OPUSENC ?= opusenc
ZOPFLIPNG ?= zopflipng
JPEGOPTIM ?= jpegoptim
CWEBP ?= cwebp
+CONVERT ?= convert
DUMP ?= www/dump
@@ -53,7 +54,7 @@ JPG := $(shell find $(DUMP) -name '*.jpg')
WEBP := $(patsubst %.png,%.webp,$(PNG)) \
$(patsubst %.jpg,%.webp,$(JPG))
-images: $(WEBP)
+images: $(WEBP) favicon.ico
%.webp: %.png
$(ZOPFLIPNG) -m -y $< $<
@@ -63,7 +64,10 @@ images: $(WEBP)
$(JPEGOPTIM) --strip-all $<
$(CWEBP) -q 90 -m 6 $< -o $@
+www/favicon.ico: www/dump/ui/icon.png
+ $(CONVERT) $< -resize 256x256 -transparent white $@
+
clean:
- rm $(CVIDEO) $(CAUDIO) $(WEBP)
+ $(RM) $(CVIDEO) $(CAUDIO) $(WEBP)
.PHONY: video audio images clean
diff --git a/setup.sh b/setup.sh
index ff4fda9..bcd9b26 100755
--- a/setup.sh
+++ b/setup.sh
@@ -9,13 +9,13 @@ make install
popd
trim() {
- convert -trim "$@" "$@"
+ for f in "$@"; do
+ convert -trim "$f" "$f"
+ done
optipng -o7 "$@"
}
-trim www/dump/ui/bt-cf-unchecked.png
-trim www/dump/ui/bt-cf-checked.png
+trim www/dump/ui/bt-cf-unchecked.png www/dump/ui/bt-cf-checked.png
-make
+make ${MAKEOPTS}
-convert www/dump/ui/icon.png -resize 256x256 -transparent white www/favicon.ico