tools: provide pkg-config file for libxenvchan

In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xenvchan.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 8d3b36373e
commit 42affa826e
3 files changed
+31 -1

No files matched your search

+1
View File
@@ -187,6 +187,7 @@ tools/include/xen/*
tools/include/xen-xsm/*
tools/include/xen-foreign/*.(c|h|size)
tools/include/xen-foreign/checker
tools/libvchan/xenvchan.pc
tools/libxc/*.pc
tools/libxl/_libxl.api-for-check
tools/libxl/*.api-ok
+20 -1
View File
@@ -21,8 +21,25 @@ CFLAGS += -I../include -I.
io.o io.opic: CFLAGS += $(CFLAGS_libxenctrl) # for xen_mb et al
PKG_CONFIG := xenvchan.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_LIBVCHAN)
$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
.PHONY: all
all: libxenvchan.so vchan-node1 vchan-node2 libxenvchan.a
all: libxenvchan.so vchan-node1 vchan-node2 libxenvchan.a $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
libxenvchan.so: libxenvchan.so.$(MAJOR)
ln -sf $< $@
@@ -51,10 +68,12 @@ install: all
ln -sf libxenvchan.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenvchan.so
$(INSTALL_DATA) libxenvchan.h $(DESTDIR)$(includedir)
$(INSTALL_DATA) libxenvchan.a $(DESTDIR)$(libdir)
$(INSTALL_DATA) xenvchan.pc $(DESTDIR)$(PKG_INSTALLDIR)
.PHONY: clean
clean:
$(RM) -f *.o *.opic *.so* *.a vchan-node1 vchan-node2 $(DEPS)
$(RM) -f xenvchan.pc
distclean: clean
+10
View File
@@ -0,0 +1,10 @@
prefix=@@prefix@@
includedir=@@incdir@@
libdir=@@libdir@@
Name: Xenvchan
Description: The Xenvchan library for Xen hypervisor
Version: @@version@@
Cflags: -I${includedir} @@cflagslocal@@
Libs: @@libsflag@@${libdir} -lxenvchan
Requires.private: xentoollog,xenstore,xengntshr,xenevtchn,xengnttab
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.