-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (34 loc) · 898 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
40
41
42
43
LIBS=
RUN=node_modules/lithp/run
GENFILES=./genfiles.sh
RUNFLAGS=-cc
EXT=ast
default: lithp-pkg.js
all: default
.PHONY: clean node_modules run lithp
node_modules:
if [ ! -e "node_modules" ]; then \
ln -s .. node_modules; \
fi
run:
if [ ! -L "run" ]; then \
ln -s node_modules/lithp/run.js run; \
fi
if [ ! -L "lithp" ]; then \
ln -s node_modules/lithp lithp; \
fi
lithp: node_modules
$(MAKE) -C node_modules/lithp ast RUNFLAGS="$(RUNFLAGS)"
files.js: lithp
EXT_IN=ast EXT_OUT=json OUTFILE=files.js ./genfiles.sh $(EXTRA_PATHS)
samples.js: lithp
EXT_IN=lithp EXT_OUT=lithp OUTFILE=samples.js REL=y ./genfiles.sh $(EXTRA_PATHS)
lithp-pkg.js: node_modules run files.js index.js
node_modules/.bin/browserify index.js -o lithp-pkg.js
update: clean
npm update
clean: node_modules
rm -f lithp-pkg.js
rm -f files.js
$(MAKE) -C node_modules/lithp clean ||:
rm node_modules ||: