-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (56 loc) · 1.63 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
PATH := $(PWD)/node_modules/.bin:$(PATH)
.PHONY: clean start assets
TRANSFORMS_DEV= \
-t ./objify \
-t glslify-live \
-t glslify
TRANSFORMS_PRD= \
-t ./objify \
-t envify \
-t uglifyify \
-t glslify \
-t glslify-optimize
assets: clean \
luts/day.js luts/normal.js luts/night.js luts/sunset.js \
textures/water.js textures/grass.js textures/cardboard.js \
luts/day2.js textures/dirt.js
clean:
rm textures/*.js; true
rm luts/*.js; true
rm bundle.js; true
rm disc.html; true
start: assets style.css
npm explore glslify-live npm start &
(beefy index.js:bundle.js --open -- $(TRANSFORMS_DEV))
bundle.js: assets
(NODE_ENV=production browserify index.js $(TRANSFORMS_PRD) |\
uglifyjs -cm >\
bundle.js)
disc.html:
(NODE_ENV=production browserify index.js $(TRANSFORMS_PRD) --full-paths |\
uglifyjs -cm |\
discify >\
disc.html)
style.css: index.css
myth index.css style.css
## TODO: investigate synchronous (or at least transparent
## and/or bulk) method of inlining and loading texture
## assets.
textures/water.js:
(ndpack-image textures/water.png > textures/water.js)
textures/dirt.js:
(ndpack-image textures/dirt.png > textures/dirt.js)
textures/cardboard.js:
(ndpack-image textures/cardboard.png > textures/cardboard.js)
textures/grass.js:
(ndpack-image textures/grass.png > textures/grass.js)
luts/day.js:
(ndpack-image luts/day.png > luts/day.js)
luts/day2.js:
(ndpack-image luts/day2.png > luts/day2.js)
luts/night.js:
(ndpack-image luts/night.png > luts/night.js)
luts/sunset.js:
(ndpack-image luts/sunset.png > luts/sunset.js)
luts/normal.js:
(ndpack-image luts/normal.png > luts/normal.js)