mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-28 21:20:48 +00:00
build: non-recursive qpb & fpm
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
ddfeb48652
commit
0f8b5fd5a0
@ -10,6 +10,7 @@ LIBCAP = @LIBCAP@
|
|||||||
|
|
||||||
EXTRA_DIST =
|
EXTRA_DIST =
|
||||||
BUILT_SOURCES =
|
BUILT_SOURCES =
|
||||||
|
CLEANFILES =
|
||||||
|
|
||||||
examplesdir = $(exampledir)
|
examplesdir = $(exampledir)
|
||||||
|
|
||||||
@ -25,14 +26,16 @@ dist_examples_DATA =
|
|||||||
|
|
||||||
include lib/subdir.am
|
include lib/subdir.am
|
||||||
include zebra/subdir.am
|
include zebra/subdir.am
|
||||||
|
include qpb/subdir.am
|
||||||
|
include fpm/subdir.am
|
||||||
|
|
||||||
SUBDIRS = . qpb fpm @LIBRFP@ @RFPTEST@ \
|
SUBDIRS = . @LIBRFP@ @RFPTEST@ \
|
||||||
@BGPD@ @RIPD@ @RIPNGD@ @OSPFD@ @OSPF6D@ @LDPD@ \
|
@BGPD@ @RIPD@ @RIPNGD@ @OSPFD@ @OSPF6D@ @LDPD@ \
|
||||||
@ISISD@ @PIMD@ @NHRPD@ @EIGRPD@ @BABELD@ \
|
@ISISD@ @PIMD@ @NHRPD@ @EIGRPD@ @BABELD@ \
|
||||||
@WATCHFRR@ @VTYSH@ @OSPFCLIENT@ @DOC@ m4 @pkgsrcdir@ \
|
@WATCHFRR@ @VTYSH@ @OSPFCLIENT@ @DOC@ m4 @pkgsrcdir@ \
|
||||||
redhat @SOLARIS@ tests tools snapcraft
|
redhat @SOLARIS@ tests tools snapcraft
|
||||||
|
|
||||||
DIST_SUBDIRS = . qpb fpm bgpd ripd ripngd ospfd ospf6d ldpd \
|
DIST_SUBDIRS = . bgpd ripd ripngd ospfd ospf6d ldpd \
|
||||||
isisd watchfrr vtysh ospfclient doc m4 pkgsrc redhat tests \
|
isisd watchfrr vtysh ospfclient doc m4 pkgsrc redhat tests \
|
||||||
solaris pimd nhrpd eigrpd bgpd/rfp-example/librfp \
|
solaris pimd nhrpd eigrpd bgpd/rfp-example/librfp \
|
||||||
bgpd/rfp-example/rfptest tools snapcraft babeld python \
|
bgpd/rfp-example/rfptest tools snapcraft babeld python \
|
||||||
|
25
common.am
25
common.am
@ -8,7 +8,7 @@ am__v_CLIPPY_ = $(am__v_CLIPPY_$(AM_DEFAULT_VERBOSITY))
|
|||||||
am__v_CLIPPY_0 = @echo " CLIPPY " $@;
|
am__v_CLIPPY_0 = @echo " CLIPPY " $@;
|
||||||
am__v_CLIPPY_1 =
|
am__v_CLIPPY_1 =
|
||||||
|
|
||||||
SUFFIXES = _clippy.c
|
SUFFIXES = _clippy.c .proto .pb-c.c .pb-c.h .pb.h
|
||||||
.c_clippy.c:
|
.c_clippy.c:
|
||||||
$(AM_V_at)$(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/clippy
|
$(AM_V_at)$(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/clippy
|
||||||
$(AM_V_CLIPPY)$(top_builddir)/$(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py $< > $@.tmp
|
$(AM_V_CLIPPY)$(top_builddir)/$(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py $< > $@.tmp
|
||||||
@ -34,16 +34,19 @@ Q_PROTOBUF_C_CLIENT_LDOPTS=-lprotobuf-c
|
|||||||
Q_PROTOC=protoc
|
Q_PROTOC=protoc
|
||||||
Q_PROTOC_C=protoc-c
|
Q_PROTOC_C=protoc-c
|
||||||
|
|
||||||
Q_PROTOBUF_CFILES = $(filter %.pb-c.c,$(SOURCES))
|
|
||||||
|
|
||||||
Q_PROTOBUF_SRCS = $(Q_PROTOBUF_CFILES) $(Q_PROTOBUF_HFILES)
|
|
||||||
|
|
||||||
# Rules
|
# Rules
|
||||||
%.pb.h: %.proto
|
.proto.pb.h:
|
||||||
$(Q_PROTOC) $(PROTOBUF_INCLUDES) --cpp_out=$(top_srcdir) $(top_srcdir)/$(PROTOBUF_PACKAGE)/$^
|
$(Q_PROTOC) -I$(top_srcdir) --cpp_out=$(top_srcdir) $(top_srcdir)/$^
|
||||||
|
|
||||||
%.pb-c.c %.pb-c.h: %.proto
|
AM_V_PROTOC_C = $(am__v_PROTOC_C_$(V))
|
||||||
$(Q_PROTOC_C) $(PROTOBUF_INCLUDES) --c_out=$(top_srcdir) $(top_srcdir)/$(PROTOBUF_PACKAGE)/$^
|
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)$(Q_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.
|
# Information about how to link to various libraries.
|
||||||
@ -53,7 +56,3 @@ Q_FRR_PB_CLIENT_LDOPTS = $(top_srcdir)/qpb/libfrr_pb.la $(Q_PROTOBUF_C_CLIENT_LD
|
|||||||
Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfrrfpm_pb.la $(Q_FRR_PB_CLIENT_LDOPTS)
|
Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfrrfpm_pb.la $(Q_FRR_PB_CLIENT_LDOPTS)
|
||||||
|
|
||||||
endif # HAVE_PROTOBUF
|
endif # HAVE_PROTOBUF
|
||||||
|
|
||||||
Q_CLEANFILES = $(Q_PROTOBUF_SRCS)
|
|
||||||
|
|
||||||
Q_BUILT_SRCS = $(Q_PROTOBUF_SRCS)
|
|
||||||
|
@ -1820,7 +1820,7 @@ AC_CACHE_VAL(ac_cv_htonl_works,
|
|||||||
)
|
)
|
||||||
AC_MSG_RESULT($ac_cv_htonl_works)
|
AC_MSG_RESULT($ac_cv_htonl_works)
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile qpb/Makefile ripd/Makefile
|
AC_CONFIG_FILES([Makefile ripd/Makefile
|
||||||
ripngd/Makefile bgpd/Makefile ospfd/Makefile watchfrr/Makefile
|
ripngd/Makefile bgpd/Makefile ospfd/Makefile watchfrr/Makefile
|
||||||
ospf6d/Makefile ldpd/Makefile isisd/Makefile vtysh/Makefile
|
ospf6d/Makefile ldpd/Makefile isisd/Makefile vtysh/Makefile
|
||||||
doc/Makefile ospfclient/Makefile tests/Makefile m4/Makefile
|
doc/Makefile ospfclient/Makefile tests/Makefile m4/Makefile
|
||||||
@ -1833,7 +1833,6 @@ AC_CONFIG_FILES([Makefile qpb/Makefile ripd/Makefile
|
|||||||
tools/Makefile
|
tools/Makefile
|
||||||
pkgsrc/Makefile
|
pkgsrc/Makefile
|
||||||
python/Makefile
|
python/Makefile
|
||||||
fpm/Makefile
|
|
||||||
redhat/frr.spec
|
redhat/frr.spec
|
||||||
snapcraft/Makefile
|
snapcraft/Makefile
|
||||||
snapcraft/snapcraft.yaml
|
snapcraft/snapcraft.yaml
|
||||||
|
2
fpm/.gitignore
vendored
2
fpm/.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
Makefile
|
!Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
*.o
|
*.o
|
||||||
tags
|
tags
|
||||||
|
10
fpm/Makefile
Normal file
10
fpm/Makefile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
all: ALWAYS
|
||||||
|
@$(MAKE) -s -C .. fpm/libfrrfpm_pb.la
|
||||||
|
%: ALWAYS
|
||||||
|
@$(MAKE) -s -C .. fpm/$@
|
||||||
|
|
||||||
|
Makefile:
|
||||||
|
#nothing
|
||||||
|
ALWAYS:
|
||||||
|
.PHONY: ALWAYS makefiles
|
||||||
|
.SUFFIXES:
|
@ -1,29 +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 = fpm
|
|
||||||
|
|
||||||
lib_LTLIBRARIES = libfrrfpm_pb.la
|
|
||||||
libfrrfpm_pb_la_LDFLAGS = -version-info 0:0:0
|
|
||||||
|
|
||||||
if HAVE_PROTOBUF
|
|
||||||
protobuf_srcs =
|
|
||||||
|
|
||||||
protobuf_srcs_nodist = \
|
|
||||||
fpm.pb-c.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
libfrrfpm_pb_la_SOURCES = \
|
|
||||||
fpm.h \
|
|
||||||
fpm_pb.h \
|
|
||||||
fpm_pb.c \
|
|
||||||
$(protobuf_srcs)
|
|
||||||
|
|
||||||
nodist_libfrrfpm_pb_la_SOURCES = $(protobuf_srcs_nodist)
|
|
||||||
|
|
||||||
CLEANFILES = $(Q_CLEANFILES)
|
|
||||||
|
|
||||||
BUILT_SOURCES = $(Q_PROTOBUF_SRCS)
|
|
||||||
EXTRA_DIST = fpm.proto
|
|
23
fpm/subdir.am
Normal file
23
fpm/subdir.am
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
if FPM
|
||||||
|
lib_LTLIBRARIES += fpm/libfrrfpm_pb.la
|
||||||
|
endif
|
||||||
|
|
||||||
|
fpm_libfrrfpm_pb_la_LDFLAGS = -version-info 0:0:0
|
||||||
|
fpm_libfrrfpm_pb_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir) -I$(top_builddir)/lib \
|
||||||
|
$(Q_PROTOBUF_C_CLIENT_INCLUDES)
|
||||||
|
fpm_libfrrfpm_pb_la_SOURCES = \
|
||||||
|
fpm/fpm.h \
|
||||||
|
fpm/fpm_pb.h \
|
||||||
|
fpm/fpm_pb.c \
|
||||||
|
# end
|
||||||
|
|
||||||
|
if HAVE_PROTOBUF
|
||||||
|
nodist_fpm_libfrrfpm_pb_la_SOURCES = fpm/fpm.pb-c.c
|
||||||
|
BUILT_SOURCES += fpm/fpm.pb-c.c
|
||||||
|
CLEANFILES += \
|
||||||
|
fpm/fpm.pb-c.c \
|
||||||
|
fpm/fpm.pb-c.h \
|
||||||
|
# end
|
||||||
|
endif
|
||||||
|
|
||||||
|
EXTRA_DIST += fpm/fpm.proto
|
2
qpb/.gitignore
vendored
2
qpb/.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
Makefile
|
!Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
*.o
|
*.o
|
||||||
tags
|
tags
|
||||||
|
10
qpb/Makefile
Normal file
10
qpb/Makefile
Normal file
@ -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:
|
@ -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
|
|
26
qpb/subdir.am
Normal file
26
qpb/subdir.am
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user