X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2FMakefile.common.in;h=bdc6e09f711344d6b3e8db824a85cde45b546885;hb=78cf601fd8b8dbb386b0db315dcbfdbe8256c15f;hp=cefbf646d19ab6053937eb26d931752086ef51a8;hpb=51f54cc6883cbb44067fee5387462e7ac83dad1c;p=helm.git diff --git a/helm/ocaml/Makefile.common.in b/helm/ocaml/Makefile.common.in index cefbf646d..bdc6e09f7 100644 --- a/helm/ocaml/Makefile.common.in +++ b/helm/ocaml/Makefile.common.in @@ -12,8 +12,9 @@ OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@ PREPROCOPTIONS = -pp camlp4o PREREQ = -OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" +OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -thread OCAMLDEBUGOPTIONS = -g +OCAMLARCHIVEOPTIONS = OCAMLFIND = ocamlfind OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS) $(PREPROCOPTIONS) OCAMLOPT = $(OCAMLFIND) opt $(OCAMLOPTIONS) $(PREPROCOPTIONS) @@ -33,10 +34,12 @@ OBJECTS_TO_INSTALL = $(ARCHIVE) $(ARCHIVE_OPT) $(ARCHIVE_OPT:%.cmxa=%.a) \ DEPEND_FILES = $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) $(ARCHIVE): $(IMPLEMENTATION_FILES:%.ml=%.cmo) $(LIBRARIES) - $(OCAMLC) -a -linkall -o $@ $(IMPLEMENTATION_FILES:%.ml=%.cmo) + $(OCAMLC) $(OCAMLARCHIVEOPTIONS) -a -o $@ \ + $(IMPLEMENTATION_FILES:%.ml=%.cmo) $(ARCHIVE_OPT): $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(LIBRARIES_OPT) - $(OCAMLOPT) -a -linkall -o $@ $(IMPLEMENTATION_FILES:%.ml=%.cmx) + $(OCAMLOPT) $(OCAMLARCHIVEOPTIONS) -a -o $@ \ + $(IMPLEMENTATION_FILES:%.ml=%.cmx) prereq: $(PREREQ) all: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmo) $(ARCHIVE) @@ -80,7 +83,13 @@ uninstall: backup: cd ..; tar cvzf $(PACKAGE)_$(shell date +%s).tar.gz $(PACKAGE) -.PHONY: all opt world backup depend install uninstall clean +ocamlinit: + echo "#use \"topfind\";;" > .ocamlinit + echo "#thread;;" >> .ocamlinit + for p in $(REQUIRES); do echo "#require \"$$p\";;" >> .ocamlinit; done + echo "#load \"$(PACKAGE).cma\";;" >> .ocamlinit + +.PHONY: all opt world backup depend install uninstall clean ocamlinit ifneq ($(MAKECMDGOALS), depend) include .depend