forked from evanw/glslx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (25 loc) · 789 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
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
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