mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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@suse.com> Acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
da0f3506a2
commit
1b008e99dc
3 files changed
+32
No files matched your search
@@ -255,6 +255,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||