[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tools: provide pkg-config file for libxenforeignmemory
commit 571ee51261bb34707231d1edb87e6df91af1c94f Author: Juergen Gross <jgross@xxxxxxxx> AuthorDate: Tue Mar 14 14:31:17 2017 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Tue Mar 14 14:13:14 2017 +0000 tools: provide pkg-config file for libxenforeignmemory In order to be able to use pkg-config for obtaining linker- and compiler-flags provide a xenforeignmemory.pc file. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- .gitignore | 1 + tools/libs/foreignmemory/Makefile | 21 ++++++++++++++++++++- tools/libs/foreignmemory/xenforeignmemory.pc.in | 10 ++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index cb51479..af41e7a 100644 --- a/.gitignore +++ b/.gitignore @@ -105,6 +105,7 @@ tools/libs/gnttab/xengnttab.pc tools/libs/call/headers.chk tools/libs/call/xencall.pc tools/libs/foreignmemory/headers.chk +tools/libs/foreignmemory/xenforeignmemory.pc tools/libs/devicemodel/headers.chk tools/blktap2/daemon/blktapctrl tools/blktap2/drivers/img2qcow diff --git a/tools/libs/foreignmemory/Makefile b/tools/libs/foreignmemory/Makefile index f062f45..55677e8 100644 --- a/tools/libs/foreignmemory/Makefile +++ b/tools/libs/foreignmemory/Makefile @@ -24,6 +24,23 @@ ifneq ($(nosharedlibs),y) LIB += libxenforeignmemory.so endif +PKG_CONFIG := xenforeignmemory.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_LIBXENFOREIGNMEMORY)/include +$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) +$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude) + .PHONY: all all: build @@ -32,7 +49,7 @@ build: $(MAKE) libs .PHONY: libs -libs: headers.chk $(LIB) +libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL) headers.chk: $(wildcard include/*.h) @@ -56,6 +73,7 @@ install: build $(SYMLINK_SHLIB) libxenforeignmemory.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenforeignmemory.so.$(MAJOR) $(SYMLINK_SHLIB) libxenforeignmemory.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenforeignmemory.so $(INSTALL_DATA) include/xenforeignmemory.h $(DESTDIR)$(includedir) + $(INSTALL_DATA) xenforeignmemory.pc $(DESTDIR)$(PKG_INSTALLDIR) .PHONY: TAGS TAGS: @@ -66,6 +84,7 @@ clean: rm -rf *.rpm $(LIB) *~ $(DEPS) $(LIB_OBJS) $(PIC_OBJS) rm -f libxenforeignmemory.so.$(MAJOR).$(MINOR) libxenforeignmemory.so.$(MAJOR) rm -f headers.chk + rm -f xenforeignmemory.pc .PHONY: distclean distclean: clean diff --git a/tools/libs/foreignmemory/xenforeignmemory.pc.in b/tools/libs/foreignmemory/xenforeignmemory.pc.in new file mode 100644 index 0000000..63432dc --- /dev/null +++ b/tools/libs/foreignmemory/xenforeignmemory.pc.in @@ -0,0 +1,10 @@ +prefix=@@prefix@@ +includedir=@@incdir@@ +libdir=@@libdir@@ + +Name: Xenforeignmemory +Description: The Xenforeignmemory library for Xen hypervisor +Version: @@version@@ +Cflags: -I${includedir} @@cflagslocal@@ +Libs: @@libsflag@@${libdir} -lxenforeignmemory +Requires.private: xentoollog -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |