]> matita.cs.unibo.it Git - helm.git/blob - helm/hbugs/broker/Makefile
- hbugs first draft release, not yet tested
[helm.git] / helm / hbugs / broker / Makefile
1 NAME = hbugs_broker
2 REQUIRES = http threads hbugs-common
3 COMMONDIR = ../common
4 COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
5 OCAMLC = ocamlfind ocamlc -I $(COMMONDIR) $(COMMONOPTS)
6 OCAMLOPT = ocamlfind ocamlopt -I $(COMMONDIR) $(COMMONOPTS)
7 OCAMLDEP = ocamlfind ocamldep $(COMMONOPTS)
8 MODULES = hbugs_broker_registry
9 COMMON_MODULES =        \
10         hbugs_types threadSafe hbugs_misc hbugs_id_generator hbugs_messages
11
12 OBJS = $(patsubst %,%.cmo,$(MODULES))
13 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
14 COMMON_OBJS = $(patsubst %,$(COMMONDIR)/%.cmo,$(COMMON_MODULES))
15 COMMON_OBJSOPT = $(patsubst %,$(COMMONDIR)/%.cmx,$(COMMON_MODULES))
16
17 all: byte
18 byte: $(NAME)
19 opt: $(NAME).opt
20 world: byte opt
21
22 include .depend
23 depend:
24         $(OCAMLDEP) *.ml *.mli > .depend
25
26 %.cmi: %.mli
27         OCAMLPATH=".." $(OCAMLC) -c $<
28 %.cmo: %.ml %.cmi
29         OCAMLPATH=".." $(OCAMLC) -c $<
30 %.cmx: %.ml %.cmi
31         OCAMLPATH=".." $(OCAMLOPT) -c $<
32 include Makefile.overrides
33 $(NAME): $(OBJS) $(NAME).ml
34         OCAMLPATH=".." $(OCAMLC) -linkpkg -thread -o $@ $(COMMON_OBJS) $^
35 $(NAME).opt: $(OBJSOPT) $(NAME).ml
36         OCAMLPATH=".." $(OCAMLOPT) -linkpkg -thread -o $@ $(COMMON_OBJSOPT) $^
37
38 distclean: clean
39 clean:
40         rm -f *.cm[aiox] *.o $(NAME){,.opt}
41
42 .PHONY: all byte opt world depend clean
43