if GRPC
lib_LTLIBRARIES += grpc/libfrrgrpc_pb.la
endif

grpc_libfrrgrpc_pb_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
grpc_libfrrgrpc_pb_la_CPPFLAGS = $(AM_CPPFLAGS) $(GRPC_CXXFLAGS)

if GRPC
nodist_grpc_libfrrgrpc_pb_la_SOURCES = \
	grpc/frr-northbound.pb.cc \
	grpc/frr-northbound.grpc.pb.cc \
	# end
endif

CLEANFILES += \
	grpc/frr-northbound.pb.cc \
	grpc/frr-northbound.pb.h \
	grpc/frr-northbound.grpc.pb.cc \
	grpc/frr-northbound.grpc.pb.h \
	# end

EXTRA_DIST += grpc/frr-northbound.proto

AM_V_PROTOC = $(am__v_PROTOC_$(V))
am__v_PROTOC_ = $(am__v_PROTOC_$(AM_DEFAULT_VERBOSITY))
am__v_PROTOC_0 = @echo "  PROTOC  " $@;
am__v_PROTOC_1 =

SUFFIXES += .pb.h .pb.cc .grpc.pb.cc

grpc/frr-northbound.grpc.pb.h: grpc/frr-northbound.grpc.pb.cc
	@test -f $@ || rm -f $< || true
	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $<
grpc/frr-northbound.pb.h: grpc/frr-northbound.pb.cc
	@test -f $@ || rm -f $< || true
	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) $<

.proto.pb.cc:
	$(AM_V_PROTOC)$(PROTOC) -I$(top_srcdir) --cpp_out=$(top_builddir) $^
.proto.grpc.pb.cc:
	$(AM_V_PROTOC)$(PROTOC) -I$(top_srcdir) --grpc_out=$(top_builddir) --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` $^
