annotate lab0/Makefile @ 1:b5139af1a420 tip basis

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