[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 13/16] tools: provide pkg-config file for libxenstat
In order to be able to use pkg-config for obtaining linker- and compiler-flags provide a xenstat.pc file. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- .gitignore | 1 + tools/xenstat/libxenstat/Makefile | 20 +++++++++++++++++++- tools/xenstat/libxenstat/xenstat.pc.in | 10 ++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 tools/xenstat/libxenstat/xenstat.pc.in diff --git a/.gitignore b/.gitignore index b6859cf..fbea839 100644 --- a/.gitignore +++ b/.gitignore @@ -241,6 +241,7 @@ tools/xenmon/xentrace_setmask tools/xenmon/xenbaked tools/xenpaging/xenpaging tools/xenpmd/xenpmd +tools/xenstat/libxenstat/xenstat.pc tools/xenstat/libxenstat/src/_paths.h tools/xenstat/xentop/xentop tools/xenstore/xenstore diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile index 213d998..85cec63 100644 --- a/tools/xenstat/libxenstat/Makefile +++ b/tools/xenstat/libxenstat/Makefile @@ -37,8 +37,24 @@ CFLAGS+=-Isrc $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(CFLAGS_xeninclude) -i LDLIBS-y = $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl) LDLIBS-$(CONFIG_SunOS) += -lkstat +PKG_CONFIG := xenstat.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_LIBXENSTAT) +$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) + .PHONY: all -all: $(LIB) $(SHLIB) $(SHLIB_LINKS) +all: $(LIB) $(SHLIB) $(SHLIB_LINKS) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL) $(OBJECTS-y): src/_paths.h @@ -63,6 +79,7 @@ install: all $(INSTALL_PROG) src/libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir) ln -sf libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenstat.so.$(MAJOR) ln -sf libxenstat.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenstat.so + $(INSTALL_DATA) xenstat.pc $(DESTDIR)$(PKG_INSTALLDIR) PYLIB=bindings/swig/python/_xenstat.so PYMOD=bindings/swig/python/xenstat.py @@ -138,6 +155,7 @@ endif clean: rm -f $(LIB) $(SHLIB) $(SHLIB_LINKS) $(OBJECTS-y) \ $(BINDINGS) $(BINDINGSRC) $(DEPS) src/_paths.h + rm -f xenstat.pc .PHONY: distclean distclean: clean diff --git a/tools/xenstat/libxenstat/xenstat.pc.in b/tools/xenstat/libxenstat/xenstat.pc.in new file mode 100644 index 0000000..ad00577 --- /dev/null +++ b/tools/xenstat/libxenstat/xenstat.pc.in @@ -0,0 +1,10 @@ +prefix=@@prefix@@ +includedir=@@incdir@@ +libdir=@@libdir@@ + +Name: Xenstat +Description: The Xenstat library for Xen hypervisor +Version: @@version@@ +Cflags: -I${includedir} +Libs: @@libsflag@@${libdir} -lxenstat +Requires.private: xencontrol,xenstore -- 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 |