3 DISTDIR = http-getter-$(VERSION)
4 REQUIRES = http dbm pcre netclient pxp shell threads zip
5 COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
7 OCAMLC = $(OCAMLFIND) ocamlc $(COMMONOPTS)
8 OCAMLOPT = $(OCAMLFIND) ocamlopt $(COMMONOPTS)
9 OCAMLDEP = $(OCAMLFIND) ocamldep $(COMMONOPTS)
12 $(shell $(OCAMLFIND) query -i-format http) \
13 $(shell $(OCAMLFIND) query -i-format dbm) \
14 $(shell $(OCAMLFIND) query -i-format pcre) \
15 $(shell $(OCAMLFIND) query -i-format netclient) \
16 $(shell $(OCAMLFIND) query -i-format pxp) \
17 $(shell $(OCAMLFIND) query -i-format shell) \
18 $(shell $(OCAMLFIND) query -i-format threads) \
19 $(shell $(OCAMLFIND) query -i-format zip)
21 http_getter_debugger threadSafe \
22 http_getter_types http_getter_misc http_getter_const \
23 http_getter_env http_getter_common http_getter_map \
26 OBJS = $(patsubst %,%.cmo,$(MODULES))
27 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
36 $(OCAMLDEP) *.ml *.mli > .depend
44 include Makefile.overrides
45 $(NAME).cmo: $(NAME).ml
47 $(NAME).cmx: $(NAME).ml
49 $(NAME): $(OBJS) $(NAME).ml
50 $(OCAMLC) -linkpkg -thread -o $@ $^
51 $(NAME).opt: $(OBJSOPT) $(NAME).ml
52 $(OCAMLOPT) -linkpkg -thread -o $@ $^
54 http_getter.dot: *.ml *.mli
55 $(OCAMLDOC) -dot -o $@ $^
59 rm -f *.cm[aiox] *.o $(NAME){,.opt} *.dot
60 dist: distclean depend
63 $(patsubst %, %.ml, $(MODULES)) \
64 $(patsubst %, %.mli, $(MODULES)) \
68 tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
71 .PHONY: all byte opt world depend clean