]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/fix_params/Makefile
ocaml 3.09 transition
[helm.git] / helm / fix_params / Makefile
index 24f3d4860ed0f12fb08ccc2875adc35fb87575f6..92ac930bc9827e6ba8edb21531bd563fb28c5e86 100644 (file)
@@ -1,11 +1,14 @@
 REQUIRES = helm-getter helm-cic_cache helm-xml
 PREDICATES =
-OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)"
+OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o
 OCAMLDEP = ocamldep
 OCAMLFIND = ocamlfind
 OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLOPTIONS)
 OCAMLOPT = $(OCAMLFIND) ocamlopt $(OCAMLOPTIONS)
 
+LIBRARIES = $(shell ocamlfind query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
+LIBRARIES_OPT = $(shell ocamlfind query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
+
 all: fix_params
 opt: fix_params.opt
 
@@ -16,18 +19,18 @@ FIXPARAMSOBJS = cic2Xml.cmo cicFindParameters.cmo fix_params.cmo
 depend:
        $(OCAMLDEP) $(DEPOBJS) > .depend
 
-fix_params: $(FIXPARAMSOBJS)
+fix_params: $(FIXPARAMSOBJS) $(LIBRARIES)
        $(OCAMLC) -linkpkg -o fix_params $(FIXPARAMSOBJS)
 
-fix_params.opt: $(FIXPARAMSOBJS:.cmo=.cmx)
+fix_params.opt: $(FIXPARAMSOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
        $(OCAMLOPT) -linkpkg -o fix_params.opt $(FIXPARAMSOBJS:.cmo=.cmx)
 
 .SUFFIXES: .ml .mli .cmo .cmi .cmx
-.ml.cmo:
+.ml.cmo: $(LIBRARIES)
        $(OCAMLC) -c $<
-.mli.cmi:
+.mli.cmi: $(LIBRARIES)
        $(OCAMLC) -c $<
-.ml.cmx:
+.ml.cmx: $(LIBRARIES_OPT)
        $(OCAMLOPT) -c $<
 
 clean: