uann/ocaml_yacc/Makefile

19 lines
442 B
Makefile

calc: lexer.cmo parser.cmo calc.cmo
ocamlc -o calc lexer.cmo parser.cmo calc.cmo
lexer.cmo: lexer.ml parser.cmo
ocamlc -c lexer.ml
parser.cmo: parser.ml
ocamlc -c parser.ml
calc.cmo: calc.ml
ocamlc -c calc.ml
parser.ml: parser.mli
ocamlc -c parser.mli
lexer.ml: lexer.mll
ocamllex lexer.mll
parser.mli: parser.mly ast.cmo
ocamlyacc parser.mly
ast.cmo: ast.ml
ocamlc -c ast.ml
clean:
rm -rf *.cmo *.mli parser.ml lexer.ml calc *.cmi