X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2FMakefile.common.in;h=47d02bb42867c70452ca921eb451bf96ff4d26f6;hb=f15a13bab100064a4da238cede323b8d4568c174;hp=38c43c6d16e8e8c4383a66e243ff692cc21c083a;hpb=0195d58340f7dbc852d380a8fee897e1c1f7da03;p=helm.git diff --git a/helm/ocaml/Makefile.common.in b/helm/ocaml/Makefile.common.in index 38c43c6d1..47d02bb42 100644 --- a/helm/ocaml/Makefile.common.in +++ b/helm/ocaml/Makefile.common.in @@ -10,10 +10,10 @@ OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@ -OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" +OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o OCAMLC = ocamlfind ocamlc $(OCAMLOPTIONS) OCAMLOPT = ocamlfind ocamlopt $(OCAMLOPTIONS) -OCAMLDEP = ocamldep +OCAMLDEP = ocamldep -pp camlp4o OCAMLLEX = ocamllex OCAMLYACC = ocamlyacc @@ -40,12 +40,18 @@ opt: $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(ARCHIVE_OPT) depend: $(DEPEND_FILES) $(OCAMLDEP) $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend +$(PACKAGE).ps: .dep.dot + dot -Tps -o $@ $< + +.dep.dot: .depend + ocamldot < .depend > $@ + .SUFFIXES: .ml .mli .cmo .cmi .cmx .mll .mly -.ml.cmo: $(LIBRARIES) +.ml.cmo: $(OCAMLC) -c $< -.mli.cmi: $(LIBRARIES) +.mli.cmi: $(OCAMLC) -c $< -.ml.cmx: $(LIBRARIES_OPT) +.ml.cmx: $(OCAMLOPT) -c $< .mly.ml: $(OCAMLYACC) $< @@ -54,6 +60,9 @@ depend: $(DEPEND_FILES) .mll.ml: $(OCAMLLEX) $< +$(IMPLEMENTATION_FILES:%.ml=%.cmo): $(LIBRARIES) +$(IMPLEMENTATION_FILES:%.ml=%.cmx): $(LIBRARIES_OPT) + clean: rm -f *.cm[ioax] *.cmxa *.o *.a $(EXTRA_OBJECTS_TO_CLEAN) @@ -67,4 +76,6 @@ uninstall: .PHONY: all opt depend install uninstall clean -include .depend +ifneq ($(MAKECMDGOALS), depend) + include .depend +endif