Add protobuf definitions

Add protobuf definitions for binaryblob store, and change data types
to the generated class.

Signed-off-by: Kun Yi <kunyi@google.com>
Change-Id: I856a000c4a81c10bbbd1983d51712b4999a4e29e
diff --git a/Makefile.am b/Makefile.am
index 796e385..6d0e426 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,13 +1,30 @@
+PROTOC = protoc
+
+PROTOS_PATH = proto
+vpath %.proto $(PROTOS_PATH)
+
 AM_DEFAULT_SOURCE_EXT = .cpp
+SUFFIXES = .proto .pb.cc
 
 libbinarystoredir = ${libdir}/ipmid-providers
 libbinarystore_LTLIBRARIES = libbinarystore.la
 libbinarystore_la_SOURCES = main.cpp \
 			    handler.cpp \
+			    binaryblob.pb.cc \
 			    binarystore.cpp
+
 libbinarystore_la_LDFLAGS = $(PHOSPHOR_LOGGING_LIBS) \
-			    -version-info 0:0:0 -shared
-libbinarystore_la_CXXFLAGS = $(PHOSPHOR_LOGGING_CFLAGS) \
+			    -version-info 0:0:0 -shared \
+			    -lprotobuf
+
+libbinarystore_la_CXXFLAGS = -I$(srcdir) $(PHOSPHOR_LOGGING_CFLAGS) \
 			     -flto
 
+binaryblob.pb.h binaryblob.pb.cc: $(srcdir)/$(PROTOS_PATH)/binaryblob.proto
+	$(PROTOC) -I$(srcdir)/$(PROTOS_PATH) --cpp_out=. $<
+
+BUILT_SOURCES = binaryblob.pb.h binaryblob.pb.cc
+
 SUBDIRS = . test
+
+ACLOCAL_AMFLAGS = -I m4