buildsystem: handle the IS_WINDOWS macro
On Windows target systems set the IS_WINDOWS=1 macro by the buildsystem.
Change-Id: I334708f2dec08ec9ca6ad4161fbd7fe22ac023a6
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/58277
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72246
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/Makefile b/Makefile
index d628f7d..1887846 100644
--- a/Makefile
+++ b/Makefile
@@ -196,6 +196,12 @@
$(call mark_unsupported,$(DEPENDS_ON_LIBUSB1) $(DEPENDS_ON_LIBFTDI) $(DEPENDS_ON_LIBJAYLINK))
endif
+ifeq ($(TARGET_OS), $(filter $(TARGET_OS), MinGW Cygwin))
+FEATURE_CFLAGS += -D'IS_WINDOWS=1'
+else
+FEATURE_CFLAGS += -D'IS_WINDOWS=0'
+endif
+
# FIXME: Should we check for Cygwin/MSVC as well?
ifeq ($(TARGET_OS), MinGW)
EXEC_SUFFIX := .exe