Windows build fixes
[apps/agl-service-can-low-level.git] / examples / using_double_on_avr / Makefile
1 # Include the nanopb provided Makefile rules
2 include ../../extra/nanopb.mk
3
4 # Compiler flags to enable all warnings & debug info
5 CFLAGS = -Wall -Werror -g -O0
6 CFLAGS += -I$(NANOPB_DIR)
7
8 all: run_tests
9
10 clean:
11         rm -f test_conversions encode_double decode_double doubleproto.pb.c doubleproto.pb.h
12
13 test_conversions: test_conversions.c double_conversion.c
14         $(CC) $(CFLAGS) -o $@ $^
15
16 %: %.c double_conversion.c doubleproto.pb.c
17         $(CC) $(CFLAGS) -o $@ $^ $(NANOPB_CORE)
18
19 run_tests: test_conversions encode_double decode_double
20         ./test_conversions
21         ./encode_double | ./decode_double
22