mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
8d3b36373e
commit
42affa826e
3 files changed
+31
-1
No files matched your search
@@ -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
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||