-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (34 loc) · 1.37 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
# Generic Makefile for minified (and possibly aggregated) JavaScript
#
.SUFFIXES: .js .min.js .css .min.css
.PHONY: clean jsdoc
YUICOMP = java -jar support/yuicompressor-2.4.7.jar
CLOSURE = java -jar support/closure-compiler.jar
JSDOC = ../jsdoc/jsdoc
FILES = appengine/static/sactraffic.min.js \
appengine/static/sactraffic.min.css \
JS = appengine/static/src/javascript/array.js \
appengine/static/src/javascript/number.js \
appengine/static/src/javascript/date.js \
appengine/static/src/javascript/incident.js \
appengine/static/src/javascript/incidentlist.js \
appengine/static/src/javascript/trafficmap.js \
appengine/static/src/javascript/sactraffic.js
# https://closure-compiler.googlecode.com/git/contrib/externs/
EXTERNS = appengine/static/src/javascript/externs/jquery-1.9.js \
appengine/static/src/javascript/externs/google_maps_api_v3_12.js
CSS = appengine/static/src/stylesheets/main.css \
appengine/static/src/stylesheets/mobile.css \
appengine/static/src/stylesheets/button.css \
appengine/static/src/stylesheets/fontello.css
all: ${FILES}
appengine/static/sactraffic.min.js: ${JS}
${CLOSURE} --compilation_level ADVANCED_OPTIMIZATIONS --externs ${EXTERNS} --js_output_file $@ --js $^
appengine/static/sactraffic.min.css: ${CSS}
cat $^ | ${YUICOMP} -o $@ --type css
jsdoc:
${JSDOC} -p -c support/jsdoc.json --destination jsdoc
clean:
rm -f ${FILES}
rm -fr jsdoc