[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 11/16] tools: provide pkg-config file for libxenguest, update the one for libxenctrl



In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xenguest.pc file.

Update the xencontrol.pc file to reflect the dependencies of libxenctrl.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
 tools/libxc/Makefile         |  6 ++++--
 tools/libxc/xencontrol.pc.in |  3 ++-
 tools/libxc/xenguest.pc.in   | 10 ++++++++++
 3 files changed, 16 insertions(+), 3 deletions(-)
 create mode 100644 tools/libxc/xenguest.pc.in

diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index b15736c..0732a9f 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -159,7 +159,7 @@ endif
 $(CTRL_LIB_OBJS) $(GUEST_LIB_OBJS) \
 $(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS): xc_private.h
 
-PKG_CONFIG := xencontrol.pc
+PKG_CONFIG := xencontrol.pc xenguest.pc
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
@@ -174,6 +174,7 @@ PKG_CONFIG_LOCAL := $(foreach 
pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXC)/include
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
 
 .PHONY: all
 all: build
@@ -201,6 +202,7 @@ install: build
        $(SYMLINK_SHLIB) libxenguest.so.$(MAJOR) 
$(DESTDIR)$(libdir)/libxenguest.so
        $(INSTALL_DATA) include/xenguest.h $(DESTDIR)$(includedir)
        $(INSTALL_DATA) xencontrol.pc $(DESTDIR)$(PKG_INSTALLDIR)
+       $(INSTALL_DATA) xenguest.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: TAGS
 TAGS:
@@ -210,7 +212,7 @@ TAGS:
 clean:
        rm -rf *.rpm $(LIB) *~ $(DEPS) \
             _paths.h \
-           xencontrol.pc \
+           xencontrol.pc xenguest.pc \
             $(CTRL_LIB_OBJS) $(CTRL_PIC_OBJS) \
             $(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS)
 
diff --git a/tools/libxc/xencontrol.pc.in b/tools/libxc/xencontrol.pc.in
index 8651bca..fdc2530 100644
--- a/tools/libxc/xencontrol.pc.in
+++ b/tools/libxc/xencontrol.pc.in
@@ -5,5 +5,6 @@ libdir=@@libdir@@
 Name: Xencontrol
 Description: The Xencontrol library for Xen hypervisor
 Version: @@version@@
-Cflags: -I${includedir}
+Cflags: -I${includedir} @@cflagslocal@@
 Libs: @@libsflag@@${libdir} -lxenctrl
+Requires.private: 
xenevtchn,xengnttab,xengntshr,xencall,xenforeignmemory,xendevicemodel,xentoollog
diff --git a/tools/libxc/xenguest.pc.in b/tools/libxc/xenguest.pc.in
new file mode 100644
index 0000000..225ac0b
--- /dev/null
+++ b/tools/libxc/xenguest.pc.in
@@ -0,0 +1,10 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xenguest
+Description: The Xenguest library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir}
+Libs: @@libsflag@@${libdir} -lxenguest
+Requires.private: xentoollog,xencall,xenforeignmemory,xenevtchn
-- 
2.10.2


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.