Add nanopb (https://github.com/metormote/nanopb) and generate example protocol buffer for beerduino (https://github.com/ilyevsky/beerduino)

This commit is contained in:
2015-03-12 15:30:51 +00:00
parent 6f5a1d7f71
commit 5ec12f2438
6 changed files with 59 additions and 208 deletions

View File

@@ -1,12 +1,16 @@
.PHONY = clean
PROTO_DIR = proto
GOOGLE_PROTOBUF_INCLUDES = protobuf\src
PROTO_INCLUDES = -I$(PROTO_DIR) -I$(GOOGLE_PROTOBUF_INCLUDES)
GOOGLE_PROTOBUF_INCLUDES = protobuf/src
NANOPB_DIR = nanopb/generator/proto
PROTO_INCLUDES = -I$(PROTO_DIR) -I$(GOOGLE_PROTOBUF_INCLUDES) -I$(NANOPB_DIR)
all: addressbook_pb2.py
all: nanopb_pb2.py beerduino_pb2.py
%_pb2.py: $(PROTO_DIR)\%.proto
nanopb_pb2.py: $(NANOPB_DIR)/nanopb.proto
protoc --python_out=. $(PROTO_INCLUDES) $<
%_pb2.py: $(PROTO_DIR)/%.proto
protoc --python_out=. $(PROTO_INCLUDES) $<
clean: