diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2016-08-29 16:13:10 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2016-08-29 16:13:10 +0200 |
commit | d9ab0ed7af0ca5d962264866b06a9c0aa89d05d3 (patch) | |
tree | b9b3edb5b42a29aaaad5ccfb9eda0bb0c2465529 /tinyprintf/Makefile | |
parent | ef4a7bbe3a818e5166548d1ba5edee7713c66214 (diff) | |
download | stm32f103-playground-d9ab0ed7af0ca5d962264866b06a9c0aa89d05d3.tar.gz stm32f103-playground-d9ab0ed7af0ca5d962264866b06a9c0aa89d05d3.tar.bz2 stm32f103-playground-d9ab0ed7af0ca5d962264866b06a9c0aa89d05d3.tar.xz stm32f103-playground-d9ab0ed7af0ca5d962264866b06a9c0aa89d05d3.zip |
o Adding missing tinyprintf
Diffstat (limited to 'tinyprintf/Makefile')
-rw-r--r-- | tinyprintf/Makefile | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tinyprintf/Makefile b/tinyprintf/Makefile new file mode 100644 index 0000000..43adc13 --- /dev/null +++ b/tinyprintf/Makefile @@ -0,0 +1,39 @@ + +CPPFLAGS+=-I. +CFLAGS+=-Wall -W -Wextra -O3 -g +# RUNNER:=valgrind + +.PHONY: all test tests compiletests runtests clean + +all: tests + +test tests: compiletests runtests + +runtests: test/printf test/sprintf + set -x ; for prg in $^ ; do $(RUNNER) $$prg || exit $$? ; done + +compiletests: + $(COMPILE.c) \ + -DTINYPRINTF_DEFINE_TFP_PRINTF=0 \ + -DTINYPRINTF_DEFINE_TFP_SPRINTF=0 \ + -DTINYPRINTF_OVERRIDE_LIBC=0 \ + -o tinyprintf_minimal.o tinyprintf.c + $(COMPILE.c) \ + -DTINYPRINTF_DEFINE_TFP_PRINTF=1 \ + -DTINYPRINTF_DEFINE_TFP_SPRINTF=0 \ + -DTINYPRINTF_OVERRIDE_LIBC=0 \ + -o tinyprintf_only_tfp_printf.o tinyprintf.c + $(COMPILE.c) \ + -DTINYPRINTF_DEFINE_TFP_PRINTF=0 \ + -DTINYPRINTF_DEFINE_TFP_SPRINTF=1 \ + -DTINYPRINTF_OVERRIDE_LIBC=0 \ + -o tinyprintf_only_tfp_sprintf.o tinyprintf.c + +test/printf: test/printf.o tinyprintf.o + $(LINK.c) -o $@ $^ + +test/sprintf: test/sprintf.o tinyprintf.o + $(LINK.c) -o $@ $^ + +clean: + $(RM) *.o test/*.o *~ test/*~ test/printf test/sprintf |