]> git.proxmox.com Git - mirror_frr.git/blob - lib/subdir.am
isisd: fix two 'no X' commands
[mirror_frr.git] / lib / subdir.am
1 #
2 # libfrr
3 #
4 lib_LTLIBRARIES += lib/libfrr.la
5 lib_libfrr_la_LDFLAGS = -version-info 0:0:0 -Xlinker -e_libfrr_version
6 lib_libfrr_la_LIBADD = $(LIBCAP) $(UNWIND_LIBS) $(LIBYANG_LIBS) $(LUA_LIB) $(LIBM)
7
8 lib_libfrr_la_SOURCES = \
9 lib/agg_table.c \
10 lib/atomlist.c \
11 lib/bfd.c \
12 lib/buffer.c \
13 lib/checksum.c \
14 lib/command.c \
15 lib/command_graph.c \
16 lib/command_lex.l \
17 lib/command_match.c \
18 lib/command_parse.y \
19 lib/csv.c \
20 lib/debug.c \
21 lib/defaults.c \
22 lib/distribute.c \
23 lib/ferr.c \
24 lib/filter.c \
25 lib/frrcu.c \
26 lib/frrlua.c \
27 lib/frr_pthread.c \
28 lib/frrstr.c \
29 lib/getopt.c \
30 lib/getopt1.c \
31 lib/grammar_sandbox.c \
32 lib/graph.c \
33 lib/hash.c \
34 lib/hook.c \
35 lib/id_alloc.c \
36 lib/if.c \
37 lib/if_rmap.c \
38 lib/imsg-buffer.c \
39 lib/imsg.c \
40 lib/jhash.c \
41 lib/json.c \
42 lib/keychain.c \
43 lib/lib_errors.c \
44 lib/lib_vty.c \
45 lib/libfrr.c \
46 lib/linklist.c \
47 lib/log.c \
48 lib/log_vty.c \
49 lib/md5.c \
50 lib/memory.c \
51 lib/mlag.c \
52 lib/module.c \
53 lib/mpls.c \
54 lib/srv6.c \
55 lib/network.c \
56 lib/nexthop.c \
57 lib/netns_linux.c \
58 lib/netns_other.c \
59 lib/nexthop_group.c \
60 lib/northbound.c \
61 lib/northbound_cli.c \
62 lib/northbound_db.c \
63 lib/ntop.c \
64 lib/openbsd-tree.c \
65 lib/pid_output.c \
66 lib/plist.c \
67 lib/prefix.c \
68 lib/privs.c \
69 lib/ptm_lib.c \
70 lib/pullwr.c \
71 lib/qobj.c \
72 lib/ringbuf.c \
73 lib/routemap.c \
74 lib/routemap_cli.c \
75 lib/routemap_northbound.c \
76 lib/sbuf.c \
77 lib/seqlock.c \
78 lib/sha256.c \
79 lib/sigevent.c \
80 lib/skiplist.c \
81 lib/sockopt.c \
82 lib/sockunion.c \
83 lib/spf_backoff.c \
84 lib/srcdest_table.c \
85 lib/stream.c \
86 lib/strlcat.c \
87 lib/strlcpy.c \
88 lib/systemd.c \
89 lib/table.c \
90 lib/termtable.c \
91 lib/thread.c \
92 lib/typerb.c \
93 lib/typesafe.c \
94 lib/vector.c \
95 lib/vrf.c \
96 lib/vty.c \
97 lib/wheel.c \
98 lib/workqueue.c \
99 lib/yang.c \
100 lib/yang_translator.c \
101 lib/yang_wrappers.c \
102 lib/zclient.c \
103 lib/printf/printf-pos.c \
104 lib/printf/vfprintf.c \
105 lib/printf/glue.c \
106 # end
107
108 nodist_lib_libfrr_la_SOURCES = \
109 yang/frr-filter.yang.c \
110 yang/frr-interface.yang.c \
111 yang/frr-route-map.yang.c \
112 yang/frr-route-types.yang.c \
113 yang/ietf/ietf-routing-types.yang.c \
114 yang/frr-module-translator.yang.c \
115 # end
116
117 vtysh_scan += \
118 $(top_srcdir)/lib/distribute.c \
119 $(top_srcdir)/lib/filter.c \
120 $(top_srcdir)/lib/if.c \
121 $(top_srcdir)/lib/if_rmap.c \
122 $(top_srcdir)/lib/keychain.c \
123 $(top_srcdir)/lib/lib_vty.c \
124 $(top_srcdir)/lib/nexthop_group.c \
125 $(top_srcdir)/lib/plist.c \
126 $(top_srcdir)/lib/routemap.c \
127 $(top_srcdir)/lib/routemap_cli.c \
128 $(top_srcdir)/lib/vrf.c \
129 $(top_srcdir)/lib/vty.c \
130 # end
131 # can be loaded as DSO - always include for vtysh
132 vtysh_scan += $(top_srcdir)/lib/agentx.c
133
134 if SQLITE3
135 lib_libfrr_la_LIBADD += $(SQLITE3_LIBS)
136 lib_libfrr_la_SOURCES += lib/db.c
137 endif
138
139 lib/if_clippy.c: $(CLIPPY_DEPS)
140 lib/if.lo: lib/if_clippy.c
141 lib/plist_clippy.c: $(CLIPPY_DEPS)
142 lib/plist.lo: lib/plist_clippy.c
143 lib/nexthop_group_clippy.c: $(CLIPPY_DEPS)
144 lib/nexthop_group.lo: lib/nexthop_group_clippy.c
145 lib/northbound_cli_clippy.c: $(CLIPPY_DEPS)
146 lib/northbound_cli.lo: lib/northbound_cli_clippy.c
147 lib/routemap_cli_clippy.c: $(CLIPPY_DEPS)
148 lib/routemap_cli.lo: lib/routemap_cli_clippy.c
149 lib/vty_clippy.c: $(CLIPPY_DEPS)
150 lib/vty.lo: lib/vty_clippy.c
151 lib/log_vty_clippy.c: $(CLIPPY_DEPS)
152 lib/log_vty.lo: lib/log_vty_clippy.c
153
154 pkginclude_HEADERS += \
155 lib/agg_table.h \
156 lib/atomlist.h \
157 lib/bfd.h \
158 lib/bitfield.h \
159 lib/buffer.h \
160 lib/checksum.h \
161 lib/mlag.h \
162 lib/command.h \
163 lib/command_graph.h \
164 lib/command_match.h \
165 lib/compiler.h \
166 lib/csv.h \
167 lib/db.h \
168 lib/debug.h \
169 lib/defaults.h \
170 lib/distribute.h \
171 lib/ferr.h \
172 lib/filter.h \
173 lib/freebsd-queue.h \
174 lib/frrlua.h \
175 lib/frr_pthread.h \
176 lib/frratomic.h \
177 lib/frrcu.h \
178 lib/frrstr.h \
179 lib/getopt.h \
180 lib/graph.h \
181 lib/hash.h \
182 lib/hook.h \
183 lib/iana_afi.h \
184 lib/id_alloc.h \
185 lib/if.h \
186 lib/if_rmap.h \
187 lib/imsg.h \
188 lib/ipaddr.h \
189 lib/jhash.h \
190 lib/json.h \
191 lib/keychain.h \
192 lib/lib_errors.h \
193 lib/lib_vty.h \
194 lib/libfrr.h \
195 lib/libospf.h \
196 lib/linklist.h \
197 lib/log.h \
198 lib/log_vty.h \
199 lib/md5.h \
200 lib/memory.h \
201 lib/module.h \
202 lib/monotime.h \
203 lib/mpls.h \
204 lib/srv6.h \
205 lib/network.h \
206 lib/nexthop.h \
207 lib/nexthop_group.h \
208 lib/nexthop_group_private.h \
209 lib/northbound.h \
210 lib/northbound_cli.h \
211 lib/northbound_db.h \
212 lib/ns.h \
213 lib/openbsd-queue.h \
214 lib/openbsd-tree.h \
215 lib/plist.h \
216 lib/prefix.h \
217 lib/printfrr.h \
218 lib/privs.h \
219 lib/ptm_lib.h \
220 lib/pullwr.h \
221 lib/pw.h \
222 lib/qobj.h \
223 lib/queue.h \
224 lib/ringbuf.h \
225 lib/routemap.h \
226 lib/sbuf.h \
227 lib/seqlock.h \
228 lib/sha256.h \
229 lib/sigevent.h \
230 lib/skiplist.h \
231 lib/smux.h \
232 lib/sockopt.h \
233 lib/sockunion.h \
234 lib/spf_backoff.h \
235 lib/srcdest_table.h \
236 lib/stream.h \
237 lib/systemd.h \
238 lib/table.h \
239 lib/termtable.h \
240 lib/thread.h \
241 lib/typerb.h \
242 lib/typesafe.h \
243 lib/vector.h \
244 lib/vlan.h \
245 lib/vrf.h \
246 lib/vrf_int.h \
247 lib/vty.h \
248 lib/vxlan.h \
249 lib/wheel.h \
250 lib/workqueue.h \
251 lib/yang.h \
252 lib/yang_translator.h \
253 lib/yang_wrappers.h \
254 lib/zassert.h \
255 lib/zclient.h \
256 lib/zebra.h \
257 lib/pbr.h \
258 # end
259
260
261 nodist_pkginclude_HEADERS += \
262 lib/route_types.h \
263 lib/version.h \
264 # end
265
266 noinst_HEADERS += \
267 lib/clippy.h \
268 lib/log_int.h \
269 lib/plist_int.h \
270 lib/printf/printfcommon.h \
271 lib/printf/printflocal.h \
272 #end
273
274 # General note about module and module helper library (libfrrsnmp, libfrrzmq)
275 # linking: If we're linking libfrr statically into daemons, we *must* remove
276 # libfrr from modules because modules will always link it in dynamically and
277 # thus 2 copies of libfrr will be loaded... hilarity ensues.
278 #
279 # Not linking libfrr into modules should generally work fine because the
280 # executable refers to libfrr either way and the dynamic linker should make
281 # libfrr available to modules. If some OS platform has a dynamic linker that
282 # doesn't do that, libfrr needs to be readded to modules, but _only_ _if_
283 # it's not linked into daemons statically.
284
285 #
286 # SNMP support
287 #
288 if SNMP
289 lib_LTLIBRARIES += lib/libfrrsnmp.la
290 endif
291
292 lib_libfrrsnmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu99
293 lib_libfrrsnmp_la_LDFLAGS = -version-info 0:0:0
294 lib_libfrrsnmp_la_LIBADD = $(SNMP_LIBS)
295 lib_libfrrsnmp_la_SOURCES = \
296 lib/agentx.c \
297 lib/snmp.c \
298 # end
299
300 #
301 # c-ares support
302 #
303 if CARES
304 lib_LTLIBRARIES += lib/libfrrcares.la
305 pkginclude_HEADERS += lib/resolver.h
306 endif
307
308 lib_libfrrcares_la_CFLAGS = $(WERROR) $(CARES_CFLAGS)
309 lib_libfrrcares_la_LDFLAGS = -version-info 0:0:0
310 lib_libfrrcares_la_LIBADD = $(CARES_LIBS)
311 lib_libfrrcares_la_SOURCES = \
312 lib/resolver.c \
313 #end
314
315 #
316 # ZeroMQ support
317 #
318 if ZEROMQ
319 lib_LTLIBRARIES += lib/libfrrzmq.la
320 pkginclude_HEADERS += lib/frr_zmq.h
321 endif
322
323 lib_libfrrzmq_la_CFLAGS = $(WERROR) $(ZEROMQ_CFLAGS)
324 lib_libfrrzmq_la_LDFLAGS = -version-info 0:0:0
325 lib_libfrrzmq_la_LIBADD = $(ZEROMQ_LIBS)
326 lib_libfrrzmq_la_SOURCES = \
327 lib/frr_zmq.c \
328 #end
329
330 #
331 # Tail-f's ConfD support
332 #
333 if CONFD
334 module_LTLIBRARIES += lib/confd.la
335 endif
336
337 lib_confd_la_CFLAGS = $(WERROR) $(CONFD_CFLAGS)
338 lib_confd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
339 lib_confd_la_LIBADD = lib/libfrr.la $(CONFD_LIBS)
340 lib_confd_la_SOURCES = lib/northbound_confd.c
341
342 #
343 # Sysrepo support
344 #
345 if SYSREPO
346 module_LTLIBRARIES += lib/sysrepo.la
347 endif
348
349 lib_sysrepo_la_CFLAGS = $(WERROR) $(SYSREPO_CFLAGS)
350 lib_sysrepo_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
351 lib_sysrepo_la_LIBADD = lib/libfrr.la $(SYSREPO_LIBS)
352 lib_sysrepo_la_SOURCES = lib/northbound_sysrepo.c
353
354 #
355 # gRPC northbound plugin
356 #
357 if GRPC
358 module_LTLIBRARIES += lib/grpc.la
359 endif
360
361 lib_grpc_la_CXXFLAGS = $(WERROR) $(GRPC_CFLAGS)
362 lib_grpc_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
363 lib_grpc_la_LIBADD = lib/libfrr.la grpc/libfrrgrpc_pb.la $(GRPC_LIBS)
364 lib_grpc_la_SOURCES = lib/northbound_grpc.cpp
365
366 #
367 # CLI utilities
368 #
369 noinst_PROGRAMS += \
370 lib/grammar_sandbox \
371 # end
372
373 if BUILD_CLIPPY
374 noinst_PROGRAMS += lib/clippy
375 else
376 if HOSTTOOLS_CLIPPY
377 $(CLIPPY):
378 @$(MAKE) -C $(top_builddir)/hosttools lib/route_types.h lib/clippy
379 endif
380 endif
381
382 lib_grammar_sandbox_SOURCES = \
383 lib/grammar_sandbox_main.c
384 lib_grammar_sandbox_LDADD = \
385 lib/libfrr.la
386
387 lib_clippy_CPPFLAGS = $(AM_CPPFLAGS) -D_GNU_SOURCE -DBUILDING_CLIPPY
388 lib_clippy_CFLAGS = $(PYTHON_CFLAGS)
389 lib_clippy_LDADD = $(PYTHON_LIBS)
390 lib_clippy_LDFLAGS = -export-dynamic
391 lib_clippy_SOURCES = \
392 lib/clippy.c \
393 lib/command_graph.c \
394 lib/command_lex.l \
395 lib/command_parse.y \
396 lib/command_py.c \
397 lib/defun_lex.l \
398 lib/graph.c \
399 lib/memory.c \
400 lib/vector.c \
401 # end
402
403 # (global) clippy rules for all directories
404
405 AM_V_CLIPPY = $(am__v_CLIPPY_$(V))
406 am__v_CLIPPY_ = $(am__v_CLIPPY_$(AM_DEFAULT_VERBOSITY))
407 am__v_CLIPPY_0 = @echo " CLIPPY " $@;
408 am__v_CLIPPY_1 =
409
410 CLIPPY_DEPS = $(CLIPPY) $(top_srcdir)/python/clidef.py
411
412 SUFFIXES = _clippy.c .proto .pb-c.c .pb-c.h .pb.h .pb.cc .grpc.pb.cc
413 .c_clippy.c:
414 $(AM_V_CLIPPY) $(CLIPPY) $(top_srcdir)/python/clidef.py -o $@ $<
415
416 ## automake's "ylwrap" is a great piece of GNU software... not.
417 .l.c:
418 $(AM_V_LEX)$(am__skiplex) $(LEXCOMPILE) $<
419 .y.c:
420 $(AM_V_YACC)$(am__skipyacc) $(YACCCOMPILE) $<
421
422 #
423 # generated sources & extra foo
424 #
425 EXTRA_DIST += \
426 lib/command_lex.h \
427 lib/command_parse.h \
428 lib/gitversion.pl \
429 lib/route_types.pl \
430 lib/route_types.txt \
431 # end
432
433 BUILT_SOURCES += \
434 lib/gitversion.h \
435 lib/route_types.h \
436 # end
437
438 ## force route_types.h
439 $(lib_clippy_OBJECTS): lib/route_types.h
440 $(lib_libfrr_la_OBJECTS): lib/route_types.h
441
442 AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@
443
444 lib/command_lex.h: lib/command_lex.c
445 @if test ! -f $@; then rm -f "lib/command_lex.c"; else :; fi
446 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) "lib/command_lex.c"; else :; fi
447 lib/command_lex.lo: lib/command_parse.h
448 lib/command_parse.lo: lib/command_lex.h
449 lib/clippy-command_lex.$(OBJEXT): lib/command_parse.h
450 lib/clippy-command_parse.$(OBJEXT): lib/command_lex.h
451 lib/lib_clippy-command_lex.$(OBJEXT): lib/command_parse.h
452 lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h
453
454 lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl
455 $(PERL) $(top_srcdir)/lib/route_types.pl < $(top_srcdir)/lib/route_types.txt > $@
456 DISTCLEANFILES += lib/route_types.h
457
458 if GIT_VERSION
459 # bit of a trick here to always have up-to-date git stamps without triggering
460 # unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
461 # but if we use that on gitversion.h it'll ripple through the .c file deps.
462 # (even if gitversion.h's file timestamp doesn't change, make will think it
463 # did, because of .PHONY...)
464
465 PHONY_GITVERSION=lib/gitversion.h.tmp
466 .SILENT: lib/gitversion.h lib/gitversion.h.tmp
467 GITH=lib/gitversion.h
468 lib/gitversion.h.tmp: $(top_srcdir)/.git
469 $(PERL) $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp
470 lib/gitversion.h: lib/gitversion.h.tmp
471 { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH}
472
473 else
474 PHONY_GITVERSION=lib/gitversion.h
475 lib/gitversion.h:
476 true
477 endif
478 .PHONY: $(PHONY_GITVERSION)