annotate lab0/Makefile @ 0:bfdcc3820b32

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