From 2e9bfa707b33f7e371088b66e75f4e76f90ebcee Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Fri, 2 May 2014 10:32:16 -0400 Subject: new image system --- Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'Makefile') 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) -- cgit v1.2.3-54-g00ecf