description = "OCaml HTTP daemon library"
version = "@DISTVERSION@"
requires = "unix,pcre,netstring"
-archive(byte) = "http.cmo"
-archive(native) = "http.cmx"
+archive(byte) = "http.cma"
+archive(native) = "http.cmxa"
MODULES = common misc types request daemon response
DESTDIR = $(shell $(OCAMLFIND) printconf stdlib)
-all: http.cmo
-opt: http.cmx
+all: http.cma
+opt: http.cmxa
world: all opt
examples:
ocamlc -pack -o $@ $^
http.cmx: $(patsubst %,%.cmx,$(MODULES))
ocamlopt -pack -o $@ $^
+http.cma: http.cmo
+ $(OCAMLC) -a -o $@ $<
+http.cmxa: http.cmx
+ $(OCAMLOPT) -a -o $@ $<
meta: META
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
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 common.mli types.mli request.mli daemon.mli response.mli http.*
.PHONY: \
all opt world examples examples.opt depend clean distclean dist \