]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tools: add support for additional items in .pc files for local builds
authorJuergen Gross <jgross@suse.com>
Tue, 14 Mar 2017 13:31:12 +0000 (14:31 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 14 Mar 2017 14:13:14 +0000 (14:13 +0000)
Some libraries require different compiler-flags when being used in a
local build compared to a build using installed libraries.

Reflect that by supporting local cflags variables in generated
pkg-config files. The local variants will be empty in the installed
pkg-config files.

The flags for the linker in the local variants will have to specify
the search patch for the library with "-Wl,-rpath-link=", while the
flags for the installed library will be "-L".

Add needed directory patterns.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/Rules.mk
tools/libxc/xencontrol.pc.in

index 392fb0331bdf068fbfc9c271333040ea18066bc9..8b8c48e14a3ddcbfa8d719bda8aad9ae0170529a 100644 (file)
@@ -254,10 +254,18 @@ $(PKG_CONFIG_DIR)/%.pc: %.pc.in Makefile
        @sed -e 's!@@version@@!$(PKG_CONFIG_VERSION)!g' \
             -e 's!@@prefix@@!$(PKG_CONFIG_PREFIX)!g' \
             -e 's!@@incdir@@!$(PKG_CONFIG_INCDIR)!g' \
-            -e 's!@@libdir@@!$(PKG_CONFIG_LIBDIR)!g' < $< > $@
+            -e 's!@@libdir@@!$(PKG_CONFIG_LIBDIR)!g' \
+            -e 's!@@firmwaredir@@!$(XENFIRMWAREDIR)!g' \
+            -e 's!@@libexecbin@@!$(LIBEXEC_BIN)!g' \
+            -e 's!@@cflagslocal@@!$(PKG_CONFIG_CFLAGS_LOCAL)!g' \
+            -e 's!@@libsflag@@!-Wl,-rpath-link=!g' < $< > $@
 
 %.pc: %.pc.in Makefile
        @sed -e 's!@@version@@!$(PKG_CONFIG_VERSION)!g' \
             -e 's!@@prefix@@!$(PKG_CONFIG_PREFIX)!g' \
             -e 's!@@incdir@@!$(PKG_CONFIG_INCDIR)!g' \
-            -e 's!@@libdir@@!$(PKG_CONFIG_LIBDIR)!g' < $< > $@
+            -e 's!@@libdir@@!$(PKG_CONFIG_LIBDIR)!g' \
+            -e 's!@@firmwaredir@@!$(XENFIRMWAREDIR)!g' \
+            -e 's!@@libexecbin@@!$(LIBEXEC_BIN)!g' \
+            -e 's!@@cflagslocal@@!!g' \
+            -e 's!@@libsflag@@!-L!g' < $< > $@
index 213206fd6366d5faf76d245e0e0b3a9685ed564c..8651bca640f568d38c73b3e9045171f4157c107f 100644 (file)
@@ -6,4 +6,4 @@ Name: Xencontrol
 Description: The Xencontrol library for Xen hypervisor
 Version: @@version@@
 Cflags: -I${includedir}
-Libs: -L${libdir} -lxenctrl
+Libs: @@libsflag@@${libdir} -lxenctrl