altos: Allow applications to override newlib printf selection
authorKeith Packard <keithp@keithp.com>
Fri, 22 Feb 2019 03:28:14 +0000 (19:28 -0800)
committerKeith Packard <keithp@keithp.com>
Fri, 22 Feb 2019 03:40:08 +0000 (19:40 -0800)
Re-defining NEWLIB_PRINTF_CFLAGS will allow applications to select
printf with floating point support if desired.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/Makefile.defs

index 6df0c3f..d52cc70 100644 (file)
@@ -20,10 +20,12 @@ WARN_FLAGS=-Wall -Wextra -Werror -Wcast-align \
 
 OPT=-Os
 
+NEWLIB_PRINTF_CFLAGS =         -DNEWLIB_INTEGER_PRINTF_SCANF
+
 NEWLIB_CFLAGS= \
        -ffreestanding -nostdlib \
-       -DNEWLIB_INTEGER_PRINTF_SCANF \
-       -isystem $(NEWLIB_NANO)/arm-none-eabi/include
+       -isystem $(NEWLIB_NANO)/arm-none-eabi/include \
+       $(NEWLIB_PRINTF_CFLAGS)
 
 AO_CFLAGS=\
        -std=gnu99 \