summaryrefslogtreecommitdiffstats
path: root/qpb
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-09-02 15:15:17 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-09-08 21:30:42 +0200
commit2b2f275ee2ea2c204f27b94d5db62d2a7da87189 (patch)
tree7a6a0ecf79696181151cbb828511f0c86e88f8c0 /qpb
parentbuild: use -export-dynamic (diff)
downloadfrr-2b2f275ee2ea2c204f27b94d5db62d2a7da87189.tar.xz
frr-2b2f275ee2ea2c204f27b94d5db62d2a7da87189.zip
build: clean up protobuf build integration
We were linking all libs and binaries against libprotobuf-c if the option was enabled... that makes no sense at all. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'qpb')
-rw-r--r--qpb/subdir.am39
1 files changed, 12 insertions, 27 deletions
diff --git a/qpb/subdir.am b/qpb/subdir.am
index 0ed50c01b..75a733f8f 100644
--- a/qpb/subdir.am
+++ b/qpb/subdir.am
@@ -2,44 +2,36 @@ if HAVE_PROTOBUF
lib_LTLIBRARIES += qpb/libfrr_pb.la
endif
-qpb_libfrr_pb_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir) -I$(top_builddir)/lib \
- $(Q_PROTOBUF_C_CLIENT_INCLUDES)
+qpb_libfrr_pb_la_CPPFLAGS = $(AM_CPPFLAGS) $(PROTOBUF_C_CFLAGS)
+qpb_libfrr_pb_la_LIBADD = $(PROTOBUF_C_LIBS)
qpb_libfrr_pb_la_LDFLAGS = -version-info 0:0:0
qpb_libfrr_pb_la_SOURCES = \
+ qpb/qpb.c \
+ qpb/qpb_allocator.c \
+ # end
+nodist_qpb_libfrr_pb_la_SOURCES = \
+ qpb/qpb.pb-c.c \
+ # end
+
+noinst_HEADERS += \
qpb/linear_allocator.h \
qpb/qpb.h \
- qpb/qpb.c \
qpb/qpb_allocator.h \
# end
-if HAVE_PROTOBUF
-qpb_libfrr_pb_la_SOURCES += qpb/qpb_allocator.c
-nodist_qpb_libfrr_pb_la_SOURCES = qpb/qpb.pb-c.c
CLEANFILES += \
qpb/qpb.pb-c.c \
qpb/qpb.pb-c.h \
# end
-endif
EXTRA_DIST += qpb/qpb.proto
if HAVE_PROTOBUF
-# Uncomment to use an non-system version of libprotobuf-c.
-#
-# Q_PROTOBUF_C_CLIENT_INCLUDES = -I$(top_srcdir)/third-party/protobuf-c/src
-# Q_PROTOBUF_C_CLIENT_LDOPTS = $(top_builddir)/third-party/protobuf-c/src/libprotobuf-c.la
-
-Q_PROTOBUF_C_CLIENT_INCLUDES=
-Q_PROTOBUF_C_CLIENT_LDOPTS=-lprotobuf-c
-
-Q_PROTOC=protoc
-Q_PROTOC_C=protoc-c
-
# Rules
.proto.pb.h:
- $(Q_PROTOC) -I$(top_srcdir) --cpp_out=$(top_srcdir) $(top_srcdir)/$^
+ $(PROTOC) -I$(top_srcdir) --cpp_out=$(top_srcdir) $(top_srcdir)/$^
AM_V_PROTOC_C = $(am__v_PROTOC_C_$(V))
am__v_PROTOC_C_ = $(am__v_PROTOC_C_$(AM_DEFAULT_VERBOSITY))
@@ -47,15 +39,8 @@ am__v_PROTOC_C_0 = @echo " PROTOC_C" $@;
am__v_PROTOC_C_1 =
.proto.pb-c.c:
- $(AM_V_PROTOC_C)$(Q_PROTOC_C) -I$(top_srcdir) --c_out=$(top_srcdir) $(top_srcdir)/$^
+ $(AM_V_PROTOC_C)$(PROTOC_C) -I$(top_srcdir) --c_out=$(top_srcdir) $(top_srcdir)/$^
.pb-c.c.pb-c.h:
@/bin/true
-#
-# Information about how to link to various libraries.
-#
-Q_FRR_PB_CLIENT_LDOPTS = $(top_srcdir)/qpb/libfrr_pb.la $(Q_PROTOBUF_C_CLIENT_LDOPTS)
-
-Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfrrfpm_pb.la $(Q_FRR_PB_CLIENT_LDOPTS)
-
endif # HAVE_PROTOBUF