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@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
Juergen Gross authored and Wei Liu committed 2017-03-14 14:13:14 +00:00
1 parent 1b008e99dc
commit 8d3b36373e
3 files changed
+30 -1

No files matched your search

+1
View File
@@ -243,6 +243,7 @@ tools/xenmon/xenbaked
tools/xenpaging/xenpaging
tools/xenpmd/xenpmd
tools/xenstat/libxenstat/src/_paths.h
tools/xenstat/libxenstat/xenstat.pc
tools/xenstat/xentop/xentop
tools/xenstore/xenstore
tools/xenstore/xenstore-chmod
+19 -1
View File
@@ -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
+10
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.