diff --git a/sys/newlib/Makefile.include b/makefiles/libc/newlib.mk similarity index 97% rename from sys/newlib/Makefile.include rename to makefiles/libc/newlib.mk index 2e1c6b8cf9..4d8a784a1e 100644 --- a/sys/newlib/Makefile.include +++ b/makefiles/libc/newlib.mk @@ -1,5 +1,3 @@ -UNDEF := $(BINDIR)/newlib_syscalls_default/syscalls.o $(UNDEF) - ifneq (,$(filter newlib_nano,$(USEMODULE))) # Test if nano.specs is available ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null /dev/null))/../$(TARGET_ARCH)/include)) endif ifeq ($(TOOLCHAIN),llvm) diff --git a/sys/Makefile.include b/sys/Makefile.include index 680f655b17..092bb68792 100644 --- a/sys/Makefile.include +++ b/sys/Makefile.include @@ -65,8 +65,12 @@ ifneq (,$(filter log_%,$(USEMODULE))) include $(RIOTBASE)/sys/log/Makefile.include endif +ifneq (,$(filter newlib,$(USEMODULE))) + include $(RIOTMAKE)/libc/newlib.mk +endif + ifneq (,$(filter newlib_syscalls_default,$(USEMODULE))) - include $(RIOTBASE)/sys/newlib/Makefile.include + include $(RIOTBASE)/sys/newlib_syscalls_default/Makefile.include endif ifneq (,$(filter arduino,$(USEMODULE))) diff --git a/sys/newlib/Makefile b/sys/newlib_syscalls_default/Makefile similarity index 50% rename from sys/newlib/Makefile rename to sys/newlib_syscalls_default/Makefile index 586bc62601..48422e909a 100644 --- a/sys/newlib/Makefile +++ b/sys/newlib_syscalls_default/Makefile @@ -1,3 +1 @@ -MODULE = newlib_syscalls_default - include $(RIOTBASE)/Makefile.base diff --git a/sys/newlib_syscalls_default/Makefile.include b/sys/newlib_syscalls_default/Makefile.include new file mode 100644 index 0000000000..419a6feddc --- /dev/null +++ b/sys/newlib_syscalls_default/Makefile.include @@ -0,0 +1 @@ +UNDEF += $(BINDIR)/newlib_syscalls_default/syscalls.o diff --git a/sys/newlib/syscalls.c b/sys/newlib_syscalls_default/syscalls.c similarity index 100% rename from sys/newlib/syscalls.c rename to sys/newlib_syscalls_default/syscalls.c