4 http_types http_constants http_tcp_server http_parser_sanity \
5 http_misc http_common http_parser http_message http_request \
6 http_daemon http_response
7 THREADED_SRV = http_threaded_tcp_server
8 MODULES_MT = $(patsubst http_tcp_server, mt/$(THREADED_SRV) http_tcp_server, $(MODULES))
9 MODULES_NON_MT = $(patsubst http_tcp_server, non_mt/$(THREADED_SRV) http_tcp_server, $(MODULES))
10 PUBLIC_MODULES = http_common http_request http_daemon http_response
11 PUBLIC_IMPL = http_types
12 DESTDIR = $(shell $(OCAMLFIND) printconf stdlib)
14 all: all_non_mt all_mt
15 opt: opt_non_mt opt_mt
22 $(OCAMLDOC) -html -d doc/html \
23 *.mli $(patsubst %, %.ml, $(PUBLIC_IMPL))
28 $(MAKE) -C examples/ opt
33 $(OCAMLDEP) *.ml *.mli > .depend
41 include Makefile.overrides
43 non_mt/$(THREADED_SRV).cmo: non_mt/$(THREADED_SRV).ml $(THREADED_SRV).cmi
44 cp $(THREADED_SRV).{cmi,mli} non_mt/
46 non_mt/$(THREADED_SRV).cmx: non_mt/$(THREADED_SRV).ml $(THREADED_SRV).cmi
47 cp $(THREADED_SRV).{cmi,mli} non_mt/
50 mt/$(THREADED_SRV).cmo: mt/$(THREADED_SRV).ml $(THREADED_SRV).cmi
51 cp $(THREADED_SRV).{cmi,mli} mt/
52 $(OCAMLC) $(THREADS_FLAGS) -c $<
53 mt/$(THREADED_SRV).cmx: mt/$(THREADED_SRV).ml $(THREADED_SRV).cmi
54 cp $(THREADED_SRV).{cmi,mli} mt/
55 $(OCAMLOPT) $(THREADS_FLAGS) -c $<
57 http.cma: $(patsubst %,%.cmo,$(MODULES_NON_MT))
59 http.cmxa: $(patsubst %,%.cmx,$(MODULES_NON_MT))
60 $(OCAMLOPT) -a -o $@ $^
61 http_mt.cma: $(patsubst %,%.cmo,$(MODULES_MT))
63 http_mt.cmxa: $(patsubst %,%.cmx,$(MODULES_MT))
64 $(OCAMLOPT) -a -o $@ $^
68 cat META.in | sed -e 's/@DISTVERSION@/$(DISTVERSION)/' > META
71 $(MAKE) -C examples/ clean
72 for d in . mt non_mt; do \
73 rm -f $$d/*.cm[ioax] $$d/*.cmxa $$d/*.[ao] $$d/test{,.opt}; \
75 rm -f {mt,non_mt}/$(THREADED_SRV).mli
77 rm -f doc/html/*.html doc/html/*.css
78 distclean: clean docclean
79 $(MAKE) -C examples/ distclean
82 distreal: distclean depend
83 if [ -d $(DISTDIR) ]; then rm -rf $(DISTDIR); else true; fi
86 $(patsubst %, %.ml, $(MODULES)) \
87 $(patsubst %, %.mli, $(MODULES) $(THREADED_SRV)) \
88 mt/ non_mt/ $(EXTRA_DIST) examples/ debian/; \
90 cp -r $$f $(DISTDIR)/; \
92 -find $(DISTDIR)/ -type d -name CVS -exec rm -rf {} \;
93 -find $(DISTDIR)/ -type f -name ".cvs*" -exec rm -f {} \;
94 tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
98 (cd $(DISTDIR)/ && debuild)
101 $(OCAMLFIND) install -destdir $(DESTDIR) $(PKGNAME) \
102 $(patsubst %, %.mli, $(PUBLIC_MODULES)) \
103 $(patsubst %, %.ml, $(PUBLIC_IMPL)) \
104 $(patsubst %, %.cmi, $(PUBLIC_MODULES)) \
105 $(patsubst %, %.cmi, $(PUBLIC_IMPL)) \
106 http{,_mt}.cm{,x}a http{,_mt}.a META
109 all opt world all_non_mt all_mt opt_non_mt opt_mt \
110 examples examples.opt depend clean distclean dist \
111 install meta doc deb distreal distrm