From bb0a6447d98e77b1278d200e3aa6fdae216cabaa Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Tue, 12 Oct 2021 13:18:15 +0200 Subject: Makefile: summarize systems with the same CPPFLAGS and LDFLAGS Change-Id: I067430e52eb41bf0af4f08246bbe59117bc09bdb Signed-off-by: Thomas Heijligen Reviewed-on: https://review.coreboot.org/c/flashrom/+/58247 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber Reviewed-by: Felix Singer --- Makefile | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 29d10205..bc0047f8 100644 --- a/Makefile +++ b/Makefile @@ -165,19 +165,14 @@ endif override TARGET_OS := $(strip $(call debug_shell,$(CC) $(CPPFLAGS) -E os.h 2>/dev/null \ | tail -1 | cut -f 2 -d'"')) -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) +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), OpenBSD) -override CPPFLAGS += -I/usr/local/include -override LDFLAGS += -L/usr/local/lib +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) @@ -185,11 +180,6 @@ 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. -- cgit v1.2.3