forked from ai-group/shrdlite-course-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (26 loc) · 802 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
export PATH := node_modules/.bin:$(PATH)
TARGETS = html ajax ansi offline
.DELETE_ON_ERROR:
.PHONY: help clean all $(TARGETS) start run_example FORCE
DIST = dist
SOURCE = src
TSFILES = $(wildcard $(SOURCE)/*.ts)
FORCE:
help:
@echo "make help | clean | all | start | $(TARGETS:%=% |) ..."
clean:
rm -f $(DIST)/*.js
all: $(TARGETS)
start: all
python -m SimpleHTTPServer 8001
# start-offline: all
# node dist/shrdlite-offline.js complex 3
run_example: $(DIST)/astar_example.js FORCE
node --harmony dist/astar_example.js
$(TARGETS): %: $(DIST)/shrdlite-%.js $(DIST)/grammar.js $(DIST)/AStar.js
$(DIST)/%.js: $(SOURCE)/%.ts $(TSFILES)
tsc --out $@ $<
$(DIST)/grammar.js: $(SOURCE)/grammar.ne
nearleyc $< > $@
$(DIST)/astar_example.js: test/astar_example.ts $(TSFILES)
tsc --out $@ $<