Home | History | Annotate | Download | only in using_double_on_avr
      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 .SUFFIXES:
     11 
     12 clean:
     13 	rm -f test_conversions encode_double decode_double doubleproto.pb.c doubleproto.pb.h
     14 
     15 test_conversions: test_conversions.c double_conversion.c
     16 	$(CC) $(CFLAGS) -o $@ $^
     17 
     18 %: %.c double_conversion.c doubleproto.pb.c
     19 	$(CC) $(CFLAGS) -o $@ $^ $(NANOPB_CORE)
     20 
     21 run_tests: test_conversions encode_double decode_double
     22 	./test_conversions
     23 	./encode_double | ./decode_double
     24     
     25