17 lines
516 B
Makefile
17 lines
516 B
Makefile
#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 $@ $<
|