diff --git a/cpu/native/Makefile.dep b/cpu/native/Makefile.dep index 2d13078cba..19ddb2ea39 100644 --- a/cpu/native/Makefile.dep +++ b/cpu/native/Makefile.dep @@ -21,10 +21,6 @@ ifneq (,$(filter periph_rtc,$(USEMODULE))) USEMODULE += xtimer endif -ifneq (,$(filter can_linux,$(USEMODULE))) - LINKFLAGS += -lsocketcan -endif - USEMODULE += periph # UART is needed by startup.c diff --git a/cpu/native/Makefile.include b/cpu/native/Makefile.include index 641cb6fc7e..a61d7d7c5e 100644 --- a/cpu/native/Makefile.include +++ b/cpu/native/Makefile.include @@ -5,4 +5,8 @@ ifeq ($(BUILDOSXNATIVE),1) NATIVEINCLUDES += -I$(RIOTCPU)/native/osx-libc-extra endif +ifneq (,$(filter can_linux,$(USEMODULE))) + LINKFLAGS += -lsocketcan +endif + TOOLCHAINS_SUPPORTED = gnu llvm afl