-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
52 lines (44 loc) · 1.18 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
.PHONY: default all smlnj mlton clean
FILES = \
util.sml \
micro-timl-def.sig \
micro-timl-util.sig \
ast-transformers.sig \
deriv-transformers.sig \
simplify-let-pass.sig \
cps-pass.sig \
wrap-abs-pass.sig \
clo-conv-pass.sig \
micro-timl-hoisted-def.sig \
hoisted-deriv-checker.sig \
typed-assembly-def.sig \
micro-timl-def.sml \
micro-timl-util.sml \
ast-transformers.sml \
deriv-transformers.sml \
simplify-let-pass.sml \
cps-pass.sml \
wrap-abs-pass.sml \
clo-conv-pass.sml \
micro-timl-hoisted-def.sml \
hoisted-deriv-checker.sml \
typed-assembly-def.sml \
micro-timl-inst.sml \
micro-timl.grm \
micro-timl.lex \
parser.sml \
compiler.sml \
mlton-compiler.sml
MLTON_FLAGS = -link-opt "-lstdc++ -L./sml-llvm -lllvm64 `llvm-config --ldflags --system-libs --libs all`"
default: smlnj
all: smlnj mlton
smlnj: compiler.cm
cp sml-llvm/libllvm32.so .
ml-build -Ccompiler-mc.error-non-exhaustive-match=true -Ccompiler-mc.error-non-exhaustive-bind=true -Ccontrol.poly-eq-warn=false compiler.cm Compiler.main compiler-image
mlton: compiler
compiler: compiler.mlb $(FILES)
mlyacc micro-timl.grm
mllex micro-timl.lex
mlton $(MLTON_FLAGS) compiler.mlb
clean:
rm -rf .cm compiler-image* compiler *.so