]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/ocaml-http/Makefile
no longer use -pack and Http.*, now interface is the usual Http_*
[helm.git] / helm / DEVEL / ocaml-http / Makefile
1 include Makefile.defs
2
3 MODULES = http_common http_misc http_types http_request 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
11 examples:
12         $(MAKE) -C examples/
13 examples.opt:
14         $(MAKE) -C examples/ opt
15
16 include .depend
17
18 depend:
19         $(OCAMLDEP) *.ml *.mli > .depend
20
21 %.cmi: %.mli
22         $(OCAMLC) -c $<
23 %.cmo: %.ml %.cmi
24         $(OCAMLC) -c $<
25 %.cmx: %.ml %.cmi
26         $(OCAMLOPT) -c $<
27
28 http.cma: $(patsubst %,%.cmo,$(MODULES))
29         $(OCAMLC) -a -o $@ $^
30 http.cmxa: $(patsubst %,%.cmx,$(MODULES))
31         $(OCAMLOPT) -a -o $@ $^
32
33 meta: META
34 META: META.in
35         cat META.in | sed -e 's/@DISTVERSION@/$(DISTVERSION)/' > META
36
37 clean:
38         $(MAKE) -C examples/ clean
39         -rm -f *.cm[ioax] *.cmxa *.[ao] test{,.opt}
40 distclean: clean
41         $(MAKE) -C examples/ distclean
42         -rm -f META
43 dist: distclean depend
44         mkdir $(DISTDIR)
45         cp -r   \
46                 $(patsubst %,%.ml,$(MODULES)) $(patsubst %,%.mli,$(MODULES))    \
47                 $(EXTRA_DIST) examples/ debian/ \
48                 $(DISTDIR)/
49         -find $(DISTDIR)/ -type d -name CVS -exec rm -rf {} \;
50         -find $(DISTDIR)/ -type f -name ".cvs*" -exec rm -f {} \;
51         tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
52         rm -rf $(DISTDIR)/
53 install: META
54         $(OCAMLFIND) install -destdir $(DESTDIR) $(PKGNAME)     \
55                 META $(patsubst %,%.mli,$(PUBLIC_MODULES))      \
56                 $(patsubst %,%.cmi,$(PUBLIC_MODULES)) http.cm{,x}a http.a
57
58 .PHONY: \
59         all opt world examples examples.opt depend clean distclean dist \
60         install meta
61