]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/ocaml-http/Makefile
TODO list
[helm.git] / helm / DEVEL / ocaml-http / Makefile
index 473b6b8f2cff0cfa71991fe8c44af531df392d2a..22eb5fb80164a2dae55ecdf2fa9ae1644aee0676 100644 (file)
@@ -1,10 +1,11 @@
 include Makefile.defs
 
-MODULES = common misc types request daemon response
+MODULES = http_common http_misc http_types http_request http_parser http_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.cmo
-opt: http.cmx
+all: http.cma
+opt: http.cmxa
 world: all opt
 
 examples:
@@ -24,10 +25,10 @@ depend:
 %.cmx: %.ml %.cmi
        $(OCAMLOPT) -c $<
 
-http.cmo: $(patsubst %,%.cmo,$(MODULES))
-       ocamlc -pack -o $@ $^
-http.cmx: $(patsubst %,%.cmx,$(MODULES))
-       ocamlopt -pack -o $@ $^
+http.cma: $(patsubst %,%.cmo,$(MODULES))
+       $(OCAMLC) -a -o $@ $^
+http.cmxa: $(patsubst %,%.cmx,$(MODULES))
+       $(OCAMLOPT) -a -o $@ $^
 
 meta: META
 META: META.in
@@ -35,7 +36,7 @@ META: META.in
 
 clean:
        $(MAKE) -C examples/ clean
-       -rm -f *.cm[ioax] *.o test{,.opt}
+       -rm -f *.cm[ioax] *.cmxa *.[ao] test{,.opt}
 distclean: clean
        $(MAKE) -C examples/ distclean
        -rm -f META
@@ -50,7 +51,9 @@ dist: distclean depend
        tar cvzf $(DISTDIR).tar.gz $(DISTDIR)/
        rm -rf $(DISTDIR)/
 install: META
-       $(OCAMLFIND) install -destdir $(DESTDIR) $(PKGNAME) META *.mli http.*
+       $(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 \