Makefile 412 B

1234567891011121314151617181920
  1. # Include the nanopb provided Makefile rules
  2. include ../../extra/nanopb.mk
  3. # Compiler flags to enable all warnings & debug info
  4. CFLAGS = -ansi -Wall -Werror -g -O0
  5. CFLAGS += -I$(NANOPB_DIR)
  6. all: encode decode
  7. ./encode 1 | ./decode
  8. ./encode 2 | ./decode
  9. ./encode 3 | ./decode
  10. .SUFFIXES:
  11. clean:
  12. rm -f encode unionproto.pb.h unionproto.pb.c
  13. %: %.c unionproto.pb.c
  14. $(CC) $(CFLAGS) -o $@ $^ $(NANOPB_CORE)