From cbca7ca14937f49f34b331d3c919a9dca8ff394a Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:33:04 +0200 Subject: [PATCH 01/36] Makefile.dep: include each sys included module deps if available --- Makefile.dep | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.dep b/Makefile.dep index db56c9c1f0..d8a1074c6d 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -19,6 +19,9 @@ include $(RIOTBASE)/drivers/Makefile.dep # pull Makefile.dep of each driver modules if they exist -include $(sort $(USEMODULE:%=$(RIOTBASE)/drivers/%/Makefile.dep)) +# pull Makefile.dep of each sys modules if they exist +-include $(sort $(USEMODULE:%=$(RIOTBASE)/sys/%/Makefile.dep)) + # pull dependencies from packages -include $(PKG_PATHS:%=%Makefile.dep) From 9d58ff8ca2d2db99b63da1e24ff47c28bd47aed1 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:33:53 +0200 Subject: [PATCH 02/36] sys: cleanup shell dependency resolution --- sys/Makefile.dep | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 09885a792e..0d5f4a44b1 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -349,10 +349,6 @@ ifneq (,$(filter shell_cmds,$(USEMODULE))) USEMODULE += shell endif -ifneq (,$(filter shell,$(USEMODULE))) - include $(RIOTBASE)/sys/shell/Makefile.dep -endif - # Include all stdio_% dependencies after all USEMODULE += stdio_% include $(RIOTBASE)/makefiles/stdio.inc.mk From a554738a0c00e4f60df353490b0ced867b76d952 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:36:54 +0200 Subject: [PATCH 03/36] sys/arduino: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 21 --------------------- sys/arduino/Makefile.dep | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 21 deletions(-) create mode 100644 sys/arduino/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 0d5f4a44b1..971d20c9db 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -1,24 +1,3 @@ -ifneq (,$(filter arduino,$(USEMODULE))) - FEATURES_OPTIONAL += periph_adc - FEATURES_OPTIONAL += periph_i2c - FEATURES_OPTIONAL += periph_spi - FEATURES_REQUIRED += arduino - FEATURES_REQUIRED += cpp - FEATURES_REQUIRED += periph_gpio - FEATURES_REQUIRED += periph_uart - USEMODULE += arduino_sketches - USEMODULE += fmt - USEMODULE += ztimer_usec - USEMODULE += ztimer_msec - ifneq (,$(filter stdio_cdc_acm,$(USEMODULE))) - USEMODULE += arduino_serial_stdio - endif -endif - -ifneq (,$(filter arduino_pwm,$(FEATURES_USED))) - FEATURES_REQUIRED += periph_pwm -endif - # cannot be moved to GNRC's Makefile.dep, as module name neither starts or ends with gnrc ifneq (,$(filter auto_init_gnrc_netif,$(USEMODULE))) USEMODULE += gnrc_netif_init_devs diff --git a/sys/arduino/Makefile.dep b/sys/arduino/Makefile.dep new file mode 100644 index 0000000000..6dea0e1621 --- /dev/null +++ b/sys/arduino/Makefile.dep @@ -0,0 +1,19 @@ +FEATURES_OPTIONAL += periph_adc +FEATURES_OPTIONAL += periph_i2c +FEATURES_OPTIONAL += periph_spi +FEATURES_REQUIRED += arduino +FEATURES_REQUIRED += cpp +FEATURES_REQUIRED += periph_gpio +FEATURES_REQUIRED += periph_uart +USEMODULE += arduino_sketches +USEMODULE += fmt +USEMODULE += ztimer_usec +USEMODULE += ztimer_msec + +ifneq (,$(filter stdio_cdc_acm,$(USEMODULE))) + USEMODULE += arduino_serial_stdio +endif + +ifneq (,$(filter arduino_pwm,$(FEATURES_USED))) + FEATURES_REQUIRED += periph_pwm +endif From f9bc119ac9d0555d4289d0ce7e1ad8361096de75 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:39:34 +0200 Subject: [PATCH 04/36] sys/coding: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 4 ---- sys/coding/Makefile.dep | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 sys/coding/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 971d20c9db..903ea3ee33 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -29,10 +29,6 @@ ifneq (,$(filter auto_init_sock_dns,$(USEMODULE))) endif endif -ifneq (,$(filter coding,$(USEMODULE))) - USEMODULE += bitfield -endif - ifneq (,$(filter congure_%,$(USEMODULE))) USEMODULE += congure endif diff --git a/sys/coding/Makefile.dep b/sys/coding/Makefile.dep new file mode 100644 index 0000000000..ec804edb6f --- /dev/null +++ b/sys/coding/Makefile.dep @@ -0,0 +1 @@ +USEMODULE += bitfield From 384469bc38f71a73a0493926f0439f0b61bd7617 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:40:39 +0200 Subject: [PATCH 05/36] sys/eepreg: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 4 ---- sys/eepreg/Makefile.dep | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 sys/eepreg/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 903ea3ee33..f7bd98dafa 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -65,10 +65,6 @@ ifneq (,$(filter debug_irq_disable,$(USEMODULE))) USEMODULE += fmt endif -ifneq (,$(filter eepreg,$(USEMODULE))) - FEATURES_REQUIRED += periph_eeprom -endif - ifneq (,$(filter fmt_table,$(USEMODULE))) USEMODULE += fmt endif diff --git a/sys/eepreg/Makefile.dep b/sys/eepreg/Makefile.dep new file mode 100644 index 0000000000..5dc182e004 --- /dev/null +++ b/sys/eepreg/Makefile.dep @@ -0,0 +1 @@ +FEATURES_REQUIRED += periph_eeprom From 85c640d415dd59aa8f5ed540d50104e356e159cf Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:41:36 +0200 Subject: [PATCH 06/36] sys/trace: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 5 ----- sys/trace/Makefile.dep | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) create mode 100644 sys/trace/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index f7bd98dafa..86b89e449d 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -96,11 +96,6 @@ ifneq (,$(filter ieee802154_security,$(USEMODULE))) USEMODULE += cipher_modes endif -ifneq (,$(filter trace,$(USEMODULE))) - USEMODULE += ztimer - USEMODULE += ztimer_usec -endif - ifneq (,$(filter shell_lock,$(USEMODULE))) USEMODULE += ztimer_msec endif diff --git a/sys/trace/Makefile.dep b/sys/trace/Makefile.dep new file mode 100644 index 0000000000..d5c7b40f31 --- /dev/null +++ b/sys/trace/Makefile.dep @@ -0,0 +1,2 @@ +USEMODULE += ztimer +USEMODULE += ztimer_usec From 932ad3fc1f9dc004363324c4c54416fc88ee81be Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:42:21 +0200 Subject: [PATCH 07/36] sys/ssp: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 4 ---- sys/ssp/Makefile.dep | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 sys/ssp/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 86b89e449d..5033a266a9 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -100,10 +100,6 @@ ifneq (,$(filter shell_lock,$(USEMODULE))) USEMODULE += ztimer_msec endif -ifneq (,$(filter ssp,$(USEMODULE))) - FEATURES_REQUIRED += ssp -endif - ifneq (,$(filter base64url,$(USEMODULE))) USEMODULE += base64 endif diff --git a/sys/ssp/Makefile.dep b/sys/ssp/Makefile.dep new file mode 100644 index 0000000000..d8922ff5ff --- /dev/null +++ b/sys/ssp/Makefile.dep @@ -0,0 +1 @@ +FEATURES_REQUIRED += ssp From 1070a66ead84da4343051dfda8a35e12a9c54076 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:44:31 +0200 Subject: [PATCH 08/36] sys/trickle: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 5 ----- sys/trickle/Makefile.dep | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) create mode 100644 sys/trickle/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 5033a266a9..67c86388a2 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -185,11 +185,6 @@ ifneq (,$(filter netdev_tap,$(USEMODULE))) USEMODULE += iolist endif -ifneq (,$(filter trickle,$(USEMODULE))) - USEMODULE += random - USEMODULE += ztimer_msec -endif - ifneq (,$(filter eui_provider,$(USEMODULE))) USEMODULE += luid endif diff --git a/sys/trickle/Makefile.dep b/sys/trickle/Makefile.dep new file mode 100644 index 0000000000..11ff6366c8 --- /dev/null +++ b/sys/trickle/Makefile.dep @@ -0,0 +1,2 @@ +USEMODULE += random +USEMODULE += ztimer_msec From 4e3290becee4f11887aa02a3a857b59598cf9c12 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:45:32 +0200 Subject: [PATCH 09/36] sys/od: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 8 ++++---- sys/od/Makefile.dep | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 sys/od/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 67c86388a2..336a58828a 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -213,14 +213,14 @@ ifneq (,$(filter l2util,$(USEMODULE))) USEMODULE += fmt endif -ifneq (,$(filter od,$(USEMODULE))) - USEMODULE += fmt -endif - ifneq (,$(filter od_string,$(USEMODULE))) USEMODULE += od endif +ifneq (,$(filter od,$(USEMODULE))) + USEMODULE += fmt +endif + ifneq (,$(filter netutils,$(USEMODULE))) USEMODULE += ipv6_addr endif diff --git a/sys/od/Makefile.dep b/sys/od/Makefile.dep new file mode 100644 index 0000000000..8e78f49e35 --- /dev/null +++ b/sys/od/Makefile.dep @@ -0,0 +1 @@ +USEMODULE += fmt From 7ce942ab5401fdf2f1b48a5d741b566083e2ac5c Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:47:17 +0200 Subject: [PATCH 10/36] sys/isrpipe: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 4 ---- sys/isrpipe/Makefile.dep | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 sys/isrpipe/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 336a58828a..a5310268c8 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -309,10 +309,6 @@ endif # Include all stdio_% dependencies after all USEMODULE += stdio_% include $(RIOTBASE)/makefiles/stdio.inc.mk -ifneq (,$(filter isrpipe,$(USEMODULE))) - USEMODULE += tsrb -endif - ifneq (,$(filter isrpipe_read_timeout,$(USEMODULE))) USEMODULE += isrpipe USEMODULE += ztimer_usec diff --git a/sys/isrpipe/Makefile.dep b/sys/isrpipe/Makefile.dep new file mode 100644 index 0000000000..11d1afc218 --- /dev/null +++ b/sys/isrpipe/Makefile.dep @@ -0,0 +1 @@ +USEMODULE += tsrb From fb167c7a9cc2e39c2cfe5adbb6c84fd2322147cd Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:49:19 +0200 Subject: [PATCH 11/36] sys/sema*: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 8 -------- sys/sema/Makefile.dep | 1 + sys/sema_inv/Makefile.dep | 1 + 3 files changed, 2 insertions(+), 8 deletions(-) create mode 100644 sys/sema/Makefile.dep create mode 100644 sys/sema_inv/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index a5310268c8..80584cc8bf 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -335,14 +335,6 @@ ifneq (,$(filter posix_inet,$(USEMODULE))) USEMODULE += posix_headers endif -ifneq (,$(filter sema_inv,$(USEMODULE))) - USEMODULE += atomic_utils -endif - -ifneq (,$(filter sema,$(USEMODULE))) - USEMODULE += ztimer -endif - ifneq (,$(filter sema_deprecated,$(USEMODULE))) USEMODULE += sema USEMODULE += ztimer64 diff --git a/sys/sema/Makefile.dep b/sys/sema/Makefile.dep new file mode 100644 index 0000000000..f14829781d --- /dev/null +++ b/sys/sema/Makefile.dep @@ -0,0 +1 @@ +USEMODULE += ztimer diff --git a/sys/sema_inv/Makefile.dep b/sys/sema_inv/Makefile.dep new file mode 100644 index 0000000000..48ec7b4f1f --- /dev/null +++ b/sys/sema_inv/Makefile.dep @@ -0,0 +1 @@ +USEMODULE += atomic_utils From 2b658246b00433baffcae143141f908144441177 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:50:01 +0200 Subject: [PATCH 12/36] sys/luid: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 8 -------- sys/luid/Makefile.dep | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) create mode 100644 sys/luid/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 80584cc8bf..364888b6f1 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -346,10 +346,6 @@ ifneq (,$(filter telnet,$(USEMODULE))) USEMODULE += sock_tcp endif -ifneq (,$(filter luid,$(USEMODULE))) - FEATURES_OPTIONAL += periph_cpuid -endif - ifneq (,$(filter fib,$(USEMODULE))) USEMODULE += universal_address USEMODULE += xtimer @@ -686,10 +682,6 @@ ifneq (,$(filter gcoap_dns,$(USEMODULE))) USEMODULE += sock_util endif -ifneq (,$(filter luid,$(USEMODULE))) - FEATURES_OPTIONAL += periph_cpuid -endif - ifneq (,$(filter nanocoap_dtls,$(USEMODULE))) USEMODULE += sock_dtls USEPKG += tinydtls diff --git a/sys/luid/Makefile.dep b/sys/luid/Makefile.dep new file mode 100644 index 0000000000..dbfc189c79 --- /dev/null +++ b/sys/luid/Makefile.dep @@ -0,0 +1 @@ +FEATURES_OPTIONAL += periph_cpuid From cc27ff217b6fbc569b8cbc36f1bc9e6b605308f4 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:51:35 +0200 Subject: [PATCH 13/36] sys/log_color: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 6 ------ sys/log_color/Makefile.dep | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 sys/log_color/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 364888b6f1..7e4af1d148 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -360,12 +360,6 @@ ifneq (,$(filter log_%,$(USEMODULE))) USEMODULE += log endif -ifneq (,$(filter log_color,$(USEMODULE))) - # log_color fails to compile with -Wformat-nonliteral but this is required - # for the wrapped stdio that pushes the format string into progmem - FEATURES_BLACKLIST += arch_avr8 -endif - ifneq (,$(filter cpp11-compat,$(USEMODULE))) USEMODULE += cpp_new_delete USEMODULE += ztimer64_usec diff --git a/sys/log_color/Makefile.dep b/sys/log_color/Makefile.dep new file mode 100644 index 0000000000..edeb527adc --- /dev/null +++ b/sys/log_color/Makefile.dep @@ -0,0 +1,3 @@ +# log_color fails to compile with -Wformat-nonliteral but this is required +# for the wrapped stdio that pushes the format string into progmem +FEATURES_BLACKLIST += arch_avr8 From 16b2606bac19174c2c11b5a361381de74f4f1d5a Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:52:46 +0200 Subject: [PATCH 14/36] sys/cpp11-compat: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 12 ------------ sys/cpp11-compat/Makefile.dep | 9 +++++++++ 2 files changed, 9 insertions(+), 12 deletions(-) create mode 100644 sys/cpp11-compat/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 7e4af1d148..2737481568 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -360,18 +360,6 @@ ifneq (,$(filter log_%,$(USEMODULE))) USEMODULE += log endif -ifneq (,$(filter cpp11-compat,$(USEMODULE))) - USEMODULE += cpp_new_delete - USEMODULE += ztimer64_usec - USEMODULE += timex - FEATURES_REQUIRED += cpp - FEATURES_REQUIRED += libstdcpp - ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) - # requires 64bit for syscalls - USEMODULE += ztimer64_xtimer_compat - endif -endif - ifneq (,$(filter netstats_%, $(USEMODULE))) USEMODULE += netstats endif diff --git a/sys/cpp11-compat/Makefile.dep b/sys/cpp11-compat/Makefile.dep new file mode 100644 index 0000000000..8cf19a4dc2 --- /dev/null +++ b/sys/cpp11-compat/Makefile.dep @@ -0,0 +1,9 @@ +USEMODULE += cpp_new_delete +USEMODULE += ztimer64_usec +USEMODULE += timex +FEATURES_REQUIRED += cpp +FEATURES_REQUIRED += libstdcpp +ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + # requires 64bit for syscalls + USEMODULE += ztimer64_xtimer_compat +endif From 79207fa17b5e3a7845c850399780a60c9b16a823 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:53:37 +0200 Subject: [PATCH 15/36] sys/schedstatistics: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 5 ----- sys/schedstatistics/Makefile.dep | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) create mode 100644 sys/schedstatistics/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 2737481568..4b6bec73a8 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -378,11 +378,6 @@ ifneq (,$(filter pthread,$(USEMODULE))) endif endif -ifneq (,$(filter schedstatistics,$(USEMODULE))) - USEMODULE += ztimer_usec - USEMODULE += sched_cb -endif - ifneq (,$(filter sched_round_robin,$(USEMODULE))) # this depends on either ztimer_usec or ztimer_msec if neither is used # prior to this msec is preferred diff --git a/sys/schedstatistics/Makefile.dep b/sys/schedstatistics/Makefile.dep new file mode 100644 index 0000000000..8fd5144ee2 --- /dev/null +++ b/sys/schedstatistics/Makefile.dep @@ -0,0 +1,2 @@ +USEMODULE += ztimer_usec +USEMODULE += sched_cb From ab61a0f97820eb0222e4637f7afea0a371117f46 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:54:22 +0200 Subject: [PATCH 16/36] sys/sched_round_robin: move deps resolution in its own Makefile.dep --- sys/Makefile.dep | 9 --------- sys/sched_round_robin/Makefile.dep | 7 +++++++ 2 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 sys/sched_round_robin/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 4b6bec73a8..a19a5fdbd7 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -378,15 +378,6 @@ ifneq (,$(filter pthread,$(USEMODULE))) endif endif -ifneq (,$(filter sched_round_robin,$(USEMODULE))) -# this depends on either ztimer_usec or ztimer_msec if neither is used -# prior to this msec is preferred - ifeq (,$(filter ztimer_usec,$(USEMODULE))$(filter ztimer_msec,$(USEMODULE))) - USEMODULE += ztimer_msec - endif - USEMODULE += sched_runq_callback -endif - ifneq (,$(filter saul_reg,$(USEMODULE))) USEMODULE += saul endif diff --git a/sys/sched_round_robin/Makefile.dep b/sys/sched_round_robin/Makefile.dep new file mode 100644 index 0000000000..9855c70dec --- /dev/null +++ b/sys/sched_round_robin/Makefile.dep @@ -0,0 +1,7 @@ +# this depends on either ztimer_usec or ztimer_msec if neither is used +# prior to this msec is preferred +ifeq (,$(filter ztimer_usec,$(USEMODULE))$(filter ztimer_msec,$(USEMODULE))) + USEMODULE += ztimer_msec +endif + +USEMODULE += sched_runq_callback From 090ccc5d214e07d2c6ddf4efa92c37148e6b2652 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:55:10 +0200 Subject: [PATCH 17/36] sys/saul_reg: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 4 ---- sys/saul_reg/Makefile.dep | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 sys/saul_reg/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index a19a5fdbd7..258b352746 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -378,10 +378,6 @@ ifneq (,$(filter pthread,$(USEMODULE))) endif endif -ifneq (,$(filter saul_reg,$(USEMODULE))) - USEMODULE += saul -endif - ifneq (,$(filter saul_default,$(USEMODULE))) DEFAULT_MODULE += auto_init_saul DEFAULT_MODULE += saul_init_devs diff --git a/sys/saul_reg/Makefile.dep b/sys/saul_reg/Makefile.dep new file mode 100644 index 0000000000..fc8ef3bf58 --- /dev/null +++ b/sys/saul_reg/Makefile.dep @@ -0,0 +1 @@ +USEMODULE += saul From 1c57e7355dcaa79eee5b1601ed7e3b43281436d2 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:56:28 +0200 Subject: [PATCH 18/36] sys/senml: cleanup dependency resolution --- sys/Makefile.dep | 4 ++-- sys/senml/Makefile.dep | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 258b352746..b65283db01 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -385,8 +385,8 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_reg endif -ifneq (,$(filter senml%,$(USEMODULE))) - include $(RIOTBASE)/sys/senml/Makefile.dep +ifneq (,$(filter senml_%,$(USEMODULE))) + USEMODULE += senml endif ifneq (,$(filter phydat,$(USEMODULE))) diff --git a/sys/senml/Makefile.dep b/sys/senml/Makefile.dep index b7766e0464..175f112805 100644 --- a/sys/senml/Makefile.dep +++ b/sys/senml/Makefile.dep @@ -1,5 +1,4 @@ ifneq (,$(filter senml_saul,$(USEMODULE))) - USEMODULE += senml USEMODULE += senml_cbor USEMODULE += senml_phydat USEMODULE += saul_reg @@ -7,10 +6,8 @@ endif ifneq (,$(filter senml_cbor,$(USEMODULE))) USEPKG += nanocbor - USEMODULE += senml endif ifneq (,$(filter senml_phydat,$(USEMODULE))) - USEMODULE += senml USEMODULE += phydat endif From 643c239b27d089bb3003444b63448fb1ea28d7fd Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:57:12 +0200 Subject: [PATCH 19/36] sys/phydat: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 4 ---- sys/phydat/Makefile.dep | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 sys/phydat/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index b65283db01..3dcb2e180c 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -389,10 +389,6 @@ ifneq (,$(filter senml_%,$(USEMODULE))) USEMODULE += senml endif -ifneq (,$(filter phydat,$(USEMODULE))) - USEMODULE += fmt -endif - ifneq (,$(filter pm_layered,$(USEMODULE))) FEATURES_REQUIRED += periph_pm endif diff --git a/sys/phydat/Makefile.dep b/sys/phydat/Makefile.dep new file mode 100644 index 0000000000..8e78f49e35 --- /dev/null +++ b/sys/phydat/Makefile.dep @@ -0,0 +1 @@ +USEMODULE += fmt From 9fb5708efe13e9d9e16f3fbda4d85e2d73740ddc Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 09:57:44 +0200 Subject: [PATCH 20/36] sys/pm_layered: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 4 ---- sys/pm_layered/Makefile.dep | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 sys/pm_layered/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 3dcb2e180c..cae3319f3f 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -389,10 +389,6 @@ ifneq (,$(filter senml_%,$(USEMODULE))) USEMODULE += senml endif -ifneq (,$(filter pm_layered,$(USEMODULE))) - FEATURES_REQUIRED += periph_pm -endif - ifneq (,$(filter evtimer_mbox,$(USEMODULE))) USEMODULE += evtimer USEMODULE += core_mbox diff --git a/sys/pm_layered/Makefile.dep b/sys/pm_layered/Makefile.dep new file mode 100644 index 0000000000..37185c63ae --- /dev/null +++ b/sys/pm_layered/Makefile.dep @@ -0,0 +1 @@ +FEATURES_REQUIRED += periph_pm From 113200f9b293c70b306e5dbfbedb97d79ad82384 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:02:46 +0200 Subject: [PATCH 21/36] sys/can: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 16 +--------------- sys/can/Makefile.dep | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 sys/can/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index cae3319f3f..aba226dbe2 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -394,25 +394,11 @@ ifneq (,$(filter evtimer_mbox,$(USEMODULE))) USEMODULE += core_mbox endif -ifneq (,$(filter can,$(USEMODULE))) - USEMODULE += can_raw - ifneq (,$(filter can_mbox,$(USEMODULE))) - USEMODULE += core_mbox - endif - USEMODULE += memarray -endif - -ifneq (,$(filter can_isotp,$(USEMODULE))) - USEMODULE += ztimer - USEMODULE += ztimer_usec - USEMODULE += gnrc_pktbuf +ifneq (,$(filter can_%,$(USEMODULE))) endif ifneq (,$(filter conn_can,$(USEMODULE))) USEMODULE += can - USEMODULE += can_mbox - USEMODULE += ztimer - USEMODULE += ztimer_usec endif ifneq (,$(filter entropy_source_%,$(USEMODULE))) diff --git a/sys/can/Makefile.dep b/sys/can/Makefile.dep new file mode 100644 index 0000000000..4a87ba3769 --- /dev/null +++ b/sys/can/Makefile.dep @@ -0,0 +1,19 @@ +USEMODULE += can_raw + +ifneq (,$(filter can_isotp,$(USEMODULE))) + USEMODULE += ztimer + USEMODULE += ztimer_usec + USEMODULE += gnrc_pktbuf +endif + +ifneq (,$(filter conn_can,$(USEMODULE))) + USEMODULE += can_mbox + USEMODULE += ztimer + USEMODULE += ztimer_usec +endif + +ifneq (,$(filter can_mbox,$(USEMODULE))) + USEMODULE += core_mbox +endif + +USEMODULE += memarray From 50ed85a2fad066e107f4d4970a7e52b10b5a7bed Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:04:34 +0200 Subject: [PATCH 22/36] sys/entropy_source: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 3 --- sys/entropy_source/Makefile.dep | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 sys/entropy_source/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index aba226dbe2..9357015900 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -403,9 +403,6 @@ endif ifneq (,$(filter entropy_source_%,$(USEMODULE))) USEMODULE += entropy_source - ifneq (,$(filter entropy_source_adc_noise,$(USEMODULE))) - FEATURES_REQUIRED += periph_adc - endif endif ifneq (,$(filter puf_sram,$(USEMODULE))) diff --git a/sys/entropy_source/Makefile.dep b/sys/entropy_source/Makefile.dep new file mode 100644 index 0000000000..72852bdb11 --- /dev/null +++ b/sys/entropy_source/Makefile.dep @@ -0,0 +1,3 @@ +ifneq (,$(filter entropy_source_adc_noise,$(USEMODULE))) + FEATURES_REQUIRED += periph_adc +endif From db19f6f54635fb7b1e39861c181613199176a922 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:05:47 +0200 Subject: [PATCH 23/36] sys/puf_sram: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 6 ------ sys/puf_sram/Makefile.dep | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 sys/puf_sram/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 9357015900..dad7ead251 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -405,12 +405,6 @@ ifneq (,$(filter entropy_source_%,$(USEMODULE))) USEMODULE += entropy_source endif -ifneq (,$(filter puf_sram,$(USEMODULE))) - USEMODULE += hashes - USEMODULE += random - FEATURES_REQUIRED += puf_sram -endif - ifneq (,$(filter random,$(USEMODULE))) DEFAULT_MODULE += auto_init_random USEMODULE += prng diff --git a/sys/puf_sram/Makefile.dep b/sys/puf_sram/Makefile.dep new file mode 100644 index 0000000000..081fbf0c31 --- /dev/null +++ b/sys/puf_sram/Makefile.dep @@ -0,0 +1,3 @@ +USEMODULE += hashes +USEMODULE += random +FEATURES_REQUIRED += puf_sram From c8d4256c849373120995aeee8576ce6e4840e3d2 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:06:54 +0200 Subject: [PATCH 24/36] sys/random: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 34 ---------------------------------- sys/random/Makefile.dep | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 34 deletions(-) create mode 100644 sys/random/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index dad7ead251..4e20e9241b 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -405,40 +405,6 @@ ifneq (,$(filter entropy_source_%,$(USEMODULE))) USEMODULE += entropy_source endif -ifneq (,$(filter random,$(USEMODULE))) - DEFAULT_MODULE += auto_init_random - USEMODULE += prng - - ifneq (,$(filter prng_fortuna,$(USEMODULE))) - USEMODULE += fortuna - USEMODULE += hashes - USEMODULE += crypto - ifneq (,$(filter fortuna_reseed,$(USEMODULE))) - USEMODULE += atomic_utils - USEMODULE += xtimer - endif - endif - - ifneq (,$(filter prng_tinymt32,$(USEMODULE))) - USEMODULE += tinymt32 - endif - - ifneq (,$(filter prng_sha%prng,$(USEMODULE))) - USEMODULE += prng_shaxprng - USEMODULE += hashes - endif - - ifneq (,$(filter prng_hwrng,$(USEMODULE))) - FEATURES_REQUIRED += periph_hwrng - endif - - ifeq (,$(filter puf_sram,$(USEMODULE))) - FEATURES_OPTIONAL += periph_hwrng - endif - - USEMODULE += luid -endif - ifneq (,$(filter hashes,$(USEMODULE))) USEMODULE += crypto endif diff --git a/sys/random/Makefile.dep b/sys/random/Makefile.dep new file mode 100644 index 0000000000..dcb5b0e9ad --- /dev/null +++ b/sys/random/Makefile.dep @@ -0,0 +1,31 @@ +DEFAULT_MODULE += auto_init_random +USEMODULE += prng + +ifneq (,$(filter prng_fortuna,$(USEMODULE))) + USEMODULE += fortuna + USEMODULE += hashes + USEMODULE += crypto + ifneq (,$(filter fortuna_reseed,$(USEMODULE))) + USEMODULE += atomic_utils + USEMODULE += xtimer + endif +endif + +ifneq (,$(filter prng_tinymt32,$(USEMODULE))) + USEMODULE += tinymt32 +endif + +ifneq (,$(filter prng_sha%prng,$(USEMODULE))) + USEMODULE += prng_shaxprng + USEMODULE += hashes +endif + +ifneq (,$(filter prng_hwrng,$(USEMODULE))) + FEATURES_REQUIRED += periph_hwrng +endif + +ifeq (,$(filter puf_sram,$(USEMODULE))) + FEATURES_OPTIONAL += periph_hwrng +endif + +USEMODULE += luid From c1640074255af1161727f24b791dd880b85f3629 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:09:08 +0200 Subject: [PATCH 25/36] sys/vfs*: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 12 ------------ sys/vfs/Makefile.dep | 9 +++++++++ sys/vfs_util/Makefile.dep | 1 + 3 files changed, 10 insertions(+), 12 deletions(-) create mode 100644 sys/vfs/Makefile.dep create mode 100644 sys/vfs_util/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 4e20e9241b..259e867611 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -439,18 +439,6 @@ endif ifneq (,$(filter vfs_default,$(USEMODULE))) USEMODULE += vfs - DEFAULT_MODULE += vfs_auto_mount -endif - -ifneq (,$(filter vfs_util,$(USEMODULE))) - USEMODULE += vfs -endif - -ifneq (,$(filter vfs,$(USEMODULE))) - USEMODULE += posix_headers - ifeq (native, $(BOARD)) - USEMODULE += native_vfs - endif endif ifneq (,$(filter sock_async_event,$(USEMODULE))) diff --git a/sys/vfs/Makefile.dep b/sys/vfs/Makefile.dep new file mode 100644 index 0000000000..2b18ae4751 --- /dev/null +++ b/sys/vfs/Makefile.dep @@ -0,0 +1,9 @@ +USEMODULE += posix_headers + +ifneq (,$(filter vfs_default,$(USEMODULE))) + DEFAULT_MODULE += vfs_auto_mount +endif + +ifeq (native, $(BOARD)) + USEMODULE += native_vfs +endif diff --git a/sys/vfs_util/Makefile.dep b/sys/vfs_util/Makefile.dep new file mode 100644 index 0000000000..bb94d3cfbc --- /dev/null +++ b/sys/vfs_util/Makefile.dep @@ -0,0 +1 @@ +USEMODULE += vfs From 9386e08ecf449338ff6c853684847310d1aa5825 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:10:36 +0200 Subject: [PATCH 26/36] sys/event: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 17 ----------------- sys/event/Makefile.dep | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 17 deletions(-) create mode 100644 sys/event/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 259e867611..76a87bcdc2 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -486,23 +486,6 @@ ifneq (,$(filter event_%,$(USEMODULE))) USEMODULE += event endif -ifneq (,$(filter event_thread_%,$(USEMODULE))) - USEMODULE += event_thread -endif - -ifneq (,$(filter event_timeout_ztimer,$(USEMODULE))) - USEMODULE += ztimer -endif - -ifneq (,$(filter event_timeout,$(USEMODULE))) - USEMODULE += event_timeout_ztimer - USEMODULE += ztimer_usec -endif - -ifneq (,$(filter event,$(USEMODULE))) - USEMODULE += core_thread_flags -endif - ifneq (,$(filter l2filter_%,$(USEMODULE))) USEMODULE += l2filter endif diff --git a/sys/event/Makefile.dep b/sys/event/Makefile.dep new file mode 100644 index 0000000000..0ba5180ad6 --- /dev/null +++ b/sys/event/Makefile.dep @@ -0,0 +1,14 @@ +USEMODULE += core_thread_flags + +ifneq (,$(filter event_thread_%,$(USEMODULE))) + USEMODULE += event_thread +endif + +ifneq (,$(filter event_timeout_ztimer,$(USEMODULE))) + USEMODULE += ztimer +endif + +ifneq (,$(filter event_timeout,$(USEMODULE))) + USEMODULE += event_timeout_ztimer + USEMODULE += ztimer_usec +endif From 8256424480ea878f0915202f3a9059aead757063 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:12:47 +0200 Subject: [PATCH 27/36] sys/benchmark: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 4 ---- sys/benchmark/Makefile.dep | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 sys/benchmark/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 76a87bcdc2..57081a04da 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -590,10 +590,6 @@ ifneq (,$(filter nanocoap_%,$(USEMODULE))) USEMODULE += nanocoap endif -ifneq (,$(filter benchmark,$(USEMODULE))) - USEMODULE += ztimer_usec -endif - ifneq (,$(filter skald_%,$(USEMODULE))) USEMODULE += skald endif diff --git a/sys/benchmark/Makefile.dep b/sys/benchmark/Makefile.dep new file mode 100644 index 0000000000..c2e142790d --- /dev/null +++ b/sys/benchmark/Makefile.dep @@ -0,0 +1 @@ +USEMODULE += ztimer_usec From 1f4adb2775dce26fd91070fb333b788217c0012d Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:15:17 +0200 Subject: [PATCH 28/36] sys/uuid: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 6 ------ sys/uuid/Makefile.dep | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 sys/uuid/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 57081a04da..7419b47d05 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -680,12 +680,6 @@ ifneq (,$(filter usbus_msc,$(USEMODULE))) USEMODULE += mtd_write_page endif -ifneq (,$(filter uuid,$(USEMODULE))) - USEMODULE += hashes - USEMODULE += random - USEMODULE += fmt -endif - ifneq (,$(filter riotboot_flashwrite, $(USEMODULE))) USEMODULE += riotboot_slot FEATURES_REQUIRED += periph_flashpage diff --git a/sys/uuid/Makefile.dep b/sys/uuid/Makefile.dep new file mode 100644 index 0000000000..b7e9dd7ea1 --- /dev/null +++ b/sys/uuid/Makefile.dep @@ -0,0 +1,3 @@ +USEMODULE += hashes +USEMODULE += random +USEMODULE += fmt From d617d864e623dd998dec9816082a2acb62bac61d Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:17:35 +0200 Subject: [PATCH 29/36] sys/riotboot: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 36 +----------------------------------- sys/riotboot/Makefile.dep | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 35 deletions(-) create mode 100644 sys/riotboot/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 7419b47d05..c522b0b69a 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -680,42 +680,8 @@ ifneq (,$(filter usbus_msc,$(USEMODULE))) USEMODULE += mtd_write_page endif -ifneq (,$(filter riotboot_flashwrite, $(USEMODULE))) - USEMODULE += riotboot_slot - FEATURES_REQUIRED += periph_flashpage -endif - -ifneq (,$(filter riotboot_slot, $(USEMODULE))) - USEMODULE += riotboot_hdr -endif - -ifneq (,$(filter riotboot_serial, $(USEMODULE))) - FEATURES_REQUIRED += periph_flashpage - FEATURES_REQUIRED += periph_uart - USEMODULE += riotboot_reset - USEMODULE += checksum -endif - -ifneq (,$(filter riotboot_reset, $(USEMODULE))) +ifneq (,$(filter riotboot_%, $(USEMODULE))) USEMODULE += riotboot - USEMODULE += usb_board_reset -endif - -ifneq (,$(filter riotboot_hdr, $(USEMODULE))) - USEMODULE += checksum - USEMODULE += riotboot -endif - -ifneq (,$(filter riotboot_usb_dfu, $(USEMODULE))) - USEMODULE += usbus_dfu - USEMODULE += riotboot_flashwrite - USEMODULE += ztimer_sec - FEATURES_REQUIRED += no_idle_thread - FEATURES_REQUIRED += periph_pm -endif - -ifneq (,$(filter riotboot_tinyusb_dfu, $(USEMODULE))) - USEPKG += tinyusb endif ifneq (,$(filter irq_handler,$(USEMODULE))) diff --git a/sys/riotboot/Makefile.dep b/sys/riotboot/Makefile.dep new file mode 100644 index 0000000000..bc72834547 --- /dev/null +++ b/sys/riotboot/Makefile.dep @@ -0,0 +1,35 @@ +ifneq (,$(filter riotboot_flashwrite, $(USEMODULE))) + USEMODULE += riotboot_slot + FEATURES_REQUIRED += periph_flashpage +endif + +ifneq (,$(filter riotboot_slot, $(USEMODULE))) + USEMODULE += riotboot_hdr +endif + +ifneq (,$(filter riotboot_serial, $(USEMODULE))) + FEATURES_REQUIRED += periph_flashpage + FEATURES_REQUIRED += periph_uart + USEMODULE += riotboot_reset + USEMODULE += checksum +endif + +ifneq (,$(filter riotboot_reset, $(USEMODULE))) + USEMODULE += usb_board_reset +endif + +ifneq (,$(filter riotboot_hdr, $(USEMODULE))) + USEMODULE += checksum +endif + +ifneq (,$(filter riotboot_usb_dfu, $(USEMODULE))) + USEMODULE += usbus_dfu + USEMODULE += riotboot_flashwrite + USEMODULE += ztimer_sec + FEATURES_REQUIRED += no_idle_thread + FEATURES_REQUIRED += periph_pm +endif + +ifneq (,$(filter riotboot_tinyusb_dfu, $(USEMODULE))) + USEPKG += tinyusb +endif From 9bd7950a1ae67b5d1e90c34421da6cf15e671c91 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:19:37 +0200 Subject: [PATCH 30/36] sys/suit: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 41 ----------------------------------------- sys/suit/Makefile.dep | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 41 deletions(-) create mode 100644 sys/suit/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index c522b0b69a..71094649ca 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -697,47 +697,6 @@ ifneq (,$(filter credman_load, $(USEMODULE))) USEPKG += tiny-asn1 endif -ifneq (,$(filter suit,$(USEMODULE))) - USEPKG += nanocbor - USEPKG += libcose - USEMODULE += uuid - - ifeq (,$(filter libcose_crypt_%,$(USEMODULE))) - USEMODULE += libcose_crypt_c25519 - endif -endif - -ifneq (,$(filter suit_transport_%, $(USEMODULE))) - USEMODULE += suit_transport - USEMODULE += suit_transport_worker -endif - -ifneq (,$(filter suit_transport_coap, $(USEMODULE))) - USEMODULE += nanocoap_sock - USEMODULE += ztimer_msec - USEMODULE += sock_util -endif - -ifneq (,$(filter suit_transport_vfs, $(USEMODULE))) - USEMODULE += vfs_util -endif - -ifneq (,$(filter suit_storage_%, $(USEMODULE))) - USEMODULE += suit_storage -endif - -ifneq (,$(filter suit_storage_flashwrite, $(USEMODULE))) - FEATURES_REQUIRED += riotboot - USEMODULE += riotboot_slot - USEMODULE += riotboot_flashwrite - USEMODULE += riotboot_flashwrite_verify_sha256 -endif - -ifneq (,$(filter suit_storage_vfs,$(USEMODULE))) - USEMODULE += vfs - USEMODULE += mtd -endif - ifneq (,$(filter suit_%,$(USEMODULE))) USEMODULE += suit endif diff --git a/sys/suit/Makefile.dep b/sys/suit/Makefile.dep new file mode 100644 index 0000000000..704549ab33 --- /dev/null +++ b/sys/suit/Makefile.dep @@ -0,0 +1,38 @@ +USEPKG += nanocbor +USEPKG += libcose +USEMODULE += uuid + +ifeq (,$(filter libcose_crypt_%,$(USEMODULE))) + USEMODULE += libcose_crypt_c25519 +endif + +ifneq (,$(filter suit_transport_%, $(USEMODULE))) + USEMODULE += suit_transport + USEMODULE += suit_transport_worker +endif + +ifneq (,$(filter suit_transport_coap, $(USEMODULE))) + USEMODULE += nanocoap_sock + USEMODULE += ztimer_msec + USEMODULE += sock_util +endif + +ifneq (,$(filter suit_transport_vfs, $(USEMODULE))) + USEMODULE += vfs_util +endif + +ifneq (,$(filter suit_storage_%, $(USEMODULE))) + USEMODULE += suit_storage +endif + +ifneq (,$(filter suit_storage_flashwrite, $(USEMODULE))) + FEATURES_REQUIRED += riotboot + USEMODULE += riotboot_slot + USEMODULE += riotboot_flashwrite + USEMODULE += riotboot_flashwrite_verify_sha256 +endif + +ifneq (,$(filter suit_storage_vfs,$(USEMODULE))) + USEMODULE += vfs + USEMODULE += mtd +endif From ff4b2d16805de07f100289a6ecc57ea2bd73a13e Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:22:22 +0200 Subject: [PATCH 31/36] sys/fido2: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 28 +--------------------------- sys/fido2/Makefile.dep | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 27 deletions(-) create mode 100644 sys/fido2/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 71094649ca..e04fb4e391 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -745,33 +745,7 @@ ifneq (,$(filter dbgpin,$(USEMODULE))) FEATURES_REQUIRED += dbgpin endif -ifneq (,$(filter fido2_ctap_%,$(USEMODULE))) - USEMODULE += fido2_ctap_transport - USEMODULE += fido2_ctap - ifneq (,$(filter fido2_ctap_transport_hid,$(USEMODULE))) - USEMODULE += ztimer64_msec - USEMODULE += usbus_hid - DISABLE_MODULE += auto_init_usbus - endif -endif - -ifneq (,$(filter fido2_ctap,$(USEMODULE))) - FEATURES_REQUIRED += periph_flashpage - FEATURES_REQUIRED += periph_flashpage_in_address_space - FEATURES_REQUIRED += periph_gpio_irq - - USEPKG += tiny-asn1 - USEPKG += tinycbor - USEPKG += micro-ecc - - USEMODULE += mtd_flashpage - USEMODULE += mtd_write_page - USEMODULE += ztimer_msec - USEMODULE += event - USEMODULE += event_timeout_ztimer - USEMODULE += cipher_modes - USEMODULE += crypto_aes_256 - USEMODULE += hashes +ifneq (,$(filter fido2_ctap%,$(USEMODULE))) USEMODULE += fido2 endif diff --git a/sys/fido2/Makefile.dep b/sys/fido2/Makefile.dep new file mode 100644 index 0000000000..6164ad235c --- /dev/null +++ b/sys/fido2/Makefile.dep @@ -0,0 +1,29 @@ +ifneq (,$(filter fido2_ctap_%,$(USEMODULE))) + USEMODULE += fido2_ctap_transport + USEMODULE += fido2_ctap + ifneq (,$(filter fido2_ctap_transport_hid,$(USEMODULE))) + USEMODULE += ztimer64_msec + USEMODULE += usbus_hid + DISABLE_MODULE += auto_init_usbus + endif +endif + +ifneq (,$(filter fido2_ctap,$(USEMODULE))) + FEATURES_REQUIRED += periph_flashpage + FEATURES_REQUIRED += periph_flashpage_in_address_space + FEATURES_REQUIRED += periph_gpio_irq + + USEPKG += tiny-asn1 + USEPKG += tinycbor + USEPKG += micro-ecc + + USEMODULE += mtd_flashpage + USEMODULE += mtd_write_page + USEMODULE += ztimer_msec + USEMODULE += event + USEMODULE += event_timeout_ztimer + USEMODULE += cipher_modes + USEMODULE += crypto_aes_256 + USEMODULE += hashes + USEMODULE += fido2 +endif From 6cfafbde6cf7dcb1e4ec58a323c81f993f3da0bb Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:25:29 +0200 Subject: [PATCH 32/36] sys/uri_parser: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 4 ---- sys/uri_parser/Makefile.dep | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 sys/uri_parser/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index e04fb4e391..917fb7969b 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -757,8 +757,4 @@ ifneq (,$(filter auto_init%,$(USEMODULE))) USEMODULE += preprocessor_successor endif -ifneq (,$(filter uri_parser,$(USEMODULE))) - USEMODULE += fmt -endif - include $(RIOTBASE)/sys/test_utils/Makefile.dep diff --git a/sys/uri_parser/Makefile.dep b/sys/uri_parser/Makefile.dep new file mode 100644 index 0000000000..8e78f49e35 --- /dev/null +++ b/sys/uri_parser/Makefile.dep @@ -0,0 +1 @@ +USEMODULE += fmt From bec4c3e0b3509b50367f35384ce001d8113f957f Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:29:02 +0200 Subject: [PATCH 33/36] sys/evtimer: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 4 ---- sys/evtimer/Makefile.dep | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 sys/evtimer/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 917fb7969b..9d6e5d4d3d 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -715,10 +715,6 @@ ifneq (,$(filter ztimer64%,$(USEMODULE))) include $(RIOTBASE)/sys/ztimer64/Makefile.dep endif -ifneq (,$(filter evtimer,$(USEMODULE))) - USEMODULE += ztimer_msec -endif - # handle xtimer's deps. Needs to be done *after* ztimer ifneq (,$(filter xtimer,$(USEMODULE))) include $(RIOTBASE)/sys/xtimer/Makefile.dep diff --git a/sys/evtimer/Makefile.dep b/sys/evtimer/Makefile.dep new file mode 100644 index 0000000000..8ae27e6b64 --- /dev/null +++ b/sys/evtimer/Makefile.dep @@ -0,0 +1,3 @@ +ifneq (,$(filter evtimer,$(USEMODULE))) + USEMODULE += ztimer_msec +endif From d9047a063faee6cd6267cdb40b373d56f6c3cb87 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 12:30:10 +0200 Subject: [PATCH 34/36] sys/ut_process: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 4 ---- sys/ut_process/Makefile.dep | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) create mode 100644 sys/ut_process/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 9d6e5d4d3d..fd49dda60f 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -670,10 +670,6 @@ ifneq (,$(filter usbus_dfu,$(USEMODULE))) USEMODULE += riotboot_slot endif -ifneq (,$(filter ut_process,$(USEMODULE))) - USEMODULE += fmt -endif - ifneq (,$(filter usbus_msc,$(USEMODULE))) USEMODULE += usbus USEMODULE += mtd diff --git a/sys/ut_process/Makefile.dep b/sys/ut_process/Makefile.dep new file mode 100644 index 0000000000..8e78f49e35 --- /dev/null +++ b/sys/ut_process/Makefile.dep @@ -0,0 +1 @@ +USEMODULE += fmt From 03d2792f8b3af6d14c3489083ca52d794329112b Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 12:42:22 +0200 Subject: [PATCH 35/36] sys/congure: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 20 -------------------- sys/congure/Makefile.dep | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 sys/congure/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index fd49dda60f..bce1e73eb6 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -33,26 +33,6 @@ ifneq (,$(filter congure_%,$(USEMODULE))) USEMODULE += congure endif -ifneq (,$(filter congure_abe,$(USEMODULE))) - USEMODULE += congure_reno_methods -endif - -ifneq (,$(filter congure_quic,$(USEMODULE))) - USEMODULE += ztimer_msec -endif - -ifneq (,$(filter congure_test,$(USEMODULE))) - USEMODULE += fmt -endif - -ifneq (,$(filter congure_reno,$(USEMODULE))) - USEMODULE += congure_reno_methods -endif - -ifneq (,$(filter congure_reno_methods,$(USEMODULE))) - USEMODULE += seq -endif - ifneq (,$(filter crc16_fast,$(USEMODULE))) USEMODULE += checksum endif diff --git a/sys/congure/Makefile.dep b/sys/congure/Makefile.dep new file mode 100644 index 0000000000..4dce4661ff --- /dev/null +++ b/sys/congure/Makefile.dep @@ -0,0 +1,19 @@ +ifneq (,$(filter congure_abe,$(USEMODULE))) + USEMODULE += congure_reno_methods +endif + +ifneq (,$(filter congure_quic,$(USEMODULE))) + USEMODULE += ztimer_msec +endif + +ifneq (,$(filter congure_test,$(USEMODULE))) + USEMODULE += fmt +endif + +ifneq (,$(filter congure_reno,$(USEMODULE))) + USEMODULE += congure_reno_methods +endif + +ifneq (,$(filter congure_reno_methods,$(USEMODULE))) + USEMODULE += seq +endif From 1826331529375cf8d2e4eb288f330c9db68a9e81 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 12:46:38 +0200 Subject: [PATCH 36/36] sys/usbus: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 43 ++++---------------------------------- sys/usb/usbus/Makefile.dep | 35 +++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 39 deletions(-) create mode 100644 sys/usb/usbus/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index bce1e73eb6..3edf021097 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -614,46 +614,11 @@ ifneq (,$(filter cord_lc,$(USEMODULE))) USEMODULE += clif endif -ifneq (,$(filter usbus,$(USEMODULE))) - DEFAULT_MODULE += auto_init_usbus - USEMODULE += core_thread_flags - USEMODULE += event - USEMODULE += luid - USEMODULE += fmt - ifeq (,$(filter usbdev_mock,$(USEMODULE))) - FEATURES_REQUIRED += periph_usbdev - endif -endif - -ifneq (,$(filter usbus_cdc_acm,$(USEMODULE))) - USEMODULE += tsrb +ifneq (,$(filter usbus%,$(USEMODULE))) USEMODULE += usbus -endif - -ifneq (,$(filter usbus_cdc_ecm,$(USEMODULE))) - USEMODULE += iolist - USEMODULE += fmt - USEMODULE += usbus - USEMODULE += usbus_urb - USEMODULE += netdev_eth - USEMODULE += luid -endif - -ifneq (,$(filter usbus_hid,$(USEMODULE))) - USEMODULE += isrpipe_read_timeout - USEMODULE += usbus -endif - -ifneq (,$(filter usbus_dfu,$(USEMODULE))) - FEATURES_REQUIRED += riotboot - USEMODULE += usbus - USEMODULE += riotboot_slot -endif - -ifneq (,$(filter usbus_msc,$(USEMODULE))) - USEMODULE += usbus - USEMODULE += mtd - USEMODULE += mtd_write_page + # usbus is not directly in a subdirectory of sys, so we have to include the + # Makefile.dep manually + include $(RIOTBASE)/sys/usb/usbus/Makefile.dep endif ifneq (,$(filter riotboot_%, $(USEMODULE))) diff --git a/sys/usb/usbus/Makefile.dep b/sys/usb/usbus/Makefile.dep new file mode 100644 index 0000000000..a88de4efcb --- /dev/null +++ b/sys/usb/usbus/Makefile.dep @@ -0,0 +1,35 @@ +DEFAULT_MODULE += auto_init_usbus +USEMODULE += core_thread_flags +USEMODULE += event +USEMODULE += luid +USEMODULE += fmt + +ifeq (,$(filter usbdev_mock,$(USEMODULE))) + FEATURES_REQUIRED += periph_usbdev +endif + +ifneq (,$(filter usbus_cdc_acm,$(USEMODULE))) + USEMODULE += tsrb +endif + +ifneq (,$(filter usbus_cdc_ecm,$(USEMODULE))) + USEMODULE += iolist + USEMODULE += fmt + USEMODULE += usbus_urb + USEMODULE += netdev_eth + USEMODULE += luid +endif + +ifneq (,$(filter usbus_hid,$(USEMODULE))) + USEMODULE += isrpipe_read_timeout +endif + +ifneq (,$(filter usbus_dfu,$(USEMODULE))) + FEATURES_REQUIRED += riotboot + USEMODULE += riotboot_slot +endif + +ifneq (,$(filter usbus_msc,$(USEMODULE))) + USEMODULE += mtd + USEMODULE += mtd_write_page +endif