Makefile: Deflate handling of Linux-only programmers
Also one case that doesn't work on Android.
Change-Id: I17381172f8df213bbddccedec2ef288326e49ecf
Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/55877
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/71409
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/Makefile b/Makefile
index e1df523..6fccfa4 100644
--- a/Makefile
+++ b/Makefile
@@ -238,34 +238,15 @@
$(call mark_unsupported,$(DEPENDS_ON_LIBUSB1) $(DEPENDS_ON_LIBFTDI) $(DEPENDS_ON_LIBJAYLINK))
endif
-ifneq ($(TARGET_OS), Linux)
-# Android is handled internally as separate OS, but it supports CONFIG_LINUX_SPI and CONFIG_MSTARDDC_SPI
-ifneq ($(TARGET_OS), Android)
-ifeq ($(CONFIG_LINUX_MTD), yes)
-UNSUPPORTED_FEATURES += CONFIG_LINUX_MTD=yes
-else
-override CONFIG_LINUX_MTD = no
-endif
-ifeq ($(CONFIG_LINUX_SPI), yes)
-UNSUPPORTED_FEATURES += CONFIG_LINUX_SPI=yes
-else
-override CONFIG_LINUX_SPI = no
-endif
-ifeq ($(CONFIG_MSTARDDC_SPI), yes)
-UNSUPPORTED_FEATURES += CONFIG_MSTARDDC_SPI=yes
-else
-override CONFIG_MSTARDDC_SPI = no
-endif
-endif
+# Android is handled internally as separate OS, but it supports about the same drivers as Linux.
+ifeq ($(filter $(TARGET_OS),Linux Android), )
+$(call mark_unsupported,CONFIG_LINUX_MTD CONFIG_LINUX_SPI)
+$(call mark_unsupported,CONFIG_MSTARDDC_SPI)
endif
ifeq ($(TARGET_OS), Android)
-# Android on x86 (currently) does not provide raw PCI port I/O operations
-ifeq ($(CONFIG_RAYER_SPI), yes)
-UNSUPPORTED_FEATURES += CONFIG_RAYER_SPI=yes
-else
-override CONFIG_RAYER_SPI = no
-endif
+# Android on x86 (currently) does not provide raw PCI port I/O operations.
+$(call mark_unsupported,CONFIG_RAYER_SPI)
endif
###############################################################################