3 DISTDIR = http-getter-$(VERSION)
4 REQUIRES = http dbm pcre netclient pxp shell threads zip
5 COMMONOPTS = -package "$(REQUIRES)" -pp camlp4o
6 OCAMLC = ocamlfind ocamlc $(COMMONOPTS)
7 OCAMLOPT = ocamlfind ocamlopt $(COMMONOPTS)
8 OCAMLDEP = ocamlfind ocamldep $(COMMONOPTS)
10 http_getter_debugger threadSafe \
11 http_getter_types http_getter_misc http_getter_const \
12 http_getter_env http_getter_common http_getter_map \
15 OBJS = $(patsubst %,%.cmo,$(MODULES))
16 OBJSOPT = $(patsubst %,%.cmx,$(MODULES))
25 $(OCAMLDEP) *.ml *.mli > .depend
33 include Makefile.overrides
34 $(NAME).cmo: $(NAME).ml
36 $(NAME).cmx: $(NAME).ml
38 $(NAME): $(OBJS) $(NAME).ml
39 $(OCAMLC) -linkpkg -thread -o $@ $^
40 $(NAME).opt: $(OBJSOPT) $(NAME).ml
41 $(OCAMLOPT) -linkpkg -thread -o $@ $^
45 rm -f *.cm[aiox] *.o $(NAME){,.opt}
46 dist: distclean depend
49 $(patsubst %, %.ml, $(MODULES)) \
50 $(patsubst %, %.mli, $(MODULES)) \
54 tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
57 .PHONY: all byte opt world depend clean