4 lib_LTLIBRARIES += lib/libfrr.la
5 lib_libfrr_la_LDFLAGS = -version-info 0:0:0
6 lib_libfrr_la_LIBADD = @LIBCAP@
8 lib_libfrr_la_SOURCES = \
28 lib/grammar_sandbox.c \
89 $(top_srcdir)/lib/distribute.c \
90 $(top_srcdir)/lib/filter.c \
91 $(top_srcdir)/lib/if.c \
92 $(top_srcdir)/lib/if_rmap.c \
93 $(top_srcdir)/lib/keychain.c \
94 $(top_srcdir)/lib/logicalrouter.c \
95 $(top_srcdir)/lib/nexthop_group.c \
96 $(top_srcdir)/lib/plist.c \
97 $(top_srcdir)/lib/routemap.c \
98 $(top_srcdir)/lib/vrf.c \
99 $(top_srcdir)/lib/vty.c \
101 # can be loaded as DSO - always include for vtysh
102 vtysh_scan += $(top_srcdir)/lib/agentx.c
104 lib/plist_clippy.c: $(CLIPPY_DEPS)
105 lib/plist.lo: lib/plist_clippy.c
106 lib/nexthop_group_clippy.c: $(CLIPPY_DEPS)
107 lib/nexthop_group.lo: lib/nexthop_group_clippy.c
109 pkginclude_HEADERS += \
116 lib/command_graph.h \
117 lib/command_match.h \
122 lib/event_counter.h \
126 lib/freebsd-queue.h \
154 lib/nexthop_group.h \
156 lib/openbsd-queue.h \
176 lib/srcdest_table.h \
193 lib/logicalrouter.h \
199 nodist_pkginclude_HEADERS += \
214 lib_LTLIBRARIES += lib/libfrrsnmp.la
217 lib_libfrrsnmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu99
218 lib_libfrrsnmp_la_LDFLAGS = -version-info 0:0:0
219 lib_libfrrsnmp_la_LIBADD = lib/libfrr.la $(SNMP_LIBS)
220 lib_libfrrsnmp_la_SOURCES = \
229 lib_LTLIBRARIES += lib/libfrrzmq.la
230 pkginclude_HEADERS += lib/frr_zmq.h
233 lib_libfrrzmq_la_CFLAGS = $(WERROR) $(ZEROMQ_CFLAGS)
234 lib_libfrrzmq_la_LDFLAGS = -version-info 0:0:0
235 lib_libfrrzmq_la_LIBADD = lib/libfrr.la $(ZEROMQ_LIBS)
236 lib_libfrrzmq_la_SOURCES = \
244 lib/grammar_sandbox \
248 noinst_PROGRAMS += lib/clippy
250 $(HOSTTOOLS)lib/clippy:
251 @$(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/route_types.h lib/clippy
254 lib_grammar_sandbox_SOURCES = \
255 lib/grammar_sandbox_main.c
256 lib_grammar_sandbox_LDADD = \
259 lib_clippy_CPPFLAGS = $(AM_CPPFLAGS) -D_GNU_SOURCE -DBUILDING_CLIPPY
260 lib_clippy_CFLAGS = $(PYTHON_CFLAGS)
261 lib_clippy_LDADD = $(PYTHON_LIBS)
262 lib_clippy_LDFLAGS = -export-dynamic
263 lib_clippy_SOURCES = \
265 lib/command_graph.c \
267 lib/command_parse.y \
275 # (global) clippy rules for all directories
277 AM_V_CLIPPY = $(am__v_CLIPPY_$(V))
278 am__v_CLIPPY_ = $(am__v_CLIPPY_$(AM_DEFAULT_VERBOSITY))
279 am__v_CLIPPY_0 = @echo " CLIPPY " $@;
282 CLIPPY_DEPS = $(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py
284 SUFFIXES = _clippy.c .proto .pb-c.c .pb-c.h .pb.h
286 @{ test -x $(top_builddir)/$(HOSTTOOLS)lib/clippy || \
287 $(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/clippy; }
288 $(AM_V_CLIPPY) $(top_builddir)/$(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py -o $@ $<
290 ## automake's "ylwrap" is a great piece of GNU software... not.
292 $(AM_V_LEX)$(am__skiplex) $(LEXCOMPILE) $<
294 $(AM_V_YACC)$(am__skipyacc) $(YACCCOMPILE) $<
297 # generated sources & extra foo
301 lib/command_parse.h \
304 lib/route_types.txt \
312 ## force route_types.h
313 $(lib_clippy_OBJECTS): lib/route_types.h
314 $(lib_libfrr_la_OBJECTS): lib/route_types.h
316 AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@
318 lib/command_lex.h: lib/command_lex.c
319 @if test ! -f $@; then rm -f "lib/command_lex.c"; else :; fi
320 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) "lib/command_lex.c"; else :; fi
321 lib/command_lex.lo: lib/command_parse.h
322 lib/command_parse.lo: lib/command_lex.h
323 lib/lib_clippy-command_lex.$(OBJEXT): lib/command_parse.h
324 lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h
326 lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl
327 @PERL@ $(top_srcdir)/lib/route_types.pl < $(top_srcdir)/lib/route_types.txt > $@
330 # bit of a trick here to always have up-to-date git stamps without triggering
331 # unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
332 # but if we use that on gitversion.h it'll ripple through the .c file deps.
333 # (even if gitversion.h's file timestamp doesn't change, make will think it
334 # did, because of .PHONY...)
336 PHONY_GITVERSION=lib/gitversion.h.tmp
337 .SILENT: lib/gitversion.h lib/gitversion.h.tmp
338 GITH=lib/gitversion.h
339 lib/gitversion.h.tmp: $(top_srcdir)/.git
340 @PERL@ $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp
341 lib/gitversion.h: lib/gitversion.h.tmp
342 { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH}
345 PHONY_GITVERSION=lib/gitversion.h
349 .PHONY: $(PHONY_GITVERSION)