]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/subdir.am
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / lib / subdir.am
index 6dc2fc529ef064deb30b3164d3c2bdc7ac8522be..43b39100cb3a701675bf540109f9d08db75fee8f 100644 (file)
@@ -2,8 +2,8 @@
 # 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 \
@@ -29,6 +29,7 @@ lib_libfrr_la_SOURCES = \
        lib/graph.c \
        lib/hash.c \
        lib/hook.c \
+       lib/id_alloc.c \
        lib/if.c \
        lib/if_rmap.c \
        lib/imsg-buffer.c \
@@ -50,6 +51,9 @@ lib_libfrr_la_SOURCES = \
        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 \
@@ -80,11 +84,20 @@ lib_libfrr_la_SOURCES = \
        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 \
@@ -101,10 +114,19 @@ vtysh_scan += \
 # 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 \
@@ -117,6 +139,7 @@ pkginclude_HEADERS += \
        lib/command_match.h \
        lib/compiler.h \
        lib/csv.h \
+       lib/db.h \
        lib/debug.h \
        lib/distribute.h \
        lib/event_counter.h \
@@ -131,6 +154,7 @@ pkginclude_HEADERS += \
        lib/graph.h \
        lib/hash.h \
        lib/hook.h \
+       lib/id_alloc.h \
        lib/if.h \
        lib/if_rmap.h \
        lib/imsg.h \
@@ -152,6 +176,9 @@ pkginclude_HEADERS += \
        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 \
@@ -187,6 +214,9 @@ pkginclude_HEADERS += \
        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 \
@@ -207,6 +237,17 @@ noinst_HEADERS += \
        lib/plist_int.h \
        #end
 
+# General note about module and module helper library (libfrrsnmp, libfrrzmq)
+# linking:  If we're linking libfrr statically into daemons, we *must* remove
+# libfrr from modules because modules will always link it in dynamically and
+# thus 2 copies of libfrr will be loaded... hilarity ensues.
+#
+# Not linking libfrr into modules should generally work fine because the
+# executable refers to libfrr either way and the dynamic linker should make
+# libfrr available to modules.  If some OS platform has a dynamic linker that
+# doesn't do that, libfrr needs to be readded to modules, but _only_ _if_
+# it's not linked into daemons statically.
+
 #
 # SNMP support
 #
@@ -216,7 +257,7 @@ endif
 
 lib_libfrrsnmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu99
 lib_libfrrsnmp_la_LDFLAGS = -version-info 0:0:0
-lib_libfrrsnmp_la_LIBADD = lib/libfrr.la $(SNMP_LIBS)
+lib_libfrrsnmp_la_LIBADD = $(SNMP_LIBS)
 lib_libfrrsnmp_la_SOURCES = \
        lib/agentx.c \
        lib/snmp.c \
@@ -232,11 +273,35 @@ endif
 
 lib_libfrrzmq_la_CFLAGS = $(WERROR) $(ZEROMQ_CFLAGS)
 lib_libfrrzmq_la_LDFLAGS = -version-info 0:0:0
-lib_libfrrzmq_la_LIBADD = lib/libfrr.la $(ZEROMQ_LIBS)
+lib_libfrrzmq_la_LIBADD = $(ZEROMQ_LIBS)
 lib_libfrrzmq_la_SOURCES = \
        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
 #
@@ -325,6 +390,7 @@ lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h
 
 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