include Makefile.defs MODULES = http_common http_misc http_types http_request http_parser tcp_server http_daemon http_response PUBLIC_MODULES = http_common http_types http_request http_daemon http_response DESTDIR = $(shell $(OCAMLFIND) printconf stdlib) all: http.cma opt: http.cmxa world: all opt examples: $(MAKE) -C examples/ examples.opt: $(MAKE) -C examples/ opt include .depend depend: $(OCAMLDEP) *.ml *.mli > .depend %.cmi: %.mli $(OCAMLC) -c $< %.cmo: %.ml %.cmi $(OCAMLC) -c $< %.cmx: %.ml %.cmi $(OCAMLOPT) -c $< http.cma: $(patsubst %,%.cmo,$(MODULES)) $(OCAMLC) -a -o $@ $^ http.cmxa: $(patsubst %,%.cmx,$(MODULES)) $(OCAMLOPT) -a -o $@ $^ meta: META META: META.in cat META.in | sed -e 's/@DISTVERSION@/$(DISTVERSION)/' > META clean: $(MAKE) -C examples/ clean -rm -f *.cm[ioax] *.cmxa *.[ao] test{,.opt} distclean: clean $(MAKE) -C examples/ distclean -rm -f META dist: distclean depend mkdir $(DISTDIR) cp -r \ $(patsubst %,%.ml,$(MODULES)) $(patsubst %,%.mli,$(MODULES)) \ $(EXTRA_DIST) examples/ debian/ \ $(DISTDIR)/ -find $(DISTDIR)/ -type d -name CVS -exec rm -rf {} \; -find $(DISTDIR)/ -type f -name ".cvs*" -exec rm -f {} \; tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/ rm -rf $(DISTDIR)/ install: META $(OCAMLFIND) install -destdir $(DESTDIR) $(PKGNAME) \ META $(patsubst %,%.mli,$(PUBLIC_MODULES)) \ $(patsubst %,%.cmi,$(PUBLIC_MODULES)) http.cm{,x}a http.a .PHONY: \ all opt world examples examples.opt depend clean distclean dist \ install meta