summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index feb72fcfed..0df7553f22 100644
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,14 @@ include Makefile.toolchain
.PHONY: all
all:
+# Returns the opposite of a configuration variable
+# y ->
+# ro -> rw
+# rw -> ro
+# -> y
+# usage: common-$(call not_cfg,$(CONFIG_FOO))+=bar.o
+not_cfg = $(subst ro rw,y,$(filter-out $(1:y=ro rw),ro rw))
+
# The board makefile sets $CHIP and the chip makefile sets $CORE.
# Include those now, since they must be defined for _flag_cfg below.
include $(BDIR)/build.mk