3 REQUIRES = http threads hbugs-common hbugs-thread-safe
4 COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
6 OCAMLC = $(OCAMLFIND) ocamlc $(COMMONOPTS)
7 OCAMLOPT = $(OCAMLFIND) ocamlopt $(COMMONOPTS)
8 OCAMLDEP = $(OCAMLFIND) ocamldep $(COMMONOPTS)
9 MODULES = hbugs_broker_registry
12 $(shell $(OCAMLFIND) query -i-format http) \
13 $(shell $(OCAMLFIND) query -i-format threads) \
14 $(shell $(OCAMLFIND) query -i-format hbugs-common) \
15 $(shell $(OCAMLFIND) query -i-format hbugs-thread-safe) \
16 $(shell $(OCAMLFIND) query -i-format hbugs-thread-safe) \
17 $(shell $(OCAMLFIND) query -i-format pxp-engine) \
18 $(shell $(OCAMLFIND) query -i-format pcre)
19 CTL = ./hbugs_broker_ctl.sh
21 OBJS = $(patsubst %,%.cmo,$(MODULES))
22 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
23 DEPS = $(shell $(OCAMLFIND) query -recursive -predicates byte -format "%d/%a" $(REQUIRES))
24 DEPSOPT = $(shell $(OCAMLFIND) query -recursive -predicates native -format "%d/%a" $(REQUIRES))
37 $(OCAMLDEP) *.ml *.mli > .depend
45 include Makefile.overrides
47 $(OBJSOPT): $(DEPSOPT)
48 $(NAME): $(OBJS) $(NAME).ml
49 $(OCAMLC) -linkpkg -thread -o $@ $^
50 $(NAME).opt: $(OBJSOPT) $(NAME).ml
51 $(OCAMLOPT) -linkpkg -thread -o $@ $^
52 $(NAME).dot: *.ml *.mli ../common/*.ml ../common/*.mli
53 $(OCAMLDOC) -dot -o $@ $^
58 rm -f *.cm[aiox] *.o $(NAME){,.opt}
60 .PHONY: all byte opt world depend clean start stop