Signed-off-by: Zheng Li <zheng.li@xxxxxxxxxxxxx>
Acked-by: Jon Ludlam <jonathan.ludlam@xxxxxxxxxxxxx>
diff -r b6d1deac6ca2 -r 875d9c54a1cd tools/ocaml/Makefile.rules
--- a/tools/ocaml/Makefile.rules
+++ b/tools/ocaml/Makefile.rules
@@ -52,20 +52,20 @@
mk-caml-lib-native = $(call quiet-command, $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o
$1 $2 $3,MLA,$1)
mk-caml-lib-bytecode = $(call quiet-command, $(OCAMLC) $(OCAMLCFLAGS) -a -o $1
$2 $3,MLA,$1)
-mk-caml-stubs = $(call quiet-command, $(OCAMLMKLIB) -o `basename $1 .a`
$2,MKLIB,$1)
+mk-caml-stubs = $(call quiet-command, $(OCAMLMKLIB) $(LIBS_$(1)) -o $(1)_stubs
$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 lib$(1)_stubs.a $2 && $(OCAMLMKLIB)
$(LIBS_$(1)) -o $(1)_stubs $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
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, $$+)
+ $(call mk-caml-lib-bytecode,$$@, -dllib dll$(1)_stubs.so -cclib
-l$(1)_stubs $(foreach lib,$(LIBS_$(1)),-cclib $(lib)), $$+)
$(1)_stubs.a: $(foreach obj,$$($(1)_C_OBJS),$(obj).o)
- $(call mk-caml-stubs,$$@, $$+)
+ $(call mk-caml-stubs,$(1), $$+)
lib$(1)_stubs.a: $(foreach obj,$($(1)_C_OBJS),$(obj).o)
- $(call mk-caml-lib-stubs,$$@, $$+)
+ $(call mk-caml-lib-stubs,$(1), $$+)
endef
define OCAML_NOC_LIBRARY_template
diff -r b6d1deac6ca2 -r 875d9c54a1cd tools/ocaml/libs/eventchn/Makefile
--- a/tools/ocaml/libs/eventchn/Makefile
+++ b/tools/ocaml/libs/eventchn/Makefile
@@ -8,7 +8,7 @@
INTF = $(foreach obj, $(OBJS),$(obj).cmi)
LIBS = eventchn.cma eventchn.cmxa
-LIBS_evtchn = $(LDLIBS_libxenctrl)
+LIBS_eventchn = $(LDLIBS_libxenctrl)
all: $(INTF) $(LIBS) $(PROGRAMS)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|