From 20007672d290fb1cbf91f5e8565e6db91b4652f3 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sat, 2 Mar 2024 12:19:13 +0100 Subject: [PATCH] adds fixes to build nanolib extensions --- .cproject | 22 +++++++++++++++++----- newlib-nano/lib.mk | 6 ++++++ 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.cproject b/.cproject index d66b3fa..4734f10 100644 --- a/.cproject +++ b/.cproject @@ -14,17 +14,28 @@ - + - - + + + + + + - - + + + + + + + + + @@ -39,4 +50,5 @@ + \ No newline at end of file diff --git a/newlib-nano/lib.mk b/newlib-nano/lib.mk index 986132d..155142e 100644 --- a/newlib-nano/lib.mk +++ b/newlib-nano/lib.mk @@ -6,11 +6,17 @@ NANO_LIB_DIR := $(dir $(lastword $(MAKEFILE_LIST))) NANO_LIB_SYMS := read write syscalls +#NANO_LIB_SRCS := $(foreach s,$(NANO_LIB_SYMS),$(s).c) NANO_LIB_SRCS := $(foreach s,$(NANO_LIB_SYMS),$(NANO_LIB_DIR)/$(s).c) #NANO_LIB_SRCS := $(foreach f,$(LIB_SRCS),$(LIB_DIR)/$(f)) NANO_LIB_OBJS := $(NANO_LIB_SRCS:.c=.o) +NANO_LIB := libnano_cust.a CLEAN_OBJS += $(NANO_LIB_OBJS) $(NANO_LIB_OBJS): %.o: %.c $(HEADERS) $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< + +$(NANO_LIB): $(NANO_LIB_OBJS) + $(AR) rcs $@ $^ + \ No newline at end of file