summaryrefslogtreecommitdiffstats
path: root/qpb
diff options
context:
space:
mode:
Diffstat (limited to 'qpb')
-rw-r--r--qpb/.gitignore2
-rw-r--r--qpb/Makefile10
-rw-r--r--qpb/Makefile.am30
-rw-r--r--qpb/subdir.am26
4 files changed, 37 insertions, 31 deletions
diff --git a/qpb/.gitignore b/qpb/.gitignore
index b133c52a4..17e90443e 100644
--- a/qpb/.gitignore
+++ b/qpb/.gitignore
@@ -1,4 +1,4 @@
-Makefile
+!Makefile
Makefile.in
*.o
tags
diff --git a/qpb/Makefile b/qpb/Makefile
new file mode 100644
index 000000000..2237def02
--- /dev/null
+++ b/qpb/Makefile
@@ -0,0 +1,10 @@
+all: ALWAYS
+ @$(MAKE) -s -C .. fpm/libfrr_pb.la
+%: ALWAYS
+ @$(MAKE) -s -C .. fpm/$@
+
+Makefile:
+ #nothing
+ALWAYS:
+.PHONY: ALWAYS makefiles
+.SUFFIXES:
diff --git a/qpb/Makefile.am b/qpb/Makefile.am
deleted file mode 100644
index e5951b2be..000000000
--- a/qpb/Makefile.am
+++ /dev/null
@@ -1,30 +0,0 @@
-include ../common.am
-
-AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib $(Q_PROTOBUF_C_CLIENT_INCLUDES)
-
-PROTOBUF_INCLUDES=-I$(top_srcdir)
-PROTOBUF_PACKAGE = qpb
-
-lib_LTLIBRARIES = libfrr_pb.la
-libfrr_pb_la_LDFLAGS = -version-info 0:0:0
-
-if HAVE_PROTOBUF
-protobuf_srcs = \
- qpb_allocator.c
-
-protobuf_srcs_nodist = \
- qpb.pb-c.c
-endif
-
-libfrr_pb_la_SOURCES = \
- linear_allocator.h \
- qpb.h \
- qpb.c \
- qpb_allocator.h \
- $(protobuf_srcs)
-
-nodist_libfrr_pb_la_SOURCES = $(protobuf_srcs_nodist)
-
-CLEANFILES = $(Q_CLEANFILES)
-BUILT_SOURCES = $(Q_PROTOBUF_SRCS)
-EXTRA_DIST = qpb.proto
diff --git a/qpb/subdir.am b/qpb/subdir.am
new file mode 100644
index 000000000..71e501b9c
--- /dev/null
+++ b/qpb/subdir.am
@@ -0,0 +1,26 @@
+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_LDFLAGS = -version-info 0:0:0
+
+qpb_libfrr_pb_la_SOURCES = \
+ 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
+BUILT_SOURCES += qpb/qpb.pb-c.c
+CLEANFILES += \
+ qpb/qpb.pb-c.c \
+ qpb/qpb.pb-c.h \
+ # end
+endif
+
+EXTRA_DIST += qpb/qpb.proto