From ac9b12263ae123ebbc30363459a3d82939cb83db Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 9 Jan 2017 17:55:43 +0100 Subject: [PATCH] make: factor out features handling, add default feature handling --- Makefile.features | 8 ++++++++ Makefile.include | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 Makefile.features diff --git a/Makefile.features b/Makefile.features new file mode 100644 index 0000000000..adb95de06e --- /dev/null +++ b/Makefile.features @@ -0,0 +1,8 @@ +# import list of provided features +-include $(RIOTBOARD)/$(BOARD)/Makefile.features +-include $(RIOTCPU)/$(CPU)/Makefile.features + +DEFAULT_FEATURES += periph_pm + +# add available default features to required list +FEATURES_REQUIRED += $(filter-out $(DISABLE_FEATURES), $(filter $(FEATURES_PROVIDED), $(DEFAULT_FEATURES))) diff --git a/Makefile.include b/Makefile.include index 7fc769c714..196810d085 100644 --- a/Makefile.include +++ b/Makefile.include @@ -398,8 +398,8 @@ $(CURDIR)/eclipsesym.xml: # Extra make goals for testing and comparing changes. include $(RIOTBASE)/Makefile.buildtests -# import list of provided features --include $(RIOTBOARD)/$(BOARD)/Makefile.features +# process provided features +include $(RIOTBASE)/Makefile.features # Export variables used throughout the whole make system: include $(RIOTBASE)/Makefile.vars