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.
|
2022-02-01 11:22:06 +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))
|
|
|
|
|
2023-04-21 09:33:04 +02:00
|
|
|
# pull Makefile.dep of each sys modules if they exist
|
|
|
|
-include $(sort $(USEMODULE:%=$(RIOTBASE)/sys/%/Makefile.dep))
|
|
|
|
|
2019-12-07 19:42:48 +01:00
|
|
|
# pull dependencies from packages
|
2022-01-22 21:48:28 +01:00
|
|
|
-include $(PKG_PATHS:%=%Makefile.dep)
|
2019-12-07 19:42:48 +01:00
|
|
|
|
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
|
|
|
|
|
2023-06-06 17:30:51 +02:00
|
|
|
ifneq (,$(filter pmp_noexec_ram,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += periph_pmp
|
|
|
|
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)))
|
2021-11-11 19:59:26 +01:00
|
|
|
USEMODULE += prng_musl_lcg
|
2017-05-16 10:39:41 +02:00
|
|
|
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
|
|
|
|
|
2022-09-23 11:39:21 +02:00
|
|
|
ifneq (,$(filter lwext%_vfs,$(USEMODULE)))
|
|
|
|
USEPKG += lwext4
|
|
|
|
USEMODULE += vfs
|
|
|
|
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
|
|
|
|
|
2022-02-01 22:33:35 +01:00
|
|
|
ifneq (,$(filter flashdb_%,$(USEMODULE)))
|
|
|
|
USEPKG += flashdb
|
|
|
|
endif
|
|
|
|
|
2022-12-05 17:30:51 +01:00
|
|
|
ifneq (,$(filter tinyusb_%, $(USEMODULE)))
|
|
|
|
USEPKG += tinyusb
|
|
|
|
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
|
|
|
|
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
|