OCAMLC = ocamlfind ocamlc OCAMLDEP = ocamlfind ocamldep OCAMLFLAGS = -w Ae -g EXTCMI = env.cmi printtyp.cmi typemod.cmi config.cmi .PHONY: all clean install uninstall all: checkcmi cmidump cmidump: cmidump.cmo $(OCAMLC) -o $@ /usr/local/lib/ocaml/toplevellib.cma $(OCAMLFLAGS) $^ checkcmi: @for i in $(EXTCMI) ; do if ! test -f $$i ; then echo "Ocamlc will fail if it cant access $$i" ; fi ; done # Common rules .SUFFIXES: .ml .mli .cmo .cmi .cmx .ml.cmo: $(OCAMLC) $(OCAMLFLAGS) -I /usr/local/lib/ocaml -c $< .mli.cmi: $(OCAMLC) $(OCAMLFLAGS) -c $< # Clean up clean: rm -f cmidump.cmi *.cmo *.s # Dependencies .depend: *.ml $(OCAMLDEP) *.ml > .depend include .depend