]> matita.cs.unibo.it Git - helm.git/blob - helm/hbugs/broker/Makefile
rely on correct settings of OCAMLPATH
[helm.git] / helm / hbugs / broker / Makefile
1 NAME = hbugs_broker
2 METADIR = ../meta
3 REQUIRES = http threads hbugs-common hbugs-thread-safe
4 COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
5 OCAMLFIND = ocamlfind
6 OCAMLC = $(OCAMLFIND) ocamlc $(COMMONOPTS)
7 OCAMLOPT = $(OCAMLFIND) ocamlopt $(COMMONOPTS)
8 OCAMLDEP = $(OCAMLFIND) ocamldep $(COMMONOPTS)
9 MODULES = hbugs_broker_registry
10 OCAMLDOC =      \
11         ocamldoc        \
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
20
21 OBJS = $(patsubst %,%.cmo,$(MODULES))
22 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
23
24 all: byte
25 byte: $(NAME)
26 opt: $(NAME).opt
27 world: byte opt
28 start:
29         $(CTL) start
30 stop:
31         $(CTL) stop
32
33 include .depend
34 depend:
35         $(OCAMLDEP) *.ml *.mli > .depend
36
37 %.cmi: %.mli
38         $(OCAMLC) -c $<
39 %.cmo: %.ml %.cmi
40         $(OCAMLC) -c $<
41 %.cmx: %.ml %.cmi
42         $(OCAMLOPT) -c $<
43 include Makefile.overrides
44 $(NAME): $(OBJS) $(NAME).ml
45         $(OCAMLC) -linkpkg -thread -o $@ $^
46 $(NAME).opt: $(OBJSOPT) $(NAME).ml
47         $(OCAMLOPT) -linkpkg -thread -o $@ $^
48 $(NAME).dot: *.ml *.mli ../common/*.ml ../common/*.mli
49         $(OCAMLDOC) -dot -o $@ $^
50
51 distclean: clean
52         rm -f run/*
53 clean:
54         rm -f *.cm[aiox] *.o $(NAME){,.opt}
55
56 .PHONY: all byte opt world depend clean start stop
57