Makefile: remove CPPFLAGS and LDFLAGS to default directories
All CPPFLAGS and LDFLAGS for dependencies are handled by pkg-config
Change-Id: Ib7c11a0c8a7918562256480c4be0c95355f981c5
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/61526
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72293
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/Makefile b/Makefile
index 8553c77..03f8cc8 100644
--- a/Makefile
+++ b/Makefile
@@ -245,21 +245,9 @@
HAS_LINUX_SPI := $(call c_compile_test, Makefile.d/linux_spi_test.c)
HAS_LINUX_I2C := $(call c_compile_test, Makefile.d/linux_i2c_test.c)
-ifeq ($(TARGET_OS), $(filter $(TARGET_OS), FreeBSD OpenBSD DragonFlyBSD))
-override CPPFLAGS += -I/usr/local/include
-override LDFLAGS += -L/usr/local/lib
-endif
-
-ifeq ($(TARGET_OS), Darwin)
-override CPPFLAGS += -I/opt/local/include -I/usr/local/include
-override LDFLAGS += -L/opt/local/lib -L/usr/local/lib
-endif
-
ifeq ($(TARGET_OS), NetBSD)
# Needs special `pciutils/pci.h` for older NetBSD packages
-PCIUTILS_PCI_H := $(shell [ -f /usr/pkg/include/pciutils/pci.h ] && echo -DPCIUTILS_PCI_H)
-override CPPFLAGS += -I/usr/pkg/include $(PCIUTILS_PCI_H)
-override LDFLAGS += -L/usr/pkg/lib
+override CPPFLAGS += $(shell [ -f /usr/pkg/include/pciutils/pci.h ] && echo -DPCIUTILS_PCI_H)
endif
ifeq ($(TARGET_OS), DOS)
diff --git a/platform/pci.h b/platform/pci.h
index fdb0f48..2a524b2 100644
--- a/platform/pci.h
+++ b/platform/pci.h
@@ -15,7 +15,7 @@
#define index shadow_workaround_index
#if defined (PCIUTILS_PCI_H)
-#include <pciutils/pci.h>
+#include <pci.h>
#else
#include <pci/pci.h>
#endif