-
Notifications
You must be signed in to change notification settings - Fork 125
/
Makefile
50 lines (45 loc) · 1.05 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
JS_COMPILER ?= ./node_modules/uglify-js/bin/uglifyjs
FILES = \
src/core.js \
src/utils.js \
src/math/vector.js \
src/math/matrix.js \
src/eventemitter.js \
src/animations/easings.js \
src/animations/tween.js \
src/animations/animation.js \
src/animations/css_animation.js \
src/animations/collection.js \
src/animations/parallel.js \
src/animations/sequence.js \
src/css.js \
src/world.js \
src/timeline.js \
src/item.js \
src/physics/forces/constant.js \
src/physics/forces/attraction.js \
src/physics/forces/edge.js \
src/physics/verlet.js \
src/physics/particle.js \
all: \
animatic.js \
animatic.min.js
animatic.js: ${FILES}
@rm -f $@
@echo "(function(root){" > [email protected]
@echo "'use strict'" >> [email protected]
@cat $(filter %.js,$^) >> [email protected]
@echo "}(Function('return this')()))" >> [email protected]
@$(JS_COMPILER) [email protected] -b indent-level=2 -o $@
@chmod a-w $@
animatic.min.js: animatic.js
@rm -f $@
@$(JS_COMPILER) $< -c -m -o $@ \
--source-map [email protected] \
&& du -h $< $@
deps:
mkdir -p node_modules
npm install
clean:
rm -f animatic*.js*