forked from RIOT-OS/RIOT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.dep
118 lines (93 loc) · 2.78 KB
/
Makefile.dep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# include board specific application dependencies
-include $(APPDIR)/Makefile.board.dep
-include $(APPDIR)/Makefile.$(TOOLCHAIN).dep
# include board dependencies
-include $(BOARDDIR)/Makefile.dep
# include cpu dependencies
-include $(RIOTCPU)/$(CPU)/Makefile.dep
# include external modules dependencies
# processed before RIOT ones to be evaluated before the 'default' rules.
-include $(EXTERNAL_MODULE_PATHS:%=%Makefile.dep)
# pull dependencies from sys and drivers
include $(RIOTBASE)/sys/Makefile.dep
include $(RIOTBASE)/drivers/Makefile.dep
# pull Makefile.dep of each driver modules if they exist
-include $(sort $(USEMODULE:%=$(RIOTBASE)/drivers/%/Makefile.dep))
# pull dependencies from packages
-include $(PKG_PATHS:%=%Makefile.dep)
ifneq (,$(filter mpu_stack_guard,$(USEMODULE)))
FEATURES_REQUIRED += cortexm_mpu
endif
ifneq (,$(filter mpu_noexec_ram,$(USEMODULE)))
FEATURES_REQUIRED += cortexm_mpu
endif
ifneq (,$(filter lwip_%,$(USEMODULE)))
USEPKG += lwip
endif
ifneq (,$(filter libfixmath-unittests,$(USEMODULE)))
USEPKG += libfixmath
USEMODULE += libfixmath
endif
ifneq (,$(filter random,$(USEMODULE)))
# select default prng if no prng is selected
ifeq (,$(filter prng_%,$(USEMODULE)))
USEMODULE += prng_musl_lcg
endif
endif
ifneq (,$(filter spiffs,$(USEMODULE)))
USEPKG += spiffs
USEMODULE += vfs
USEMODULE += spiffs_fs
USEMODULE += mtd
endif
ifneq (,$(filter littlefs,$(USEMODULE)))
USEPKG += littlefs
USEMODULE += vfs
USEMODULE += littlefs_fs
USEMODULE += mtd
endif
ifneq (,$(filter littlefs2,$(USEMODULE)))
USEPKG += littlefs2
USEMODULE += vfs
USEMODULE += littlefs2_fs
USEMODULE += mtd
endif
ifneq (,$(filter fatfs_vfs,$(USEMODULE)))
USEPKG += fatfs
USEMODULE += vfs
endif
ifneq (,$(filter nimble_%,$(USEMODULE)))
USEPKG += nimble
endif
ifneq (,$(filter tlsf-malloc,$(USEMODULE)))
USEPKG += tlsf
endif
ifneq (,$(filter tinydtls_sock_dtls, $(USEMODULE)))
USEPKG += tinydtls
endif
ifneq (,$(filter tinyusb_%, $(USEMODULE)))
USEPKG += tinyusb
endif
# always select gpio (until explicit dependencies are sorted out)
FEATURES_OPTIONAL += periph_gpio
# 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
# don't use idle thread if architecture has needed support
FEATURES_OPTIONAL += no_idle_thread
ifneq (,$(filter libstdcpp,$(FEATURES_USED)))
# Also use C++ if libstdc++ is used
USEMODULE += cpp
USEMODULE += libstdcpp
endif
ifneq (,$(filter cpp,$(FEATURES_USED)))
# Also use C++ if libstdc++ is used
USEMODULE += cpp
endif
ifneq (,$(filter test_utils_interactive_sync,$(USEMODULE)))
ifneq (,$(filter shell,$(USEMODULE)))
DEFAULT_MODULE += test_utils_interactive_sync_shell
endif
endif