From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
wei.liu2@citrix.com, ian.jackson@eu.citrix.com
Subject: [PATCH v2 16/17] tools: provide pkg-config file for libxenblktapctl
Date: Tue, 14 Mar 2017 14:31:23 +0100 [thread overview]
Message-ID: <20170314133124.942-17-jgross@suse.com> (raw)
In-Reply-To: <20170314133124.942-1-jgross@suse.com>
In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xenblktapctl.pc file.
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
.gitignore | 1 +
tools/blktap2/control/Makefile | 23 +++++++++++++++++++++--
tools/blktap2/control/xenblktapctl.pc.in | 9 +++++++++
3 files changed, 31 insertions(+), 2 deletions(-)
create mode 100644 tools/blktap2/control/xenblktapctl.pc.in
diff --git a/.gitignore b/.gitignore
index 0f3f8a5..1753975 100644
--- a/.gitignore
+++ b/.gitignore
@@ -108,6 +108,7 @@ tools/libs/foreignmemory/headers.chk
tools/libs/foreignmemory/xenforeignmemory.pc
tools/libs/devicemodel/headers.chk
tools/libs/devicemodel/xendevicemodel.pc
+tools/blktap2/control/xenblktapctl.pc
tools/blktap2/daemon/blktapctrl
tools/blktap2/drivers/img2qcow
tools/blktap2/drivers/lock-util
diff --git a/tools/blktap2/control/Makefile b/tools/blktap2/control/Makefile
index 767f52a..0d731f7 100644
--- a/tools/blktap2/control/Makefile
+++ b/tools/blktap2/control/Makefile
@@ -41,9 +41,26 @@ LIB_STATIC = $(LIBNAME).a
LIB_SHARED = $(LIBSONAME).$(MINOR)
IBIN = tap-ctl
+PKG_CONFIG := xenblktapctl.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_BLKTAP2)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude) $(CFLAGS_libxenctrl)
+
all: build
-build: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
+build: $(IBIN) $(LIB_STATIC) $(LIB_SHARED) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
$(LIBNAME).so: $(LIBSONAME)
ln -sf $< $@
@@ -60,18 +77,20 @@ $(LIB_STATIC): $(CTL_OBJS)
$(LIB_SHARED): $(CTL_PICS)
$(CC) $(LDFLAGS) -fPIC -Wl,$(SONAME_LDFLAG) -Wl,$(LIBSONAME) $(SHLIB_LDFLAGS) -rdynamic $^ -o $@ $(APPEND_LDFLAGS)
-install: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
+install: build
$(INSTALL_DIR) -p $(DESTDIR)$(sbindir)
$(INSTALL_PROG) $(IBIN) $(DESTDIR)$(sbindir)
$(INSTALL_DATA) $(LIB_STATIC) $(DESTDIR)$(libdir)
$(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(libdir)
ln -sf $(LIBSONAME) $(DESTDIR)$(libdir)/$(LIBNAME).so
ln -sf $(LIB_SHARED) $(DESTDIR)$(libdir)/$(LIBSONAME)
+ $(INSTALL_DATA) xenblktapctl.pc $(DESTDIR)$(PKG_INSTALLDIR)
clean:
rm -f $(OBJS) $(PICS) $(DEPS) $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
rm -f $(LIBNAME).so $(LIBSONAME)
rm -f *~
+ rm -f xenblktapctl.pc
distclean: clean
diff --git a/tools/blktap2/control/xenblktapctl.pc.in b/tools/blktap2/control/xenblktapctl.pc.in
new file mode 100644
index 0000000..81d2747
--- /dev/null
+++ b/tools/blktap2/control/xenblktapctl.pc.in
@@ -0,0 +1,9 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xenblktapctl
+Description: The Xenblktapctl library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir} @@cflagslocal@@
+Libs: @@libsflag@@${libdir} -lxenblktapctl
--
2.10.2
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-03-14 13:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
2017-03-14 13:31 ` [PATCH v2 01/17] tools: fix typo in tools/Rules.mk Juergen Gross
2017-03-14 13:31 ` [PATCH v2 02/17] tools: add missing library flag definitions Juergen Gross
2017-03-14 13:31 ` [PATCH v2 03/17] tools, stubdom: set PKG_CONFIG_DIR in main Makefiles Juergen Gross
2017-03-14 13:31 ` [PATCH v2 04/17] tools: install PKG_INSTALLDIR in tools/Makefile Juergen Gross
2017-03-14 14:11 ` Wei Liu
2017-03-14 13:31 ` [PATCH v2 05/17] tools: add support for additional items in .pc files for local builds Juergen Gross
2017-03-14 13:31 ` [PATCH v2 06/17] tools: provide pkg-config file for libxentoollog Juergen Gross
2017-03-14 13:31 ` [PATCH v2 07/17] tools: provide pkg-config file for libxenevtchn Juergen Gross
2017-03-14 13:31 ` [PATCH v2 08/17] tools: provide pkg-config file for libxengnttab Juergen Gross
2017-03-14 20:06 ` Andrew Cooper
2017-03-15 6:07 ` Juergen Gross
2017-03-15 10:33 ` Andrew Cooper
2017-03-15 10:17 ` Wei Liu
2017-03-15 10:26 ` Juergen Gross
2017-03-15 10:29 ` Wei Liu
2017-03-15 10:32 ` Andrew Cooper
2017-03-14 13:31 ` [PATCH v2 09/17] tools: provide pkg-config file for libxencall Juergen Gross
2017-03-14 13:31 ` [PATCH v2 10/17] tools: provide pkg-config file for libxenforeignmemory Juergen Gross
2017-03-14 13:31 ` [PATCH v2 11/17] tools: provide pkg-config file for libxendevicemodel Juergen Gross
2017-03-14 13:31 ` [PATCH v2 12/17] tools: provide pkg-config file for libxenguest, update the one for libxenctrl Juergen Gross
2017-03-14 13:31 ` [PATCH v2 13/17] tools: provide pkg-config file for libxenstore Juergen Gross
2017-03-14 13:31 ` [PATCH v2 14/17] tools: provide pkg-config file for libxenstat Juergen Gross
2017-03-14 13:31 ` [PATCH v2 15/17] tools: provide pkg-config file for libxenvchan Juergen Gross
2017-03-14 13:31 ` Juergen Gross [this message]
2017-03-14 13:31 ` [PATCH v2 17/17] tools: adapt xenlight.pc and xlutil.pc to new pkg-config scheme Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170314133124.942-17-jgross@suse.com \
--to=jgross@suse.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).