1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 22:43:50 +01:00

Merge pull request #11478 from cladmi/pr/make/makefile_features

Makefile.features: prerequisites for moving CPU/CPU_MODEL to boards/Makefile.features
This commit is contained in:
Kevin "Bear Puncher" Weiss 2019-07-01 17:52:07 +02:00 committed by GitHub
commit 9b4c01c2dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 3 deletions

View File

@ -5,6 +5,13 @@ OLD_USEPKG := $(sort $(USEPKG))
# include board dependencies
-include $(RIOTBOARD)/$(BOARD)/Makefile.dep
# Transitional conditional include until all boards define 'CPU' in
# Makefile.features
ifneq (,$(CPU))
# include cpu dependencies
-include $(RIOTCPU)/$(CPU)/Makefile.dep
endif
# include external modules dependencies
# processed before RIOT ones to be evaluated before the 'default' rules.
-include $(EXTERNAL_MODULE_DIRS:%=%/Makefile.dep)

View File

@ -1,7 +1,21 @@
# Process FEATURES variables
#
# The board/board common are responsible for defining the CPU and CPU_MODEL
# variables in their Makefile.features.
# This makes them available when setting features based on CPU_MODEL in the cpu
# Makefile.features and also during dependency resolution.
# Transition:
# Moving 'CPU/CPU_MODEL' to Makefile.features is an ongoing work and may not
# reflect the state of all boards for the moment.
include $(RIOTBOARD)/$(BOARD)/Makefile.features
# Transitional conditional include until all boards define 'CPU'
ifneq (,$(CPU))
include $(RIOTCPU)/$(CPU)/Makefile.features
endif
# Resolve FEATURES_ variables
# Their value will only be complete after resolving dependencies

View File

@ -275,7 +275,7 @@ include $(RIOTCPU)/$(CPU)/Makefile.include
# The check is only done after 'include $(RIOTBOARD)/$(BOARD)/Makefile.include'
# because we need to have the 'CPU' variable defined
ifeq (,$(filter $(RIOTCPU)/$(CPU)/Makefile.features,$(MAKEFILE_LIST)))
$(error $$(RIOTCPU)/$$(CPU)/Makefile.features must have been included by the board / board common Makefile.features)
$(error $$(RIOTCPU)/$$(CPU)/Makefile.features must have been included by the board / board common Makefile.features or Makefile.features)
endif
# Assume GCC/GNU as supported toolchain if CPU's Makefile.include doesn't

View File

@ -14,8 +14,15 @@ define board_missing_features
DISABLE_MODULE := $(DISABLE_MODULE_GLOBAL)
FEATURES_REQUIRED := $(FEATURES_REQUIRED_GLOBAL)
FEATURES_OPTIONAL := $(FEATURES_OPTIONAL_GLOBAL)
# Remove board specific variables set by Makefile.features/Makefile.dep
FEATURES_PROVIDED :=
# Undefine variables that must not be defined when starting.
# Some are sometime set as `?=`
undefine CPU
undefine CPU_MODEL
include $(RIOTBASE)/Makefile.features
include $(RIOTBASE)/Makefile.dep

View File

@ -8,8 +8,8 @@ export QUIET # The parameter to use whether to show verbose make
export APPLICATION # The application, set in the Makefile which is run by the user.
export APPLICATION_MODULE # The application module name.
export BOARD # The board to compile the application for.
export CPU # The CPU, set by the board's Makefile.include.
export CPU_MODEL # The specific identifier of the used CPU, used for some CPU implementations to differentiate between different memory layouts
export CPU # The CPU, set by the board's Makefile.features.
export CPU_MODEL # The specific identifier of the used CPU, used for some CPU implementations to differentiate between different memory layouts. Set by the board's Makefile.features.
export MCU # The MCU, set by the board's Makefile.include, or defaulted to the same value as CPU.
export INCLUDES # The extra include paths, set by the various Makefile.include files.
export CXXINCLUDES # The extra include paths for c++, set by the various Makefile.include files.