]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/hbugs/common/Makefile
split into two major parts:
[helm.git] / helm / hbugs / common / Makefile
index 3a3d96821d8a2f8f0b1f5e622254569590a761a0..ca95aae243384c12e66c724c1cd5385fcc43f60e 100644 (file)
@@ -1,8 +1,8 @@
 REQUIRES = helm-xml helm-pxp pcre pxp http
 COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
 OCAMLFIND = ocamlfind
-OCAMLC = $(OCAMLFIND) ocamlc $(COMMONOPTS)
-OCAMLOPT = $(OCAMLFIND) ocamlopt $(COMMONOPTS)
+OCAMLC = $(OCAMLFIND) ocamlc -thread $(COMMONOPTS)
+OCAMLOPT = $(OCAMLFIND) ocamlopt -thread $(COMMONOPTS)
 OCAMLDEP = $(OCAMLFIND) ocamldep $(COMMONOPTS)
 OCAMLDOC =     \
        ocamldoc        \
@@ -18,6 +18,8 @@ MODULES =     \
 
 OBJS = $(patsubst %,%.cmo,$(MODULES))
 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
+DEPS = $(shell $(OCAMLFIND) query -recursive -predicates byte -format "%d/%a" $(REQUIRES))
+DEPSOPT = $(shell $(OCAMLFIND) query -recursive -predicates native -format "%d/%a" $(REQUIRES))
 
 all: byte
 byte: $(OBJS)
@@ -38,6 +40,8 @@ depend:
 %.cmx: %.ml %.cmi
        $(OCAMLOPT) -c $<
 include Makefile.overrides
+$(OBJS): $(DEPS)
+$(OBJSOPT): $(DEPSOPT)
 
 distclean: clean
 clean: