aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ocaml/Makefile.rules
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-01-06 17:37:00 +0000
committerIan Campbell <ian.campbell@citrix.com>2011-01-06 17:37:00 +0000
commit30cbc3ec4b4ecfd293f689c0f19126ecc5549c0d (patch)
treee7c3b28d66fe33e42b353f4d2b55bafb26b23752 /tools/ocaml/Makefile.rules
parentdaec2beeaf53611dd145c4196eaee5cdd2e55a81 (diff)
downloadxen-30cbc3ec4b4ecfd293f689c0f19126ecc5549c0d.tar.gz
xen-30cbc3ec4b4ecfd293f689c0f19126ecc5549c0d.tar.bz2
xen-30cbc3ec4b4ecfd293f689c0f19126ecc5549c0d.zip
ocaml: evtchn+xc bindings: use libxenctrl and libxenguest
Now that tools/libxc is licensed under LGPL I don't think there is any need for an LGPL reimplementation under tools/ocaml. For the most part the conversion to the up-to-date libxc API (xc_lib.c essentially implemented the same interface as an older libxc) was pretty automatic. There are some functions which appear to no longer exist in libxc which I therefore simply removed the bindings for and a small number of interfaces which had changed. Many of the functions bound by the stubs have no in-tree users (which I think is fine for a language binding) so I have no way to confirm correctness other than by eye. I was however able to confirm that oxenstored still worked and to build a XCP toolstack which could successfully start a PV guest. Uses the new XC_OPENFLAG_NON_REENTRANT option to avoid potential conflicts between pthreads and the ocaml runtime. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Vincent Hanquez <Vincent.Hanquez@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/ocaml/Makefile.rules')
-rw-r--r--tools/ocaml/Makefile.rules6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/ocaml/Makefile.rules b/tools/ocaml/Makefile.rules
index 5394984127..c630764569 100644
--- a/tools/ocaml/Makefile.rules
+++ b/tools/ocaml/Makefile.rules
@@ -54,18 +54,18 @@ mk-caml-lib-bytecode = $(call quiet-command, $(OCAMLC) $(OCAMLCFLAGS) -a -o $1 $
mk-caml-stubs = $(call quiet-command, $(OCAMLMKLIB) -o `basename $1 .a` $2,MKLIB,$1)
mk-caml-lib-stubs = \
- $(call quiet-command, $(AR) rcs $1 $2 && $(OCAMLMKLIB) -o `basename $1 .a | sed -e 's/^lib//'` $2,MKLIB,$1)
+ $(call quiet-command, $(AR) rcs $1 $2 && $(OCAMLMKLIB) -o `basename $1 .a | sed -e 's/^lib//'` $3 $2,MKLIB,$1)
# define a library target <name>.cmxa and <name>.cma
define OCAML_LIBRARY_template
$(1).cmxa: lib$(1)_stubs.a $(foreach obj,$($(1)_OBJS),$(obj).cmx)
- $(call mk-caml-lib-native,$$@, -cclib -l$(1)_stubs, $(foreach obj,$($(1)_OBJS),$(obj).cmx))
+ $(call mk-caml-lib-native,$$@, -cclib -l$(1)_stubs $(foreach lib,$(LIBS_$(1)),-cclib $(lib)), $(foreach obj,$($(1)_OBJS),$(obj).cmx))
$(1).cma: $(foreach obj,$($(1)_OBJS),$(obj).cmo)
$(call mk-caml-lib-bytecode,$$@, -dllib dll$(1)_stubs.so -cclib -l$(1)_stubs, $$+)
$(1)_stubs.a: $(foreach obj,$$($(1)_C_OBJS),$(obj).o)
$(call mk-caml-stubs,$$@, $$+)
lib$(1)_stubs.a: $(foreach obj,$($(1)_C_OBJS),$(obj).o)
- $(call mk-caml-lib-stubs,$$@, $$+)
+ $(call mk-caml-lib-stubs,$$@, $$+, $(LIBS_$(1)))
endef
define OCAML_NOC_LIBRARY_template