Made the call to pkg_config configurable via the PKG_CONFIG macro, which is necessary for cross-building VDR

This commit is contained in:
Klaus Schmidinger
2020-06-22 15:08:46 +02:00
parent 73bcd869dc
commit f5dba03447
12 changed files with 42 additions and 25 deletions

View File

@@ -12,7 +12,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: newplugin 4.3 2017/05/29 08:55:21 kls Exp $
# $Id: newplugin 4.4 2020/06/22 15:08:46 kls Exp $
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
@@ -75,7 +75,8 @@ VERSION = \$(shell grep 'static const char \\*VERSION *=' \$(PLUGIN).c | awk '{
### The directory environment:
# Use package data if installed...otherwise assume we're under the VDR source directory:
PKGCFG = \$(if \$(VDRDIR),\$(shell pkg-config --variable=\$(1) \$(VDRDIR)/vdr.pc),\$(shell PKG_CONFIG_PATH="\$\$PKG_CONFIG_PATH:../../.." pkg-config --variable=\$(1) vdr))
PKG_CONFIG ?= pkg-config
PKGCFG = \$(if \$(VDRDIR),\$(shell $(PKG_CONFIG) --variable=\$(1) \$(VDRDIR)/vdr.pc),\$(shell PKG_CONFIG_PATH="\$\$PKG_CONFIG_PATH:../../.." $(PKG_CONFIG) --variable=\$(1) vdr))
LIBDIR = \$(call PKGCFG,libdir)
LOCDIR = \$(call PKGCFG,locdir)
PLGCFG = \$(call PKGCFG,plgcfg)