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 netclient) \
20 $(shell $(OCAMLFIND) query -i-format pxp) \
21 $(shell $(OCAMLFIND) query -i-format shell) \
22 $(shell $(OCAMLFIND) query -i-format threads) \
23 $(shell $(OCAMLFIND) query -i-format zip)
25 http_getter_debugger threadSafe \
26 http_getter_types zack http_getter_misc http_getter_const \
27 http_getter_env http_getter_common http_getter_map \
30 OBJS = $(patsubst %,%.cmo,$(MODULES))
31 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
40 $(OCAMLDEP) *.ml *.mli > .depend
48 include Makefile.overrides
49 $(NAME).cmo: $(NAME).ml
51 $(NAME).cmx: $(NAME).ml
53 $(NAME): $(OBJS) $(NAME).ml
54 $(OCAMLC) -linkpkg -thread -o $@ $^
55 $(NAME).opt: $(OBJSOPT) $(NAME).ml
56 $(OCAMLOPT) -linkpkg -thread -o $@ $^
58 http_getter.dot: *.ml *.mli
59 $(OCAMLDOC) -dot -o $@ $^
63 rm -f *.cm[aiox] *.o $(NAME){,.opt} *.dot
64 dist: distclean depend
65 if [ -d $(DISTDIR) ]; then rm -rf $(DISTDIR); else true; fi
68 cp $(DOCS) $(DISTDIR)/doc/
69 for m in $(patsubst %, %.mli, $(MODULES)); do \
70 if [ "$$m" != "http_getter_types.mli" ]; then \
75 $(patsubst %, %.ml, $(MODULES)) \
77 Makefile Makefile.overrides .depend \
79 cp $(EXTRA_DIST) $(DISTDIR)/
80 tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
83 tar xvzf $(DISTDIR).tar.gz
87 .PHONY: all byte dist distcheck opt world depend clean distclean