summaryrefslogtreecommitdiffstats
path: root/qpb/subdir.am
blob: e897822ecc1205dcf43a3145038d986b895fc075 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
if HAVE_PROTOBUF
lib_LTLIBRARIES += qpb/libfrr_pb.la
endif

qpb_libfrr_pb_la_CPPFLAGS = $(AM_CPPFLAGS) $(PROTOBUF_C_CFLAGS)
qpb_libfrr_pb_la_LIBADD = $(PROTOBUF_C_LIBS)
qpb_libfrr_pb_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0

qpb_libfrr_pb_la_SOURCES = \
	qpb/qpb.c \
	qpb/qpb_allocator.c \
	# end

if HAVE_PROTOBUF
nodist_qpb_libfrr_pb_la_SOURCES = \
	qpb/qpb.pb-c.c \
	# end
endif

noinst_HEADERS += \
	qpb/linear_allocator.h \
	qpb/qpb.h \
	qpb/qpb_allocator.h \
	# end

CLEANFILES += \
	qpb/qpb.pb-c.c \
	qpb/qpb.pb-c.h \
	# end

EXTRA_DIST += qpb/qpb.proto
SUFFIXES += .proto .pb-c.c .pb-c.h

if HAVE_PROTOBUF

# Rules
.proto.pb.h:
	$(PROTOC) -I$(top_srcdir) --cpp_out=$(top_builddir) $^

AM_V_PROTOC_C = $(am__v_PROTOC_C_$(V))
am__v_PROTOC_C_ = $(am__v_PROTOC_C_$(AM_DEFAULT_VERBOSITY))
am__v_PROTOC_C_0 = @echo "  PROTOC_C" $@;
am__v_PROTOC_C_1 =

.proto.pb-c.c:
	$(AM_V_PROTOC_C)$(PROTOC_C) -I$(top_srcdir) --c_out=$(top_builddir) $^
	$(AM_V_GEN)$(SED) -e '1i#include "config.h"' -i $@
.pb-c.c.pb-c.h:
	@/bin/true

endif  # HAVE_PROTOBUF