4 DISTDIR = http-getter-$(VERSION)
5 EXTRA_DIST = AUTHORS COPYING NEWS README BUGS
6 # docs relative to "doc/" dir
8 http_getter.conf.xml.sample
10 REQUIRES = http dbm pcre netclient pxp shell threads zip
11 COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
13 OCAMLC = $(OCAMLFIND) ocamlc $(COMMONOPTS)
14 OCAMLOPT = $(OCAMLFIND) ocamlopt $(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 netclient) \
22 $(shell $(OCAMLFIND) query -i-format pxp) \
23 $(shell $(OCAMLFIND) query -i-format shell) \
24 $(shell $(OCAMLFIND) query -i-format threads) \
25 $(shell $(OCAMLFIND) query -i-format zip)
27 http_getter_debugger threadSafe \
28 http_getter_types http_getter_misc http_getter_const \
29 http_getter_env http_getter_common http_getter_map \
32 OBJS = $(patsubst %,%.cmo,$(MODULES))
33 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
42 $(OCAMLDEP) *.ml *.mli > .depend
50 include Makefile.overrides
51 $(NAME).cmo: $(NAME).ml
53 $(NAME).cmx: $(NAME).ml
55 $(NAME): $(OBJS) $(NAME).ml
56 $(OCAMLC) -linkpkg -thread -o $@ $^
57 $(NAME).opt: $(OBJSOPT) $(NAME).ml
58 $(OCAMLOPT) -linkpkg -thread -o $@ $^
60 http_getter.dot: *.ml *.mli
61 $(OCAMLDOC) -dot -o $@ $^
65 rm -f *.cm[aiox] *.o $(NAME){,.opt} *.dot
66 dist: distclean depend
67 if [ -d $(DISTDIR) ]; then rm -rf $(DISTDIR); else true; fi
70 cp $(DOCS) $(DISTDIR)/doc/
71 for m in $(patsubst %, %.mli, $(MODULES)); do \
72 if [ "$$m" != "http_getter_types.mli" ]; then \
77 $(patsubst %, %.ml, $(MODULES)) \
79 Makefile Makefile.overrides .depend \
81 cp $(EXTRA_DIST) $(DISTDIR)/
82 tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
85 tar xvzf $(DISTDIR).tar.gz
89 .PHONY: all byte dist distcheck opt world depend clean distclean