MNRS-BM-BSP/newlib-nano/lib.mk

22 lines
647 B
Makefile
Raw Permalink Normal View History

2024-01-16 12:26:47 +01:00
#CFLAGS+=--specs=nano.specs
#LDFLAGS+=--specs=nano.specs
#CFLAGS+=--specs=rv32imac/ilp32/nano.specs
#LDFLAGS+=--specs=rv32imac/ilp32/nano.specs
NANO_LIB_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
NANO_LIB_SYMS := read write syscalls
2024-03-02 12:19:13 +01:00
#NANO_LIB_SRCS := $(foreach s,$(NANO_LIB_SYMS),$(s).c)
2024-01-16 12:26:47 +01:00
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)
2024-03-02 12:19:13 +01:00
NANO_LIB := libnano_cust.a
2024-01-16 12:26:47 +01:00
CLEAN_OBJS += $(NANO_LIB_OBJS)
$(NANO_LIB_OBJS): %.o: %.c $(HEADERS)
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
2024-03-02 12:19:13 +01:00
$(NANO_LIB): $(NANO_LIB_OBJS)
$(AR) rcs $@ $^