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

17 lines
516 B
Makefile
Raw 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
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)
CLEAN_OBJS += $(NANO_LIB_OBJS)
$(NANO_LIB_OBJS): %.o: %.c $(HEADERS)
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<