2019-11-18 15:51:44 +01:00
|
|
|
# include board specific application dependencies
|
|
|
|
-include $(APPDIR)/Makefile.board.dep
|
2021-01-25 09:06:54 +01:00
|
|
|
-include $(APPDIR)/Makefile.$(TOOLCHAIN).dep
|
2019-11-18 15:51:44 +01:00
|
|
|
|
2016-09-29 15:15:21 +02:00
|
|
|
# include board dependencies
|
2020-04-14 15:23:23 +02:00
|
|
|
-include $(BOARDDIR)/Makefile.dep
|
2015-09-10 09:15:27 +02:00
|
|
|
|
2018-09-11 14:13:08 +02:00
|
|
|
# include cpu dependencies
|
|
|
|
-include $(RIOTCPU)/$(CPU)/Makefile.dep
|
2019-06-11 14:16:10 +02:00
|
|
|
|
2018-04-19 16:05:43 +02:00
|
|
|
# include external modules dependencies
|
|
|
|
# processed before RIOT ones to be evaluated before the 'default' rules.
|
2021-02-26 18:41:51 +01:00
|
|
|
-include $(EXTERNAL_MODULE_PATHS:%=%/Makefile.dep)
|
2018-04-19 16:05:43 +02:00
|
|
|
|
2018-03-12 21:48:24 +01:00
|
|
|
# pull dependencies from sys and drivers
|
|
|
|
include $(RIOTBASE)/sys/Makefile.dep
|
2015-10-21 15:11:05 +02:00
|
|
|
include $(RIOTBASE)/drivers/Makefile.dep
|
2016-02-07 19:04:10 +01:00
|
|
|
|
2020-06-26 21:54:02 +02:00
|
|
|
# pull Makefile.dep of each driver modules if they exist
|
|
|
|
-include $(sort $(USEMODULE:%=$(RIOTBASE)/drivers/%/Makefile.dep))
|
|
|
|
|
2019-12-07 19:42:48 +01:00
|
|
|
# pull dependencies from packages
|
|
|
|
-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.dep)
|
|
|
|
|
2020-02-18 16:41:36 +01:00
|
|
|
ifneq (,$(filter mpu_stack_guard,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += cortexm_mpu
|
|
|
|
endif
|
|
|
|
|
2020-02-16 18:13:00 +01:00
|
|
|
ifneq (,$(filter mpu_noexec_ram,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += cortexm_mpu
|
2020-02-18 16:41:36 +01:00
|
|
|
endif
|
|
|
|
|
2015-11-15 20:59:19 +01:00
|
|
|
ifneq (,$(filter lwip_%,$(USEMODULE)))
|
2015-08-03 22:30:46 +02:00
|
|
|
USEPKG += lwip
|
2015-11-15 20:58:39 +01:00
|
|
|
endif
|
|
|
|
|
2014-07-22 20:24:45 +02:00
|
|
|
ifneq (,$(filter libfixmath-unittests,$(USEMODULE)))
|
2015-03-17 16:28:01 +01:00
|
|
|
USEPKG += libfixmath
|
2016-05-12 16:39:03 +02:00
|
|
|
USEMODULE += libfixmath
|
2014-07-22 20:24:45 +02:00
|
|
|
endif
|
2014-09-29 18:09:18 +02:00
|
|
|
|
2015-11-27 13:42:40 +01:00
|
|
|
ifneq (,$(filter random,$(USEMODULE)))
|
2020-09-25 17:33:03 +02:00
|
|
|
# select default prng if no prng is selected
|
2017-05-16 10:39:41 +02:00
|
|
|
ifeq (,$(filter prng_%,$(USEMODULE)))
|
|
|
|
USEMODULE += prng_tinymt32
|
|
|
|
endif
|
2017-10-22 13:54:43 +02:00
|
|
|
endif
|
|
|
|
|
2016-07-11 09:54:03 +02:00
|
|
|
ifneq (,$(filter spiffs,$(USEMODULE)))
|
2017-05-16 10:39:41 +02:00
|
|
|
USEPKG += spiffs
|
|
|
|
USEMODULE += vfs
|
|
|
|
USEMODULE += spiffs_fs
|
|
|
|
USEMODULE += mtd
|
2016-07-11 09:54:03 +02:00
|
|
|
endif
|
2020-06-30 16:19:03 +02:00
|
|
|
|
2017-12-19 12:22:02 +01:00
|
|
|
ifneq (,$(filter littlefs,$(USEMODULE)))
|
|
|
|
USEPKG += littlefs
|
|
|
|
USEMODULE += vfs
|
|
|
|
USEMODULE += littlefs_fs
|
|
|
|
USEMODULE += mtd
|
|
|
|
endif
|
2016-07-11 09:54:03 +02:00
|
|
|
|
2020-06-30 16:19:03 +02:00
|
|
|
ifneq (,$(filter littlefs2,$(USEMODULE)))
|
|
|
|
USEPKG += littlefs2
|
|
|
|
USEMODULE += vfs
|
|
|
|
USEMODULE += littlefs2_fs
|
|
|
|
USEMODULE += mtd
|
|
|
|
endif
|
|
|
|
|
2017-05-12 17:46:09 +02:00
|
|
|
ifneq (,$(filter fatfs_vfs,$(USEMODULE)))
|
2017-07-05 14:54:42 +02:00
|
|
|
USEPKG += fatfs
|
|
|
|
USEMODULE += vfs
|
2017-05-12 17:46:09 +02:00
|
|
|
endif
|
|
|
|
|
2019-07-05 13:50:20 +02:00
|
|
|
ifneq (,$(filter nimble_%,$(USEMODULE)))
|
|
|
|
USEPKG += nimble
|
|
|
|
endif
|
|
|
|
|
2018-04-20 11:12:33 +02:00
|
|
|
ifneq (,$(filter tlsf-malloc,$(USEMODULE)))
|
|
|
|
USEPKG += tlsf
|
|
|
|
endif
|
|
|
|
|
2019-06-05 10:54:25 +02:00
|
|
|
ifneq (,$(filter tinydtls_sock_dtls, $(USEMODULE)))
|
|
|
|
USEPKG += tinydtls
|
|
|
|
endif
|
|
|
|
|
2017-09-09 12:41:15 +02:00
|
|
|
# always select gpio (until explicit dependencies are sorted out)
|
|
|
|
FEATURES_OPTIONAL += periph_gpio
|
|
|
|
|
2021-01-27 14:16:17 +01:00
|
|
|
# always select power management unless building the bootloader
|
|
|
|
# pm is not needed by the bootloader and omitting it saves some ROM
|
|
|
|
ifneq (1, $(RIOTBOOT_BUILD))
|
|
|
|
FEATURES_OPTIONAL += periph_pm
|
|
|
|
endif
|
2017-10-18 23:04:30 +02:00
|
|
|
|
2018-05-04 15:44:29 +02:00
|
|
|
# always select provided architecture features
|
|
|
|
FEATURES_REQUIRED += $(filter arch_%,$(FEATURES_PROVIDED))
|
2017-09-09 01:10:59 +02:00
|
|
|
|
2020-06-10 13:30:56 +02:00
|
|
|
# always select CPU core features
|
|
|
|
FEATURES_REQUIRED += $(filter cpu_core_%,$(FEATURES_PROVIDED))
|
|
|
|
|
2020-06-04 21:52:57 +02:00
|
|
|
# don't use idle thread if architecture has needed support
|
|
|
|
FEATURES_OPTIONAL += no_idle_thread
|
|
|
|
|
2020-07-12 22:53:30 +02:00
|
|
|
ifneq (,$(filter libstdcpp,$(FEATURES_USED)))
|
|
|
|
# Also use C++ if libstdc++ is used
|
2021-06-25 11:48:59 +02:00
|
|
|
USEMODULE += cpp
|
|
|
|
USEMODULE += libstdcpp
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter cpp,$(FEATURES_USED)))
|
|
|
|
# Also use C++ if libstdc++ is used
|
|
|
|
USEMODULE += cpp
|
2020-07-12 22:53:30 +02:00
|
|
|
endif
|
|
|
|
|
2020-03-11 09:59:22 +01:00
|
|
|
ifneq (,$(filter test_utils_interactive_sync,$(USEMODULE)))
|
|
|
|
ifneq (,$(filter shell,$(USEMODULE)))
|
|
|
|
DEFAULT_MODULE += test_utils_interactive_sync_shell
|
|
|
|
endif
|
|
|
|
endif
|