Compile *.pb.o with Automake’s rules
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
@@ -2,22 +2,17 @@ source = userinput.proto hostinput.proto transportinstruction.proto
|
||||
|
||||
PROTOC = protoc
|
||||
AM_CPPFLAGS = $(protobuf_lite_CFLAGS)
|
||||
AM_CXXFLAGS = -g -O2 --std=c++0x -pedantic -Werror -Wall -Wextra -Weffc++ -fno-default-inline -pipe
|
||||
AM_CXXFLAGS = --std=c++0x -pedantic -Werror -Wall -Wextra -fno-default-inline -pipe
|
||||
|
||||
userinput.pb.cc: userinput.proto
|
||||
$(PROTOC) --cpp_out=$(builddir) -I$(srcdir) $<
|
||||
hostinput.pb.cc: hostinput.proto
|
||||
$(PROTOC) --cpp_out=$(builddir) -I$(srcdir) $<
|
||||
transportinstruction.pb.cc: transportinstruction.proto
|
||||
$(PROTOC) --cpp_out=$(builddir) -I$(srcdir) $<
|
||||
SUFFIXES = .proto .pb.cc
|
||||
|
||||
.o.cc:
|
||||
$(CXX) $(CXXFLAGS) -o $@ $<
|
||||
.proto.pb.cc:
|
||||
$(PROTOC) --cpp_out=$(builddir) -I$(srcdir) $<
|
||||
|
||||
noinst_LIBRARIES = libmoshprotos.a
|
||||
|
||||
libmoshprotos_a_SOURCES = userinput.proto hostinput.proto transportinstruction.proto
|
||||
libmoshprotos_a_SOURCES = $(source)
|
||||
nodist_libmoshprotos_a_SOURCES = $(source:.proto=.pb.cc) $(source:.proto=.pb.h)
|
||||
|
||||
libmoshprotos_a_LIBADD = userinput.pb.$(OBJEXT) hostinput.pb.$(OBJEXT) transportinstruction.pb.$(OBJEXT)
|
||||
|
||||
CLEANFILES = userinput.pb.cc hostinput.pb.cc transportinstruction.pb.cc userinput.pb.h hostinput.pb.h transportinstruction.pb.h
|
||||
BUILT_SOURCES = $(source:.proto=.pb.cc)
|
||||
CLEANFILES = $(source:.proto=.pb.cc) $(source:.proto=.pb.h)
|
||||
|
||||
Reference in New Issue
Block a user