-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile
112 lines (92 loc) · 1.95 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
-include ../Makefile.config
OCAMLC_OPTS = -dtypes -warn-error A
LIBS = unix.cma $(LLVM_LIBS)
LIBSOPT = $(LIBS:.cma=.cmxa)
INCLUDE = -I $(OCAMLLIB)
CLIBS = $($(OCAMLLIB), $(LLVM_LIBS:.cma=.a))
default: limlc
.PHONY: limlc
OBJECTS_ML = \
genGlobals.ml\
global.ml\
pos.ml\
ident.ml\
utils.ml\
error.ml\
ast.ml\
lexer.ml\
parser.ml\
nast.ml\
naming.ml\
nastCheck.ml\
neast.ml\
nastExpand.ml\
neastCheck.ml\
tast.ml\
typing.ml\
stast.ml\
stastOfTast.ml\
stastCheck.ml\
recordCheck.ml\
linearCheck.ml\
boundCheck.ml\
ist.ml\
istPp.ml\
istOfStast.ml\
istTail.ml\
extractFuns.ml\
est.ml\
estSubst.ml\
estPp.ml\
estOfIst.ml\
estOptim.ml\
estCompile.ml\
estNormalizePatterns.ml\
llst.ml\
llstPp.ml\
llstOfEst.ml\
llstFree.ml\
llstOptim.ml\
emit.ml\
eval.ml\
main.ml
# istAdhoc.ml
# boundCheck2.ml\
# id.ml\
# ast.ml\
# astOfCst.ml\
# statesOfAst.ml
# istRecords.ml\
istOptim.ml\
OBJECTS_CMO = $(OBJECTS_ML:.ml=.cmo)
OBJECTS_CMX = $(OBJECTS_ML:.ml=.cmx)
limlc: $(OBJECTS_CMX)
echo $(LIBS)
$(OCAMLOPT) -cc $(CPP) $(INCLUDE) \
-linkall $(CLIBS) $(LIBSOPT) $(OBJECTS_CMX) \
-o $@
limlc.bc: $(OBJECTS_CMO)
$(OCAMLC) $(OCAMLC_OPTS) -g -cc $(CPP) \
$(INCLUDE) $(LIBS) $(OBJECTS_CMO) \
-o $@
##############################################################################
%.cmo : %.ml
$(OCAMLC) $(INCLUDE) $(OCAMLC_CFLAGS) -c -g $<
%.cmi : %.mli
$(OCAMLC) $(OCAMLOPT_CFLAGS) $(INCLUDE) $<
%.cmx : %.ml
$(OCAMLOPT) $(OCAMLOPT_CFLAGS) $(INCLUDE) $(PP) -annot -c $<
%.ml : %.mll
$(OCAMLLEX) $<
%.ml %.mli : %.mly
$(OCAMLYACC) -v $<
###############################################################################
.depend: $(OBJECTS_ML)
$(OCAMLDEP) -native -slash $(INCLUDE) $(OBJECTS_ML) > .depend
clean:
rm -f *.cm* pkl *~ lexer.ml parser.ml parser.mli lexer.mli *.o* \#*
rm -f limlc limlc.bc liml liml.bc *.annot .depend
rm -f test/*.o test/*.s
rm -f test/*.bc test/*~
cd ../stdlib && make clean
-include .depend