From 113200f9b293c70b306e5dbfbedb97d79ad82384 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:02:46 +0200 Subject: [PATCH] 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