mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
c/s f089fddd94 broke the Ocaml ABI by renumering
XEN_SYSCTL_PHYSCAP_directio without adjusting the Ocaml
physinfo_cap_flag enumeration.
Add build machinery which will check the ABI correspondence.
This will result in a compile time failure whenever constants get
renumbered/added without a compatible adjustment to the Ocaml ABI.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
42 lines
969 B
Makefile
42 lines
969 B
Makefile
TOPLEVEL=$(CURDIR)/../..
|
|
XEN_ROOT=$(TOPLEVEL)/../..
|
|
include $(TOPLEVEL)/common.make
|
|
|
|
CFLAGS += -I../mmap $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest)
|
|
CFLAGS += $(APPEND_CFLAGS)
|
|
OCAMLINCLUDE += -I ../mmap
|
|
|
|
OBJS = xenctrl
|
|
INTF = xenctrl.cmi
|
|
LIBS = xenctrl.cma xenctrl.cmxa
|
|
|
|
LIBS_xenctrl = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest)
|
|
|
|
xenctrl_OBJS = $(OBJS)
|
|
xenctrl_C_OBJS = xenctrl_stubs
|
|
|
|
OCAML_LIBRARY = xenctrl
|
|
|
|
all: $(INTF) $(LIBS)
|
|
|
|
libs: $(LIBS)
|
|
|
|
.PHONY: install
|
|
install: $(LIBS) META
|
|
mkdir -p $(OCAMLDESTDIR)
|
|
$(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenctrl
|
|
$(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenctrl META $(INTF) $(LIBS) *.a *.so *.cmx
|
|
|
|
.PHONY: uninstall
|
|
uninstall:
|
|
$(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenctrl
|
|
|
|
xenctrl_stubs.o: xenctrl_abi_check.h
|
|
|
|
xenctrl_abi_check.h: abi-check xenctrl_stubs.c xenctrl.ml
|
|
$(PERL) -w $^ >$@.tmp && mv -f $@.tmp $@
|
|
|
|
GENERATED_FILES += xenctrl_abi_check.h
|
|
|
|
include $(TOPLEVEL)/Makefile.rules
|