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