4 DISTDIR = http-getter-$(VERSION)
5 EXTRA_DIST = AUTHORS COPYING NEWS README BUGS
6 DOCS = doc/http_getter.conf.xml.sample
9 http dbm pcre pxp shell threads zip \
11 COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
13 OCAMLC = $(OCAMLFIND) ocamlc -thread $(COMMONOPTS)
14 OCAMLOPT = $(OCAMLFIND) ocamlopt -thread $(COMMONOPTS)
15 OCAMLDEP = $(OCAMLFIND) ocamldep $(COMMONOPTS)
18 $(shell $(OCAMLFIND) query -i-format http) \
19 $(shell $(OCAMLFIND) query -i-format dbm) \
20 $(shell $(OCAMLFIND) query -i-format pcre) \
21 $(shell $(OCAMLFIND) query -i-format pxp) \
22 $(shell $(OCAMLFIND) query -i-format shell) \
23 $(shell $(OCAMLFIND) query -i-format threads) \
24 $(shell $(OCAMLFIND) query -i-format zip)
26 http_getter_debugger threadSafe \
27 http_getter_types http_getter_misc http_getter_const \
28 http_getter_env http_getter_common http_getter_map \
29 http_getter_cache http_getter
31 OBJS = $(patsubst %,%.cmo,$(MODULES))
32 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
41 $(OCAMLDEP) *.ml *.mli > .depend
49 include Makefile.overrides
50 $(NAME).cmo: $(NAME).ml
52 $(NAME).cmx: $(NAME).ml
54 $(NAME): $(OBJS) main.ml
55 $(OCAMLC) -linkpkg -thread -o $@ $^
56 $(NAME).opt: $(OBJSOPT) main.ml
57 $(OCAMLOPT) -linkpkg -thread -o $@ $^
59 http_getter.dot: *.ml *.mli
60 $(OCAMLDOC) -dot -o $@ $^
64 rm -f *.cm[aiox] *.o $(NAME){,.opt} *.dot
65 dist: distclean depend
66 if [ -d $(DISTDIR) ]; then rm -rf $(DISTDIR); else true; fi
69 cp $(DOCS) $(DISTDIR)/doc/
70 for m in $(patsubst %, %.mli, $(MODULES)); do \
71 if [ "$$m" != "http_getter_types.mli" ]; then \
76 $(patsubst %, %.ml, $(MODULES)) \
78 Makefile Makefile.overrides .depend \
80 cp $(EXTRA_DIST) $(DISTDIR)/
81 tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
84 tar xvzf $(DISTDIR).tar.gz
88 .PHONY: all byte dist distcheck opt world depend clean distclean