]> matita.cs.unibo.it Git - helm.git/blob - helm/hbugs/common/Makefile
- added helm- modules dependencies
[helm.git] / helm / hbugs / common / Makefile
1 REQUIRES = helm-xml helm-pxp pcre pxp http
2 COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
3 OCAMLFIND = ocamlfind
4 OCAMLC = $(OCAMLFIND) ocamlc $(COMMONOPTS)
5 OCAMLOPT = $(OCAMLFIND) ocamlopt $(COMMONOPTS)
6 OCAMLDEP = $(OCAMLFIND) ocamldep $(COMMONOPTS)
7 OCAMLDOC =      \
8         ocamldoc        \
9                 $(shell $(OCAMLFIND) query -i-format helm-xml)  \
10                 $(shell $(OCAMLFIND) query -i-format helm-pxp)  \
11                 $(shell $(OCAMLFIND) query -i-format pcre)      \
12                 $(shell $(OCAMLFIND) query -i-format pxp-engine)        \
13                 $(shell $(OCAMLFIND) query -i-format threads)   \
14                 $(shell $(OCAMLFIND) query -i-format http)
15 MODULES =       \
16         hbugs_types threadSafe hbugs_misc       \
17         hbugs_common hbugs_id_generator hbugs_messages
18
19 OBJS = $(patsubst %,%.cmo,$(MODULES))
20 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
21
22 all: byte
23 byte: $(OBJS)
24 opt: $(OBJSOPT)
25 world: byte opt
26
27 hbugs_common.dot: *.ml *.mli
28         $(OCAMLDOC) -dot -o $@ $^
29
30 include .depend
31 depend:
32         $(OCAMLDEP) *.ml *.mli > .depend
33
34 %.cmi: %.mli
35         $(OCAMLC) -c $<
36 %.cmo: %.ml %.cmi
37         $(OCAMLC) -c $<
38 %.cmx: %.ml %.cmi
39         $(OCAMLOPT) -c $<
40 include Makefile.overrides
41
42 distclean: clean
43 clean:
44         rm -f *.cm[aiox] *.o $(NAME){,.opt}
45
46 .PHONY: all byte opt world depend clean
47