# OS type: Linux/Win DJGPP ifdef OS EXE=.exe else EXE= endif OCAMLC_FLAGS=-g OCAMLC=ocamlc OCAMLDEP=ocamldep %.cmo: %.ml %.mli $(OCAMLC) $(OCAMLC_FLAGS) -c $< %.cmi: %.mli $(OCAMLC) $(OCAMLC_FLAGS) -c $< %.cmo %.cmi: %.ml $(OCAMLC) $(OCAMLC_FLAGS) -c $< tony$(EXE): Lexer.cmo Parser.cmo main.cmo $(OCAMLC) $(OCAMLC_FLAGS) -o $@ $^ Lexer.ml: Lexer.mll Parser.ml ocamllex -o $@ $< Parser.ml Parser.mli: Parser.mly ocamlyacc -v Parser.mly .PHONY: foo clean distclean -include .depend foo: distclean depend tony depend: Lexer.ml Lexer.mli Parser.ml Parser.mli main.ml $(OCAMLDEP) $^ > .depend clean: $(RM) Lexer.ml Parser.ml Parser.mli Parser.output *.cmo *.cmi *~ distclean: clean $(RM) tony$(EXE) .depend