summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-05-02 10:32:16 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2014-05-02 10:32:16 -0400
commit2e9bfa707b33f7e371088b66e75f4e76f90ebcee (patch)
tree08261187323f5ae2e72ce178acd5df5af1701f5e /Makefile
parente417662dce5cae2e95ef98ee38baa8f53a02b9d5 (diff)
downloadhtml5ks-2e9bfa707b33f7e371088b66e75f4e76f90ebcee.tar.xz
html5ks-2e9bfa707b33f7e371088b66e75f4e76f90ebcee.zip
new image system
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 12 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 58f9960..fc1fdbc 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,16 @@ include Makefile.inc
UGLIFYJS := node_modules/.bin/uglifyjs $(UGLIFYJSFLAGS)
+%.gz: %
+ifdef GZIP
+ifdef DEFLUFF
+ $(GZIP) -c $< | $(DEFLUFF) > $@
+else
+ $(GZIP) -c $< > $@
+endif
+ touch $< $@
+endif
+
# === HTML ===
html: www/index.html
@@ -26,11 +36,11 @@ MYJS := www/js/html5ks.js www/js/menu.js www/js/api.js \
www/js/characters.js www/js/imachine.js www/js/i18n.js
JSLIBS := www/js/lib/fastclick.js www/js/lib/modernizr-build.js \
www/js/lib/when.js www/js/lib/spin.js
-JSDATA := www/js/play.js www/js/images.js www/js/s2s.js
+JSDATA := www/js/play.js www/js/s2s.js
JS := $(JSLIBS) $(MYJS) $(JSDATA)
JSOUT := www/js/all.min.js
-js: $(JSOUT)
+js: $(JSOUT) $(JSOUT).gz
$(JSOUT): $(UGLIFYJS) $(JS)
$^ -o "$@" --source-map "$@".map --source-map-url ./all.min.js.map --screw-ie8 -p 2 -m -c unsafe=true,drop_debugger=false
@@ -80,16 +90,6 @@ $(IJSON): www/json/%.json: ast2json/imachine2json.py ast2json/%.json.i
$(EJSON): www/json/%.json: ast2json/settings2json.py ast2json/%.json.i
$^ $@
-%.json.gz: %.json
- $(if $(GZIP),
- $(if $(DEFLUFF),
- $(GZIP) -c $< | $(DEFLUFF) > $@
- ,
- $(GZIP) -c $< > $@
- )
- touch $< $@
- )
-
# === VIDEO ===
VIDEO := $(wildcard www/dump/video/*.mkv)