include Makefile.defs
-MODULES = common misc types request daemon response
+MODULES = http_common http_misc http_types http_request 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:
%.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
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 $(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 \