Nico Huber submitted this change.
Makefile: summarize systems with the same CPPFLAGS and LDFLAGS
Change-Id: I067430e52eb41bf0af4f08246bbe59117bc09bdb
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58247
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
---
M Makefile
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/Makefile b/Makefile
index 29d1020..bc0047f 100644
--- a/Makefile
+++ b/Makefile
@@ -165,31 +165,21 @@
override TARGET_OS := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E os.h 2>/dev/null \
| tail -1 | cut -f 2 -d'"'))
+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), FreeBSD)
-override CPPFLAGS += -I/usr/local/include
-override LDFLAGS += -L/usr/local/lib
-endif
-
-ifeq ($(TARGET_OS), OpenBSD)
-override CPPFLAGS += -I/usr/local/include
-override LDFLAGS += -L/usr/local/lib
-endif
-
ifeq ($(TARGET_OS), NetBSD)
override CPPFLAGS += -I/usr/pkg/include
override LDFLAGS += -L/usr/pkg/lib
endif
-ifeq ($(TARGET_OS), DragonFlyBSD)
-override CPPFLAGS += -I/usr/local/include
-override LDFLAGS += -L/usr/local/lib
-endif
-
ifeq ($(TARGET_OS), DOS)
EXEC_SUFFIX := .exe
# DJGPP has odd uint*_t definitions which cause lots of format string warnings.
To view, visit change 58247. To unsubscribe, or for help writing mail filters, visit settings.