[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 14/16] tools: provide pkg-config file for libxenvchan
In order to be able to use pkg-config for obtaining linker- and compiler-flags provide a xenvchan.pc file. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- .gitignore | 1 + tools/libvchan/Makefile | 21 ++++++++++++++++++++- tools/libvchan/xenvchan.pc.in | 10 ++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 tools/libvchan/xenvchan.pc.in diff --git a/.gitignore b/.gitignore index fbea839..67d66e2 100644 --- a/.gitignore +++ b/.gitignore @@ -187,6 +187,7 @@ tools/include/xen/* tools/include/xen-xsm/* tools/include/xen-foreign/*.(c|h|size) tools/include/xen-foreign/checker +tools/libvchan/xenvchan.pc tools/libxc/*.pc tools/libxl/_libxl.api-for-check tools/libxl/*.api-ok diff --git a/tools/libvchan/Makefile b/tools/libvchan/Makefile index df70cf2..b816eb7 100644 --- a/tools/libvchan/Makefile +++ b/tools/libvchan/Makefile @@ -21,8 +21,25 @@ CFLAGS += -I../include -I. io.o io.opic: CFLAGS += $(CFLAGS_libxenctrl) # for xen_mb et al +PKG_CONFIG := xenvchan.pc +PKG_CONFIG_VERSION := $(MAJOR).$(MINOR) + +ifneq ($(CONFIG_LIBXC_MINIOS),y) +PKG_CONFIG_INST := $(PKG_CONFIG) +$(PKG_CONFIG_INST): PKG_CONFIG_PREFIX = $(prefix) +$(PKG_CONFIG_INST): PKG_CONFIG_INCDIR = $(includedir) +$(PKG_CONFIG_INST): PKG_CONFIG_LIBDIR = $(libdir) +endif + +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_LIBVCHAN) +$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) +$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude) + .PHONY: all -all: libxenvchan.so vchan-node1 vchan-node2 libxenvchan.a +all: libxenvchan.so vchan-node1 vchan-node2 libxenvchan.a $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL) libxenvchan.so: libxenvchan.so.$(MAJOR) ln -sf $< $@ @@ -51,10 +68,12 @@ install: all ln -sf libxenvchan.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenvchan.so $(INSTALL_DATA) libxenvchan.h $(DESTDIR)$(includedir) $(INSTALL_DATA) libxenvchan.a $(DESTDIR)$(libdir) + $(INSTALL_DATA) xenvchan.pc $(DESTDIR)$(PKG_INSTALLDIR) .PHONY: clean clean: $(RM) -f *.o *.opic *.so* *.a vchan-node1 vchan-node2 $(DEPS) + $(RM) -f xenvchan.pc distclean: clean diff --git a/tools/libvchan/xenvchan.pc.in b/tools/libvchan/xenvchan.pc.in new file mode 100644 index 0000000..605e42b --- /dev/null +++ b/tools/libvchan/xenvchan.pc.in @@ -0,0 +1,10 @@ +prefix=@@prefix@@ +includedir=@@incdir@@ +libdir=@@libdir@@ + +Name: Xenvchan +Description: The Xenvchan library for Xen hypervisor +Version: @@version@@ +Cflags: -I${includedir} @@cflagslocal@@ +Libs: @@libsflag@@${libdir} -lxenvchan +Requires.private: xentoollog,xenstore,xengntshr,xenevtchn,xengnttab -- 2.10.2 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |