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_types http_request http_daemon http_response
11 DESTDIR = $(shell $(OCAMLFIND) printconf stdlib)
13 all: all_non_mt all_mt
14 opt: opt_non_mt opt_mt
21 $(OCAMLDOC) -html -d doc/html *.mli
26 $(MAKE) -C examples/ opt
31 $(OCAMLDEP) *.ml *.mli > .depend
39 include Makefile.overrides
41 non_mt/$(THREADED_SRV).cmo: non_mt/$(THREADED_SRV).ml $(THREADED_SRV).cmi
42 cp $(THREADED_SRV).{cmi,mli} non_mt/
44 non_mt/$(THREADED_SRV).cmx: non_mt/$(THREADED_SRV).ml $(THREADED_SRV).cmi
45 cp $(THREADED_SRV).{cmi,mli} non_mt/
48 mt/$(THREADED_SRV).cmo: mt/$(THREADED_SRV).ml $(THREADED_SRV).cmi
49 cp $(THREADED_SRV).{cmi,mli} mt/
50 $(OCAMLC) $(THREADS_FLAGS) -c $<
51 mt/$(THREADED_SRV).cmx: mt/$(THREADED_SRV).ml $(THREADED_SRV).cmi
52 cp $(THREADED_SRV).{cmi,mli} mt/
53 $(OCAMLOPT) $(THREADS_FLAGS) -c $<
55 http.cma: $(patsubst %,%.cmo,$(MODULES_NON_MT))
57 http.cmxa: $(patsubst %,%.cmx,$(MODULES_NON_MT))
58 $(OCAMLOPT) -a -o $@ $^
59 http_mt.cma: $(patsubst %,%.cmo,$(MODULES_MT))
61 http_mt.cmxa: $(patsubst %,%.cmx,$(MODULES_MT))
62 $(OCAMLOPT) -a -o $@ $^
66 cat META.in | sed -e 's/@DISTVERSION@/$(DISTVERSION)/' > META
69 $(MAKE) -C examples/ clean
70 for d in . mt non_mt; do \
71 rm -f $$d/*.cm[ioax] $$d/*.cmxa $$d/*.[ao] $$d/test{,.opt}; \
73 rm -f {mt,non_mt}/$(THREADED_SRV).mli
75 rm -f doc/html/*.html doc/html/*.css
76 distclean: clean docclean
77 $(MAKE) -C examples/ distclean
80 distreal: distclean depend
81 if [ -d $(DISTDIR) ]; then rm -rf $(DISTDIR); else true; fi
84 $(patsubst %, %.ml, $(MODULES)) \
85 $(patsubst %, %.mli, $(MODULES) $(THREADED_SRV)) \
86 mt/ non_mt/ $(EXTRA_DIST) examples/ debian/ \
88 -find $(DISTDIR)/ -type d -name CVS -exec rm -rf {} \;
89 -find $(DISTDIR)/ -type f -name ".cvs*" -exec rm -f {} \;
90 tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
94 (cd $(DISTDIR)/ && debuild)
97 $(OCAMLFIND) install -destdir $(DESTDIR) $(PKGNAME) \
98 $(patsubst %, %.mli, $(PUBLIC_MODULES)) \
99 $(patsubst %, %.cmi, $(PUBLIC_MODULES)) \
100 http{,_mt}.cm{,x}a http{,_mt}.a META
103 all opt world all_non_mt all_mt opt_non_mt opt_mt \
104 examples examples.opt depend clean distclean dist \
105 install meta doc deb distreal distrm