# libfrr
#
lib_LTLIBRARIES += lib/libfrr.la
-lib_libfrr_la_LDFLAGS = -version-info 0:0:0
-lib_libfrr_la_LIBADD = @LIBCAP@
+lib_libfrr_la_LDFLAGS = -version-info 0:0:0 -Xlinker -e_libfrr_version
+lib_libfrr_la_LIBADD = @LIBCAP@ $(UNWIND_LIBS) -lyang
lib_libfrr_la_SOURCES = \
lib/agg_table.c \
lib/graph.c \
lib/hash.c \
lib/hook.c \
+ lib/id_alloc.c \
lib/if.c \
lib/if_rmap.c \
lib/imsg-buffer.c \
lib/netns_linux.c \
lib/netns_other.c \
lib/nexthop_group.c \
+ lib/northbound.c \
+ lib/northbound_cli.c \
+ lib/northbound_db.c \
lib/openbsd-tree.c \
lib/pid_output.c \
lib/plist.c \
lib/vty.c \
lib/wheel.c \
lib/workqueue.c \
+ lib/yang.c \
+ lib/yang_translator.c \
+ lib/yang_wrappers.c \
lib/zclient.c \
lib/logicalrouter.c \
lib/lua.c \
# end
+nodist_lib_libfrr_la_SOURCES = \
+ yang/frr-interface.yang.c \
+ yang/frr-route-types.yang.c \
+ yang/frr-module-translator.yang.c \
+ # end
+
vtysh_scan += \
$(top_srcdir)/lib/distribute.c \
$(top_srcdir)/lib/filter.c \
# can be loaded as DSO - always include for vtysh
vtysh_scan += $(top_srcdir)/lib/agentx.c
+if SQLITE3
+lib_libfrr_la_LIBADD += -lsqlite3
+lib_libfrr_la_SOURCES += lib/db.c
+endif
+
+lib/if_clippy.c: $(CLIPPY_DEPS)
+lib/if.lo: lib/if_clippy.c
lib/plist_clippy.c: $(CLIPPY_DEPS)
lib/plist.lo: lib/plist_clippy.c
lib/nexthop_group_clippy.c: $(CLIPPY_DEPS)
lib/nexthop_group.lo: lib/nexthop_group_clippy.c
+lib/northbound_cli_clippy.c: $(CLIPPY_DEPS)
+lib/northbound_cli.lo: lib/northbound_cli_clippy.c
pkginclude_HEADERS += \
lib/agg_table.h \
lib/command_match.h \
lib/compiler.h \
lib/csv.h \
+ lib/db.h \
lib/debug.h \
lib/distribute.h \
lib/event_counter.h \
lib/graph.h \
lib/hash.h \
lib/hook.h \
+ lib/id_alloc.h \
lib/if.h \
lib/if_rmap.h \
lib/imsg.h \
lib/network.h \
lib/nexthop.h \
lib/nexthop_group.h \
+ lib/northbound.h \
+ lib/northbound_cli.h \
+ lib/northbound_db.h \
lib/ns.h \
lib/openbsd-queue.h \
lib/openbsd-tree.h \
lib/vxlan.h \
lib/wheel.h \
lib/workqueue.h \
+ lib/yang.h \
+ lib/yang_translator.h \
+ lib/yang_wrappers.h \
lib/zassert.h \
lib/zclient.h \
lib/zebra.h \
lib/frr_zmq.c \
#end
+#
+# Tail-f's ConfD support
+#
+if CONFD
+module_LTLIBRARIES += lib/confd.la
+endif
+
+lib_confd_la_CFLAGS = $(WERROR) $(CONFD_CFLAGS)
+lib_confd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+lib_confd_la_LIBADD = lib/libfrr.la -lconfd
+lib_confd_la_SOURCES = lib/northbound_confd.c
+
+#
+# Sysrepo support
+#
+if SYSREPO
+module_LTLIBRARIES += lib/sysrepo.la
+endif
+
+lib_sysrepo_la_CFLAGS = $(WERROR)
+lib_sysrepo_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+lib_sysrepo_la_LIBADD = lib/libfrr.la -lsysrepo
+lib_sysrepo_la_SOURCES = lib/northbound_sysrepo.c
+
#
# CLI utilities
#
lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl
@PERL@ $(top_srcdir)/lib/route_types.pl < $(top_srcdir)/lib/route_types.txt > $@
+DISTCLEANFILES += lib/route_types.h
if GIT_VERSION
# bit of a trick here to always have up-to-date git stamps without triggering