comparison lab0/Makefile @ 0:bfdcc3820b32

Basis
author Mike Spivey <mike@cs.ox.ac.uk>
date Thu, 05 Oct 2017 08:04:15 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:bfdcc3820b32
1 # lab1/Makefile
2
3 all: calc
4
5 CALC = lexer.cmo parser.cmo eval.cmo main.cmo
6 calc: $(CALC)
7 ocamlc ../lib/common.cma $(CALC) -o $@
8
9 parser.mli parser.ml: parser.mly
10 ocamlyacc parser.mly
11
12 lexer.ml: lexer.mll
13 ocamllex lexer.mll
14
15 clean:
16 rm -f calc parser.mli parser.ml lexer.ml *.cma *.cmo *.cmi
17
18 ML = eval.ml eval.mli lexer.mli lexer.ml main.ml memory.ml memory.mli \
19 parser.mli parser.ml tree.mli
20
21 depend : $(ML) force
22 (sed '/^###/q' Makefile; echo; ocamldep $(ML)) >new
23 mv new Makefile
24
25 %.cmi : %.mli
26 ocamlc $(MLFLAGS) -c $<
27
28 %.cmo : %.ml
29 ocamlc $(MLFLAGS) -c $<
30
31 force:
32
33 MLFLAGS = -I ../lib
34
35 ###
36
37 eval.cmo: tree.cmi eval.cmi
38 eval.cmx: tree.cmi eval.cmi
39 eval.cmi: tree.cmi
40 lexer.cmi: parser.cmi
41 lexer.cmo: parser.cmi lexer.cmi
42 lexer.cmx: parser.cmx lexer.cmi
43 main.cmo: parser.cmi lexer.cmi eval.cmi
44 main.cmx: parser.cmx lexer.cmx eval.cmx
45 memory.cmo: memory.cmi
46 memory.cmx: memory.cmi
47 memory.cmi:
48 parser.cmi: tree.cmi
49 parser.cmo: tree.cmi parser.cmi
50 parser.cmx: tree.cmi parser.cmi
51 tree.cmi: