]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/hbugs/broker/Makefile
fixed a typo (inside a comment)
[helm.git] / helm / hbugs / broker / Makefile
index a5b1e9af5d3fd1beb6844fcc6d2dcd9c19f62c8e..e4cb57236b0328f6df9bc34116fd0fc189fc4f12 100644 (file)
@@ -1,10 +1,10 @@
 NAME = hbugs_broker
 METADIR = ../meta
-REQUIRES = http threads hbugs-common hbugs-thread-safe
+REQUIRES = http threads hbugs-common hbugs-thread-safe threads
 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)
 MODULES = hbugs_broker_registry
 OCAMLDOC =     \
@@ -20,6 +20,8 @@ CTL = ./hbugs_broker_ctl.sh
 
 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: $(NAME)
@@ -41,6 +43,8 @@ depend:
 %.cmx: %.ml %.cmi
        $(OCAMLOPT) -c $<
 include Makefile.overrides
+$(OBJS): $(DEPS)
+$(OBJSOPT): $(DEPSOPT)
 $(NAME): $(OBJS) $(NAME).ml
        $(OCAMLC) -linkpkg -thread -o $@ $^
 $(NAME).opt: $(OBJSOPT) $(NAME).ml