X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=inline;f=libs%2Fnanopb%2Fexamples%2Fusing_double_on_avr%2FMakefile;fp=libs%2Fnanopb%2Fexamples%2Fusing_double_on_avr%2FMakefile;h=874a64bdc981c09bd53459ca8d89eb8171f6b212;hb=32e25cbca210a359b09768537b6f443fe90a3070;hp=0000000000000000000000000000000000000000;hpb=76c43dec62b2e21cd6446360c00d4fe6b437533f;p=apps%2Fagl-service-can-low-level.git diff --git a/libs/nanopb/examples/using_double_on_avr/Makefile b/libs/nanopb/examples/using_double_on_avr/Makefile new file mode 100644 index 00000000..874a64bd --- /dev/null +++ b/libs/nanopb/examples/using_double_on_avr/Makefile @@ -0,0 +1,24 @@ +# Include the nanopb provided Makefile rules +include ../../extra/nanopb.mk + +# Compiler flags to enable all warnings & debug info +CFLAGS = -Wall -Werror -g -O0 +CFLAGS += -I$(NANOPB_DIR) + +all: run_tests + +.SUFFIXES: + +clean: + rm -f test_conversions encode_double decode_double doubleproto.pb.c doubleproto.pb.h + +test_conversions: test_conversions.c double_conversion.c + $(CC) $(CFLAGS) -o $@ $^ + +%: %.c double_conversion.c doubleproto.pb.c + $(CC) $(CFLAGS) -o $@ $^ $(NANOPB_CORE) + +run_tests: test_conversions encode_double decode_double + ./test_conversions + ./encode_double | ./decode_double +