]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/ocaml-http/Makefile
- added targets relative to ocamldoc doc generation
[helm.git] / helm / DEVEL / ocaml-http / Makefile
1 include Makefile.defs
2
3 MODULES = http_common http_misc http_types http_request http_parser http_tcp_server http_daemon http_response
4 PUBLIC_MODULES = http_common http_types http_request http_daemon http_response
5 DESTDIR = $(shell $(OCAMLFIND) printconf stdlib) 
6
7 all: http.cma
8 opt: http.cmxa
9 world: all opt
10 doc: *.mli
11         $(OCAMLDOC) -html -d doc/html *.mli
12
13 examples:
14         $(MAKE) -C examples/
15 examples.opt:
16         $(MAKE) -C examples/ opt
17
18 include .depend
19
20 depend:
21         $(OCAMLDEP) *.ml *.mli > .depend
22
23 %.cmi: %.mli
24         $(OCAMLC) -c $<
25 %.cmo: %.ml %.cmi
26         $(OCAMLC) -c $<
27 %.cmx: %.ml %.cmi
28         $(OCAMLOPT) -c $<
29
30 http.cma: $(patsubst %,%.cmo,$(MODULES))
31         $(OCAMLC) -a -o $@ $^
32 http.cmxa: $(patsubst %,%.cmx,$(MODULES))
33         $(OCAMLOPT) -a -o $@ $^
34
35 meta: META
36 META: META.in
37         cat META.in | sed -e 's/@DISTVERSION@/$(DISTVERSION)/' > META
38
39 clean:
40         $(MAKE) -C examples/ clean
41         rm -f *.cm[ioax] *.cmxa *.[ao] test{,.opt}
42 docclean:
43         rm -f doc/html/*.html doc/html/*.css
44 distclean: clean docclean
45         $(MAKE) -C examples/ distclean
46         -rm -f META
47 dist: distclean depend
48         mkdir $(DISTDIR)
49         cp -r   \
50                 $(patsubst %,%.ml,$(MODULES)) $(patsubst %,%.mli,$(MODULES))    \
51                 $(EXTRA_DIST) examples/ debian/ \
52                 $(DISTDIR)/
53         -find $(DISTDIR)/ -type d -name CVS -exec rm -rf {} \;
54         -find $(DISTDIR)/ -type f -name ".cvs*" -exec rm -f {} \;
55         tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
56         rm -rf $(DISTDIR)/
57 install: META
58         $(OCAMLFIND) install -destdir $(DESTDIR) $(PKGNAME)     \
59                 META $(patsubst %,%.mli,$(PUBLIC_MODULES))      \
60                 $(patsubst %,%.cmi,$(PUBLIC_MODULES)) http.cm{,x}a http.a
61
62 .PHONY: \
63         all opt world examples examples.opt depend clean distclean dist \
64         install meta doc
65