mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
My recent patch [1] to the Linux privcmd module introduced a dedicated mechanism for making dm_op hypercalls. This patch adds the necessary code to libxendevicemodel to take advantage of that mechanism if it is implemented in the tools domain kernel. [1] https://git.kernel.org/cgit/linux/kernel/git/ostr/linux.git/commit/?id=ab520be8 Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
73 lines
2.0 KiB
Makefile
73 lines
2.0 KiB
Makefile
XEN_ROOT = $(CURDIR)/../../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
MAJOR = 1
|
|
MINOR = 0
|
|
SHLIB_LDFLAGS += -Wl,--version-script=libxendevicemodel.map
|
|
|
|
CFLAGS += -Werror -Wmissing-prototypes
|
|
CFLAGS += -I./include $(CFLAGS_xeninclude)
|
|
CFLAGS += $(CFLAGS_libxentoollog)
|
|
CFLAGS += $(CFLAGS_libxencall)
|
|
|
|
SRCS-y += core.c
|
|
SRCS-$(CONFIG_Linux) += linux.c
|
|
SRCS-$(CONFIG_FreeBSD) += compat.c
|
|
SRCS-$(CONFIG_SunOS) += compat.c
|
|
SRCS-$(CONFIG_NetBSD) += compat.c
|
|
SRCS-$(CONFIG_MiniOS) += compat.c
|
|
|
|
LIB_OBJS := $(patsubst %.c,%.o,$(SRCS-y))
|
|
PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS-y))
|
|
|
|
LIB := libxendevicemodel.a
|
|
ifneq ($(nosharedlibs),y)
|
|
LIB += libxendevicemodel.so
|
|
endif
|
|
|
|
.PHONY: all
|
|
all: build
|
|
|
|
.PHONY: build
|
|
build:
|
|
$(MAKE) libs
|
|
|
|
.PHONY: libs
|
|
libs: headers.chk $(LIB)
|
|
|
|
headers.chk: $(wildcard include/*.h)
|
|
|
|
libxendevicemodel.a: $(LIB_OBJS)
|
|
$(AR) rc $@ $^
|
|
|
|
libxendevicemodel.so: libxendevicemodel.so.$(MAJOR)
|
|
$(SYMLINK_SHLIB) $< $@
|
|
libxendevicemodel.so.$(MAJOR): libxendevicemodel.so.$(MAJOR).$(MINOR)
|
|
$(SYMLINK_SHLIB) $< $@
|
|
|
|
libxendevicemodel.so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxendevicemodel.map
|
|
$(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxendevicemodel.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
|
|
|
|
.PHONY: install
|
|
install: build
|
|
$(INSTALL_DIR) $(DESTDIR)$(libdir)
|
|
$(INSTALL_DIR) $(DESTDIR)$(includedir)
|
|
$(INSTALL_SHLIB) libxendevicemodel.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
|
|
$(INSTALL_DATA) libxendevicemodel.a $(DESTDIR)$(libdir)
|
|
$(SYMLINK_SHLIB) libxendevicemodel.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxendevicemodel.so.$(MAJOR)
|
|
$(SYMLINK_SHLIB) libxendevicemodel.so.$(MAJOR) $(DESTDIR)$(libdir)/libxendevicemodel.so
|
|
$(INSTALL_DATA) include/xendevicemodel.h $(DESTDIR)$(includedir)
|
|
|
|
.PHONY: TAGS
|
|
TAGS:
|
|
etags -t *.c *.h
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -rf *.rpm $(LIB) *~ $(DEPS) $(LIB_OBJS) $(PIC_OBJS)
|
|
rm -f libxendevicemodel.so.$(MAJOR).$(MINOR) libxendevicemodel.so.$(MAJOR)
|
|
rm -f headers.chk
|
|
|
|
.PHONY: distclean
|
|
distclean: clean
|