]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/Makefile.in
snapshot (notably: ported to mysql instead of dbi)
[helm.git] / helm / matita / Makefile.in
index 7b38057517908102ef3728462240cf90fb764e5f..e7f4f677b5dc06f8ef56de8ccbd3bf8d0e9ae5b5 100644 (file)
@@ -25,21 +25,24 @@ CMOS =                              \
        matitaDisambiguator.cmo \
        matitaMathView.cmo      \
        matitaInterpreter.cmo
-CMXS = $(patsubst %.cmo,%.cmx,$(CMOS))
+
+LIB_DEPS = $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(REQUIRES))
 
 all: matita
 
 ifeq ($(HAVE_OCAMLOPT),yes)
+CMXS = $(patsubst %.cmo,%.cmx,$(CMOS))
+LIBX_DEPS = $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(REQUIRES))
 opt: matita.opt
 else
 opt:
        @echo "Native code compilation is disabled"
 endif
 
-matita: $(CMOS) matita.ml
-       $(OCAMLC) -linkpkg -o $@ $^
-matita.opt: $(CMXS) matita.ml
-       $(OCAMLOPT) -linkpkg -o $@ $^
+matita: $(LIB_DEPS) $(CMOS) matita.ml
+       $(OCAMLC) -linkpkg -o $@ $(CMOS) matita.ml
+matita.opt: $(LIBX_DEPS) $(CMXS) matita.ml
+       $(OCAMLOPT) -linkpkg -o $@ $(CMXS) matita.ml
 
 matitaGeneratedGui.ml matitaGeneratedGui.mli: matita.glade
        $(LABLGLADECC) $< > matitaGeneratedGui.ml