forked from evanw/glslx
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
39 lines (28 loc) · 905 Bytes
/
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
.PHONY: parser
WATCH = node_modules/.bin/watch src
BUILD = node_modules/.bin/skewc src/core/*.sk src/lib/*.sk --target=js --verbose
default: debug
debug: | node_modules
$(BUILD) src/exports/*.sk --output-file=www/glslx.js --inline-functions
release: | node_modules
$(BUILD) src/exports/*.sk --output-file=www/glslx.js --release
parser: | node_modules
$(BUILD) src/parser/*.sk --output-file=parser/parser.js --inline-functions
test: | node_modules
$(BUILD) src/test/*.sk --output-file=test.js --js-source-map
node test.js
rm -f test.js test.js.map
watch-debug:
$(WATCH) 'clear && make debug'
watch-release:
$(WATCH) 'clear && make release'
watch-test:
$(WATCH) 'clear && make test'
publish: test release
rm -f npm/glslx
echo '#!/usr/bin/env node' > npm/glslx
cat www/glslx.js >> npm/glslx
chmod +x npm/glslx
sh -c 'cd npm && npm version patch && npm publish'
node_modules:
npm ci