|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 12/16] tools: provide pkg-config file for libxenstore
In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xenstore.pc file.
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
.gitignore | 1 +
tools/xenstore/Makefile | 21 +++++++++++++++++++++
tools/xenstore/xenstore.pc.in | 10 ++++++++++
3 files changed, 32 insertions(+)
create mode 100644 tools/xenstore/xenstore.pc.in
diff --git a/.gitignore b/.gitignore
index eb33788..b6859cf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -254,6 +254,7 @@ tools/xenstore/xenstore-control
tools/xenstore/xenstore-ls
tools/xenstore/xenstored
tools/xenstore/xenstored_test
+tools/xenstore/xenstore.pc
tools/xenstore/xs_tdb_dump
tools/xentrace/xentrace_setsize
tools/xentrace/tbctl
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index bdca108..c4f9cde 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -105,12 +105,32 @@ libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic
libxenstore.a: xs.o xs_lib.o
$(AR) rcs $@ $^
+PKG_CONFIG := xenstore.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_XENSTORE)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
+
+$(LIBXENSTORE): $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
+
.PHONY: clean
clean:
rm -f *.a *.o *.opic *.so* xenstored_probes.h
rm -f xenstored xs_random xs_stress xs_crashme
rm -f xs_tdb_dump xenstore-control init-xenstore-domain
rm -f xenstore $(CLIENTS)
+ rm -f xenstore.pc
$(RM) $(DEPS)
.PHONY: distclean
@@ -150,6 +170,7 @@ endif
$(INSTALL_DATA) include/compat/xs_lib.h
$(DESTDIR)$(includedir)/xenstore-compat/xs_lib.h
ln -sf xenstore-compat/xs.h $(DESTDIR)$(includedir)/xs.h
ln -sf xenstore-compat/xs_lib.h $(DESTDIR)$(includedir)/xs_lib.h
+ $(INSTALL_DATA) xenstore.pc $(DESTDIR)$(PKG_INSTALLDIR)
.PHONY: clients-install
clients-install: clients
diff --git a/tools/xenstore/xenstore.pc.in b/tools/xenstore/xenstore.pc.in
new file mode 100644
index 0000000..45dc6b0
--- /dev/null
+++ b/tools/xenstore/xenstore.pc.in
@@ -0,0 +1,10 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xenstore
+Description: The Xenstore library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir} @@cflagslocal@@
+Libs: @@libsflag@@${libdir} -lxenstore
+Requires.private: xenevtchn,xencontrol,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 |