mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
make: process include and dep for external modules
Process `Makefile.include` for external modules. It is included after the others so it could overwrite some of the configuration if wanted. Process `Makefile.dep` for external modules. It is included before the others so it could be parsed before setting 'default' values to dependencies.
This commit is contained in:
parent
2260cd7f45
commit
6b534a935f
@ -5,6 +5,10 @@ OLD_USEPKG := $(sort $(USEPKG))
|
||||
# include board dependencies
|
||||
-include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|
||||
|
||||
# include external modules dependencies
|
||||
# processed before RIOT ones to be evaluated before the 'default' rules.
|
||||
-include $(EXTERNAL_MODULE_DIRS:%=%/Makefile.dep)
|
||||
|
||||
# pull dependencies from sys and drivers
|
||||
include $(RIOTBASE)/sys/Makefile.dep
|
||||
include $(RIOTBASE)/drivers/Makefile.dep
|
||||
|
@ -353,6 +353,9 @@ $(RIOTPKG)/%/Makefile.include::
|
||||
$(USEPKG:%=$(RIOTPKG)/%/Makefile.include): FORCE
|
||||
-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.include)
|
||||
|
||||
# include external modules configuration
|
||||
-include $(EXTERNAL_MODULE_DIRS:%=%/Makefile.include)
|
||||
|
||||
# Deduplicate includes without sorting them
|
||||
# see https://stackoverflow.com/questions/16144115/makefile-remove-duplicate-words-without-sorting
|
||||
define uniq
|
||||
|
@ -67,8 +67,12 @@ their dependencies.
|
||||
Modules outside of RIOTBASE {#modules-outside-of-riotbase}
|
||||
===========================
|
||||
Modules can be defined outside `RIOTBASE`. In addition to add it to `USEMODULE`
|
||||
the user needs to add the path to the module to `EXTERNAL_MODULE_DIRS` and add
|
||||
the include path to the API definitions to `INCLUDES`.
|
||||
the user needs to add the module path to `EXTERNAL_MODULE_DIRS`.
|
||||
|
||||
The external module can optionally define the following files:
|
||||
* `Makefile.include` file to set global build configuration like `CFLAGS` or add
|
||||
API headers include paths to the `USEMODULE_INCLUDES` variable.
|
||||
* `Makefile.dep` file to set module dependencies
|
||||
|
||||
Pseudomodules {#pseudomodules}
|
||||
=============
|
||||
|
Loading…
Reference in New Issue
Block a user