4 DISTDIR = http-getter-$(VERSION)
5 EXTRA_DIST = AUTHORS COPYING NEWS README BUGS
6 DOCS = doc/http_getter.conf.xml.sample
8 REQUIRES = http dbm pcre pxp shell threads zip
9 COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
11 OCAMLC = $(OCAMLFIND) ocamlc -thread $(COMMONOPTS)
12 OCAMLOPT = $(OCAMLFIND) ocamlopt -thread $(COMMONOPTS)
13 OCAMLDEP = $(OCAMLFIND) ocamldep $(COMMONOPTS)
16 $(shell $(OCAMLFIND) query -i-format http) \
17 $(shell $(OCAMLFIND) query -i-format dbm) \
18 $(shell $(OCAMLFIND) query -i-format pcre) \
19 $(shell $(OCAMLFIND) query -i-format pxp) \
20 $(shell $(OCAMLFIND) query -i-format shell) \
21 $(shell $(OCAMLFIND) query -i-format threads) \
22 $(shell $(OCAMLFIND) query -i-format zip)
24 http_getter_debugger threadSafe \
25 http_getter_types zack http_getter_misc http_getter_const \
26 http_getter_env http_getter_common http_getter_map \
29 OBJS = $(patsubst %,%.cmo,$(MODULES))
30 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
39 $(OCAMLDEP) *.ml *.mli > .depend
47 include Makefile.overrides
48 $(NAME).cmo: $(NAME).ml
50 $(NAME).cmx: $(NAME).ml
52 $(NAME): $(OBJS) $(NAME).ml
53 $(OCAMLC) -linkpkg -thread -o $@ $^
54 $(NAME).opt: $(OBJSOPT) $(NAME).ml
55 $(OCAMLOPT) -linkpkg -thread -o $@ $^
57 http_getter.dot: *.ml *.mli
58 $(OCAMLDOC) -dot -o $@ $^
62 rm -f *.cm[aiox] *.o $(NAME){,.opt} *.dot
63 dist: distclean depend
64 if [ -d $(DISTDIR) ]; then rm -rf $(DISTDIR); else true; fi
67 cp $(DOCS) $(DISTDIR)/doc/
68 for m in $(patsubst %, %.mli, $(MODULES)); do \
69 if [ "$$m" != "http_getter_types.mli" ]; then \
74 $(patsubst %, %.ml, $(MODULES)) \
76 Makefile Makefile.overrides .depend \
78 cp $(EXTRA_DIST) $(DISTDIR)/
79 tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
82 tar xvzf $(DISTDIR).tar.gz
86 .PHONY: all byte dist distcheck opt world depend clean distclean