-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (46 loc) · 1.01 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
OCAMLC=ocamlc
OCAMLOPT=ocamlopt
OCAMLDEP=ocamldep
INCLUDES=
OCAMLFLAGS=$(INCLUDES) -g
OCAMLOPTFLAGS=$(INCLUDES)
# The list of object files for prog1
MAIN_OBJS=asyntax.cmo parser.cmo lexer.cmo main.cmo
aritha: .depend $(MAIN_OBJS)
$(OCAMLC) -o aritha $(OCAMLFLAGS) $(MAIN_OBJS)
rapport:
pdflatex -shell-escape RAPPORT.tex
# Common rules
.SUFFIXES: .ml .mli .cmo .cmi .cmx .mll .mly
.mll.ml:
ocamllex $<
.mly.ml:
ocamlyacc $<
.ml.cmo:
$(OCAMLC) $(OCAMLFLAGS) -c $<
.mli.cmi:
$(OCAMLC) $(OCAMLFLAGS) -c $<
.ml.cmx:
$(OCAMLOPT) $(OCAMLOPTFLAGS) -c $<
clean:
rm -f aritha
rm -f *~
rm -f *.cm[iox]
rm -f *.o
rm -f parser.ml parser.mli
rm -f lexer.ml
rm -f RAPPORT.pyg
rm -f RAPPORT.pdf
rm -f RAPPORT.aux
rm -f RAPPORT.log
rm -r -f _minted-RAPPORT
# Dependencies - have to do the
# parser.* dependencies by hand
# since they're not seen by
# make depend
parser.cmo : parser.cmi
parser.mli : parser.mly
parser.ml : parser.mly
.depend:
$(OCAMLDEP) $(INCLUDES) *.mli *.ml *.mly *.mll > .depend
include .depend