summaryrefslogtreecommitdiff
path: root/src/arch/arduino-nano/Makefile.inc
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-04-29 12:48:58 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-04-29 12:48:58 +0200
commitf8eb76eea9ec9cd8f799ab9b44251c7f3b945206 (patch)
treeefda177e3dfd5e18e210919a84cb2d9a47f20b31 /src/arch/arduino-nano/Makefile.inc
parent15b0ce313f7ea33b29700466a2bfeb0bbeaf2704 (diff)
Makefile: Create build directory if needed
Diffstat (limited to 'src/arch/arduino-nano/Makefile.inc')
-rw-r--r--src/arch/arduino-nano/Makefile.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/arch/arduino-nano/Makefile.inc b/src/arch/arduino-nano/Makefile.inc
index a664a30..5445bc1 100644
--- a/src/arch/arduino-nano/Makefile.inc
+++ b/src/arch/arduino-nano/Makefile.inc
@@ -94,6 +94,7 @@ OBJECTS = ${CXX_TARGETS:.cc=.o} ${C_TARGETS:.c=.o}
${QUIET}${CC} ${INCLUDES} ${COMMON_FLAGS} ${CFLAGS} -c -o $@ ${@:.o=.c}
build/system.elf: ${OBJECTS}
+ ${QUIET}mkdir -p build
${QUIET}${CXX} ${COMMON_FLAGS} ${CXXFLAGS} -Wl,--gc-sections -o $@ ${OBJECTS}
${QUIET}avr-size --format=avr --mcu=${MCU} $@
${QUIET}test $$(avr-size --format=avr --mcu=${MCU} build/system.elf | fgrep Program | grep -o '[0-9.]*%' | cut -d . -f 1) -lt 100