forked from chaonextdoor/Chipmunk-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (48 loc) · 1.08 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
47
48
49
50
51
52
53
54
55
56
57
58
.PHONY: clean, all
all: cp.min.js bench.js demos.js
js = chipmunk.js \
cpVect.js \
cpBB.js \
cpShape.js \
cpPolyShape.js \
cpBody.js \
cpSpatialIndex.js \
cpBBTree.js \
cpArbiter.js \
cpCollision.js \
cpSpace.js \
cpSpaceComponent.js \
cpSpaceQuery.js \
cpSpaceStep.js
constraints = \
util.js \
cpConstraint.js \
cpPinJoint.js \
cpSlideJoint.js \
cpPivotJoint.js \
cpGrooveJoint.js \
cpDampedSpring.js \
cpDampedRotarySpring.js \
cpRotaryLimitJoint.js \
cpRatchetJoint.js \
cpGearJoint.js \
cpSimpleMotor.js
demos = demo.js \
ball.js \
PyramidStack.js \
PyramidTopple.js
jsfiles = $(addprefix lib/, $(js))
constraintfiles = $(addprefix lib/constraints/, $(constraints))
demofiles = $(addprefix demo/, $(demos))
cp.js: $(jsfiles) $(constraintfiles)
echo '(function(){' > $@
cat $+ >> $@
echo "})();" >> $@
cp.min.js: cp.js
uglifyjs $+ > $@
bench.js: $(jsfiles) $(constraintfiles) benchmark/mersenne.js benchmark/bench.js
cat $+ > $@
demos.js: $(demofiles)
cat $+ > $@
clean:
rm -f cp.js cp.min.js bench.js demos.js