diff options
Diffstat (limited to 'tools/ocaml/libs/xb/Makefile')
-rw-r--r-- | tools/ocaml/libs/xb/Makefile | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/tools/ocaml/libs/xb/Makefile b/tools/ocaml/libs/xb/Makefile index dc858828f1..3f0bcc1ff6 100644 --- a/tools/ocaml/libs/xb/Makefile +++ b/tools/ocaml/libs/xb/Makefile @@ -6,6 +6,7 @@ CFLAGS += -I../mmap CFLAGS += $(CFLAGS_libxenctrl) # For xen_mb() CFLAGS += $(CFLAGS_xeninclude) OCAMLINCLUDE += -I ../mmap +OCAMLOPTFLAGS += -for-pack Xenbus .NOTPARALLEL: # Ocaml is such a PITA! @@ -15,7 +16,7 @@ PREOBJS = op partial packet xs_ring PRELIBS = $(foreach obj, $(PREOBJS),$(obj).cmo) $(foreach obj,$(PREOJBS),$(obj).cmx) OBJS = op partial packet xs_ring xb INTF = op.cmi packet.cmi xb.cmi -LIBS = xb.cma xb.cmxa +LIBS = xenbus.cma xenbus.cmxa ALL_OCAML_OBJS = $(OBJS) $(PREOJBS) @@ -25,22 +26,30 @@ bins: $(PROGRAMS) libs: $(LIBS) -xb_OBJS = $(OBJS) -xb_C_OBJS = xs_ring_stubs xb_stubs -OCAML_LIBRARY = xb +xenbus_OBJS = xenbus +xenbus_C_OBJS = xs_ring_stubs xenbus_stubs +OCAML_LIBRARY = xenbus + +xenbus.cmx : $(foreach obj, $(OBJS), $(obj).cmx) + $(E) " CMX $@" + $(OCAMLOPT) -pack -o $@ $^ + +xenbus.cmo : $(foreach obj, $(OBJS), $(obj).cmo) + $(E) " CMO $@" + $(OCAMLC) -pack -o $@ $^ %.mli: %.ml $(E) " MLI $@" - $(Q)$(OCAMLC) -i $< $o + $(Q)$(OCAMLC) $(OCAMLINCLUDE) -i $< $o .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xb - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xb META $(INTF) $(LIBS) *.a *.so *.cmx + ocamlfind remove -destdir $(OCAMLDESTDIR) xenbus + ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xenbus META $(LIBS) xenbus.cmo xenbus.cmi xenbus.cmx *.a *.so .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xb + ocamlfind remove -destdir $(OCAMLDESTDIR) xenbus include $(TOPLEVEL)/Makefile.rules |