forked from monte-language/typhon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
122 lines (98 loc) · 3.39 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
boot_objects = boot/lib/monte/monte_lexer.mast \
boot/lib/monte/monte_parser.mast \
boot/lib/monte/monte_expander.mast \
boot/lib/monte/monte_optimizer.mast \
boot/lib/monte/monte_verifier.mast \
boot/lib/monte/mast.mast \
boot/lib/codec/utf8.mast \
boot/montec.mast \
boot/lib/tubes.mast \
boot/prelude.mast \
boot/prelude/monte_ast.mast \
boot/prelude/b.mast \
boot/prelude/brand.mast \
boot/prelude/m.mast \
boot/prelude/ql.mast \
boot/prelude/protocolDesc.mast \
boot/prelude/region.mast \
boot/prelude/simple.mast \
boot/prelude/transparent.mast \
boot/prelude/coreInterfaces.mast
.PRECIOUS: $(boot_objects)
PYTHON=venv/bin/python
MT_TYPHON=./mt-typhon
ifdef PROFILE
PROFILE_FLAGS=-p
else
PROFILE_FLAGS=
endif
# This, being the first rule in the file, will be the default rule to make. It
# is *not* because of the name.
default: mt-typhon mast fun
mt-typhon:
$(PYTHON) -m rpython -O2 main
boot: $(boot_objects) | mt-typhon
$(boot_objects): boot/%: mast/%
@ echo "BOOT $<"
@ cp $< $@
mast: mast/lib/enum.mast mast/lib/record.mast \
mast/lib/words.mast \
mast/lib/continued.mast \
mast/lib/amp.mast \
mast/lib/ansiColor.mast \
mast/lib/json.mast \
mast/lib/help.mast \
mast/lib/complex.mast \
mast/lib/gai.mast \
mast/lib/streams.mast \
prelude \
codec \
entropy \
parsers \
tubes \
games \
bench \
monte
testVM: default
trial typhon
testMast: default mast mast/tests/lexer.mast mast/tests/parser.mast \
mast/tests/auditors.mast mast/tests/fail-arg.mast mast/tests/expander.mast \
mast/tests/optimizer.mast mast/tests/flexMap.mast mast/tests/proptests.mast \
mast/tests/b.mast mast/tests/region.mast mast/tests/regressions.mast \
mast/tests/promises.mast
$(MT_TYPHON) -l mast loader test all-tests
test: testVM testMast
prelude: mast/prelude.mast mast/prelude/brand.mast mast/prelude/m.mast \
mast/prelude/monte_ast.mast mast/prelude/ql.mast mast/prelude/region.mast \
mast/prelude/simple.mast mast/prelude/protocolDesc.mast \
mast/prelude/b.mast mast/prelude/transparent.mast \
mast/prelude/coreInterfaces.mast
codec: mast/lib/codec.mast mast/lib/codec/utf8.mast mast/lib/codec/percent.mast
entropy: mast/lib/entropy/pool.mast mast/lib/entropy/entropy.mast \
mast/lib/entropy/xorshift.mast mast/lib/entropy/pi.mast \
mast/lib/entropy/pcg.mast
parsers: mast/lib/parsers/html.mast \
mast/lib/parsers/regex.mast
tubes: mast/lib/tubes.mast
games: mast/games/mafia.mast
fun: mast/fun/elements.mast mast/fun/repl.mast mast/fun/termParser.mast
bench: mast/bench/nqueens.mast mast/bench/richards.mast mast/bench/montstone.mast \
mast/bench/primeCount.mast mast/bench/brot.mast \
mast/bench/entropy.mast mast/benchRunner.mast
monte: mast/prelude/monte_ast.mast mast/lib/monte/monte_lexer.mast \
mast/lib/monte/monte_parser.mast mast/lib/monte/monte_expander.mast \
mast/lib/monte/monte_optimizer.mast \
mast/lib/monte/mast.mast mast/lib/monte/monte_verifier.mast \
mast/montec.mast mast/testRunner.mast mast/all-tests.mast
mast/prelude.mast: mast/prelude.mt
@ echo "MONTEC-UNSAFE $<"
@ $(MT_TYPHON) $(PROFILE_FLAGS) -l boot loader run montec -noverify $< $@ # 2> /dev/null
loader.mast: loader.mt
@ echo "MONTEC-UNSAFE $<"
@ $(MT_TYPHON) $(PROFILE_FLAGS) -l boot loader run montec -noverify $< $@ # 2> /dev/null
%.mast: %.mt
@ echo "MONTEC $<"
@ $(MT_TYPHON) $(PROFILE_FLAGS) -l boot loader run montec $< $@ # 2> /dev/null
clean:
@ echo "CLEAN"
@ find -iwholename './mast/*.mast' -delete