aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/nanopb/examples/using_double_on_avr/Makefile
blob: 874a64bdc981c09bd53459ca8d89eb8171f6b212 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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