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