-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (39 loc) · 889 Bytes
/
Makefile
File metadata and controls
52 lines (39 loc) · 889 Bytes
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
47
48
49
50
51
52
# See the README for installation instructions.
NODE_PATH ?= ./node_modules
JS_UGLIFY = $(NODE_PATH)/uglify-js/bin/uglifyjs
JS_TESTER = $(NODE_PATH)/vows/bin/vows
LOCALE ?= en_US
all: \
ofp.js \
ofp.min.js \
component.json \
package.json
# Modify this rule to build your own custom release.
.INTERMEDIATE ofp.js: \
ofp.core.js
ofp.core.js: \
src/core/core.js \
src/core/layer.js \
src/core/layerType.js \
src/core/floorplan.js
test: all
@$(JS_TESTER)
%.min.js: %.js Makefile
@rm -f $@
$(JS_UGLIFY) $< -c -m -o $@
ofp%js: Makefile
@rm -f $@
@cat $(filter %.js,$^) > $@.tmp
$(JS_UGLIFY) $@.tmp -b indent-level=2 -o $@
@rm $@.tmp
@chmod a-w $@
component.json: src/component.js
@rm -f $@
node src/component.js > $@
@chmod a-w $@
package.json: src/package.js
@rm -f $@
node src/package.js > $@
@chmod a-w $@
clean:
rm -f ofp*.js package.json component.json