-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
70 lines (49 loc) · 1.32 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
CPP = cpp
ANTLR = antlr3
ZAS = ./zas.py
REC = ./rec.py
ZSAV = ./zsav.exp
ZMERGE = ./zmerge.py
ZAS_STATIC = zas.py opcodes.py zheader.py
ZAS_GENERATED = ZasParser.py ZasWalker.py
ZAS_SOURCES = $(ZAS_STATIC) $(ZAS_GENERATED)
TESTS = tests/tester.fr tests/core.fr tests/coreplustest.fth \
tests/coreexttest.fth tests/exceptiontest.fth \
tests/stringtest.fth tests/doubletest.fth \
tests/toolstest.fth
all: zmforth.z5 zmforth+tools.z5
test: all tests.rec
./test.exp
examples: tetris.z5
zmforth+tools.z5: zmforth.z5 zmforth+tools.sav
$(ZMERGE) $^ $@
zmforth+tools.sav: zmforth.z5 tools.rec
$(ZSAV) $^ $@
zmforth.z5: zmforth-base.z5 zmforth.sav
$(ZMERGE) $^ $@
zmforth.sav: zmforth-base.z5 zmforth.rec
$(ZSAV) $^ $@
zmforth-base.z5: zmforth.s $(ZAS_SOURCES)
$(ZAS) zmforth.s $@
ZasParser.py: Zas.g
$(ANTLR) $^
ZasWalker.py: ZasWalker.g
$(ANTLR) $^
zmforth.s: zmforth.S
$(CPP) -o $@ $^
tetris.z5: zmforth.z5 tetris.sav
$(ZMERGE) zmforth.z5 tetris.sav $@
tetris.sav: zmforth.z5 tetris.rec
$(ZSAV) $^ $@ tt
zmforth.rec: zmforth.fs
tools.rec: tools.fs
tetris.rec: examples/tetris.fs
$(REC) $^ >$@
tests.rec: $(TESTS)
$(REC) $^ >$@
%.rec: %.fs
$(REC) $^ >$@
clean:
rm -f ZasLexer.py ZasParser.py ZasWalker.py Zas__.g \
*.tokens *.pyc *.s *.z5 *.rec *.sav
.PHONY: all test examples clean