]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/ocaml-http/Makefile
added ocaml-http 0.0.1
[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.cmo
7 opt: http.cmx
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
32 meta: META
33 META: META.in
34         cat META.in | sed -e 's/@DISTVERSION@/$(DISTVERSION)/' > META
35
36 clean:
37         $(MAKE) -C examples/ clean
38         -rm -f *.cm[ioax] *.o test{,.opt}
39 distclean: clean
40         $(MAKE) -C examples/ distclean
41         -rm -f META
42 dist: distclean depend
43         mkdir $(DISTDIR)
44         cp -r   \
45                 $(patsubst %,%.ml,$(MODULES)) $(patsubst %,%.mli,$(MODULES))    \
46                 $(EXTRA_DIST) examples/ debian/ \
47                 $(DISTDIR)/
48         -find $(DISTDIR)/ -type d -name CVS -exec rm -rf {} \;
49         -find $(DISTDIR)/ -type f -name ".cvs*" -exec rm -f {} \;
50         tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
51         rm -rf $(DISTDIR)/
52 install: META
53         $(OCAMLFIND) install -destdir $(DESTDIR) $(PKGNAME) META *.mli http.*
54
55 .PHONY: \
56         all opt world examples examples.opt depend clean distclean dist \
57         install meta
58