diff options
-rw-r--r-- | src/arch/arduino-nano/Makefile.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/arch/arduino-nano/Makefile.inc b/src/arch/arduino-nano/Makefile.inc index 1455105..30aa846 100644 --- a/src/arch/arduino-nano/Makefile.inc +++ b/src/arch/arduino-nano/Makefile.inc @@ -141,7 +141,7 @@ endif COMMON_FLAGS += -DBAUD=${uart_baud}UL -OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o} +OBJECTS = ${SO_TARGETS:.a=.so} ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o} %.o : %.cc | include/config.h ${QUIET}${CXX} ${INCLUDES} ${COMMON_FLAGS} ${CXXFLAGS} -c -o $@ ${@:.o=.cc} @@ -149,6 +149,9 @@ OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o} %.o : %.c | include/config.h ${QUIET}${CC} ${INCLUDES} ${COMMON_FLAGS} ${CFLAGS} -c -o $@ ${@:.o=.c} +%.so : %.a | include/config.h + ${QUIET}${CC} ${COMMON_FLAGS} -o $@ -Wl,--whole-archive ${@:.so=.a} -Wl,--no-whole-archive + build/system.elf: ${OBJECTS} ${QUIET}mkdir -p build ${QUIET}${CXX} ${COMMON_FLAGS} ${CXXFLAGS} -Wl,--gc-sections -o $@ ${OBJECTS} |