From 462a6159ab8bcebd4ef5c16e9e436ee10ec0cf48 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Fri, 5 Nov 2021 12:28:06 +0100 Subject: Makefile: Make pkg-config mandatory to find libpci Use `make HAS_LIBPCI=yes/no` to override the pkg-config detection and `CONFIG_LIBPCI_CFLAGS` and `CONFIG_LIBPCI_LDFLAGS` to set cflags and ldflags manually. The optional dependency of libpci libz, is automatically handled by pkg-config. Change-Id: I21b4a261b34b7e688635fc6e20b7beebfa64c7ed Signed-off-by: Thomas Heijligen Reviewed-on: https://review.coreboot.org/c/flashrom/+/59050 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Paul Menzel --- Makefile.include | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'Makefile.include') diff --git a/Makefile.include b/Makefile.include index 67eec5292..a3abcad81 100644 --- a/Makefile.include +++ b/Makefile.include @@ -51,43 +51,3 @@ endef define dependency_ldflags $(call debug_shell, $(if $(PKG_CONFIG_LIBDIR),PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR),) $(PKG_CONFIG) --libs $1 2>/dev/null) endef - -define LIBPCI_TEST -/* Avoid a failing test due to libpci header symbol shadowing breakage */ -#define index shadow_workaround_index -#if !defined __NetBSD__ -#include -#else -#include -#endif -struct pci_access *pacc; -int main(int argc, char **argv) -{ - (void) argc; - (void) argv; - pacc = pci_alloc(); - return 0; -} -endef -export LIBPCI_TEST - -define PCI_GET_DEV_TEST -/* Avoid a failing test due to libpci header symbol shadowing breakage */ -#define index shadow_workaround_index -#if !defined __NetBSD__ -#include -#else -#include -#endif -struct pci_access *pacc; -struct pci_dev *dev = {0}; -int main(int argc, char **argv) -{ - (void) argc; - (void) argv; - pacc = pci_alloc(); - dev = pci_get_dev(pacc, dev->domain, dev->bus, dev->dev, 1); - return 0; -} -endef -export PCI_GET_DEV_TEST -- cgit v1.2.3