aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.de>2021-09-28 15:22:34 +0200
committerNico Huber <nico.h@gmx.de>2021-10-15 14:35:05 +0000
commitba275d8bdb1eacd357b942b0aa7df5612f751fc5 (patch)
treee6813932e37cb112167091345ed50a0bfced6251 /util
parent8da9a9acdf5adadd39f1d5e03edd2e326823ef62 (diff)
downloadflashrom-ba275d8bdb1eacd357b942b0aa7df5612f751fc5.tar.gz
flashrom-ba275d8bdb1eacd357b942b0aa7df5612f751fc5.tar.bz2
flashrom-ba275d8bdb1eacd357b942b0aa7df5612f751fc5.zip
Makefile: move determination test for OS to Makefile.d
Move the test code for OS detection in a extra directory to split it from the main flashrom code. Change-Id: Id911f17f4100f242e1fde10d23a8459ddf38b369 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/58015 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'util')
-rw-r--r--util/ich_descriptors_tool/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/ich_descriptors_tool/Makefile b/util/ich_descriptors_tool/Makefile
index 89624312..168220ca 100644
--- a/util/ich_descriptors_tool/Makefile
+++ b/util/ich_descriptors_tool/Makefile
@@ -4,6 +4,8 @@
# This Makefile works standalone, but it is usually called from the main
# Makefile in the flashrom directory.
+include ../../Makefile.include
+
PROGRAM=ich_descriptors_tool
EXTRAINCDIRS = ../../ .
DEPPATH = .dep
@@ -32,8 +34,7 @@ EXEC_SUFFIX := .exe
FLASHROM_CFLAGS += -D__USE_MINGW_ANSI_STDIO=1
endif
-override TARGET_OS := $(shell $(CC) $(CPPFLAGS) -E $(SHAREDSRCDIR)/os.h | grep -v '^\#' | grep '"' | \
- cut -f 2 -d'"')
+override TARGET_OS := $(call c_macro_test, ../../Makefile.d/os_test.h)
ifeq ($(TARGET_OS), DOS)
EXEC_SUFFIX := .exe