]>
Commit | Line | Data |
---|---|---|
4a121f99 DL |
1 | # |
2 | # libfrr | |
3 | # | |
04b4b595 | 4 | |
4a121f99 | 5 | lib_LTLIBRARIES += lib/libfrr.la |
63116a70 | 6 | lib_libfrr_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0 -Xlinker -e_libfrr_version |
3bd7df45 | 7 | lib_libfrr_la_LIBADD = $(LIBCAP) $(UNWIND_LIBS) $(LIBYANG_LIBS) $(LUA_LIB) $(UST_LIBS) $(LIBCRYPT) $(LIBDL) $(LIBM) |
4a121f99 DL |
8 | |
9 | lib_libfrr_la_SOURCES = \ | |
8e1f6512 | 10 | lib/agg_table.c \ |
bcea0c0f | 11 | lib/atomlist.c \ |
ac313345 | 12 | lib/base64.c \ |
4a121f99 DL |
13 | lib/bfd.c \ |
14 | lib/buffer.c \ | |
15 | lib/checksum.c \ | |
16 | lib/command.c \ | |
17 | lib/command_graph.c \ | |
18 | lib/command_lex.l \ | |
19 | lib/command_match.c \ | |
20 | lib/command_parse.y \ | |
fd8e262a | 21 | lib/cspf.c \ |
4a121f99 | 22 | lib/csv.c \ |
aea03ad6 | 23 | lib/debug.c \ |
96673e06 | 24 | lib/defaults.c \ |
4a121f99 | 25 | lib/distribute.c \ |
04b4b595 | 26 | lib/explicit_bzero.c \ |
3155489a | 27 | lib/ferr.c \ |
4a121f99 | 28 | lib/filter.c \ |
b62578bd | 29 | lib/filter_cli.c \ |
c2aab693 | 30 | lib/filter_nb.c \ |
3e41733f | 31 | lib/frrcu.c \ |
5dbb0a7b | 32 | lib/frrlua.c \ |
5f98c815 | 33 | lib/frrscript.c \ |
4a121f99 | 34 | lib/frr_pthread.c \ |
fe011935 | 35 | lib/frrstr.c \ |
4a121f99 DL |
36 | lib/getopt.c \ |
37 | lib/getopt1.c \ | |
38 | lib/grammar_sandbox.c \ | |
39 | lib/graph.c \ | |
40 | lib/hash.c \ | |
41 | lib/hook.c \ | |
a94eca09 | 42 | lib/id_alloc.c \ |
4a121f99 DL |
43 | lib/if.c \ |
44 | lib/if_rmap.c \ | |
45 | lib/imsg-buffer.c \ | |
46 | lib/imsg.c \ | |
47 | lib/jhash.c \ | |
48 | lib/json.c \ | |
49 | lib/keychain.c \ | |
24e7c5c8 | 50 | lib/ldp_sync.c \ |
b66d022e | 51 | lib/lib_errors.c \ |
1c0d8808 | 52 | lib/lib_vty.c \ |
4a121f99 | 53 | lib/libfrr.c \ |
912d45a1 | 54 | lib/libfrr_trace.c \ |
4a121f99 | 55 | lib/linklist.c \ |
bbd85e20 | 56 | lib/link_state.c \ |
4a121f99 | 57 | lib/log.c \ |
1c408628 | 58 | lib/log_filter.c \ |
f73126c3 | 59 | lib/log_vty.c \ |
4a121f99 DL |
60 | lib/md5.c \ |
61 | lib/memory.c \ | |
6edbb8b2 | 62 | lib/mlag.c \ |
4a121f99 | 63 | lib/module.c \ |
036fdaad | 64 | lib/mpls.c \ |
e496b420 | 65 | lib/srv6.c \ |
4a121f99 DL |
66 | lib/network.c \ |
67 | lib/nexthop.c \ | |
e26aedbe PG |
68 | lib/netns_linux.c \ |
69 | lib/netns_other.c \ | |
7ee30f28 | 70 | lib/nexthop_group.c \ |
1c2facd1 RW |
71 | lib/northbound.c \ |
72 | lib/northbound_cli.c \ | |
73 | lib/northbound_db.c \ | |
e128c002 | 74 | lib/ntop.c \ |
4a121f99 DL |
75 | lib/openbsd-tree.c \ |
76 | lib/pid_output.c \ | |
77 | lib/plist.c \ | |
4a121f99 DL |
78 | lib/prefix.c \ |
79 | lib/privs.c \ | |
80 | lib/ptm_lib.c \ | |
5c52c06c | 81 | lib/pullwr.c \ |
4a121f99 | 82 | lib/qobj.c \ |
5318d896 | 83 | lib/ringbuf.c \ |
4a121f99 | 84 | lib/routemap.c \ |
2b3e4807 | 85 | lib/routemap_cli.c \ |
686d244f | 86 | lib/routemap_northbound.c \ |
31bfa062 | 87 | lib/sbuf.c \ |
440d5faa | 88 | lib/seqlock.c \ |
4a121f99 DL |
89 | lib/sha256.c \ |
90 | lib/sigevent.c \ | |
91 | lib/skiplist.c \ | |
92 | lib/sockopt.c \ | |
93 | lib/sockunion.c \ | |
94 | lib/spf_backoff.c \ | |
95 | lib/srcdest_table.c \ | |
96 | lib/stream.c \ | |
a4cb97a6 | 97 | lib/strformat.c \ |
4a121f99 DL |
98 | lib/strlcat.c \ |
99 | lib/strlcpy.c \ | |
100 | lib/systemd.c \ | |
101 | lib/table.c \ | |
102 | lib/termtable.c \ | |
103 | lib/thread.c \ | |
80911bc2 | 104 | lib/typerb.c \ |
abd71baa | 105 | lib/typesafe.c \ |
4a121f99 DL |
106 | lib/vector.c \ |
107 | lib/vrf.c \ | |
108 | lib/vty.c \ | |
109 | lib/wheel.c \ | |
110 | lib/workqueue.c \ | |
8e427c29 | 111 | lib/xref.c \ |
1c2facd1 RW |
112 | lib/yang.c \ |
113 | lib/yang_translator.c \ | |
114 | lib/yang_wrappers.c \ | |
4a121f99 | 115 | lib/zclient.c \ |
0bdeb5e5 | 116 | lib/zlog.c \ |
1c6261a9 DL |
117 | lib/zlog_5424.c \ |
118 | lib/zlog_5424_cli.c \ | |
0798d276 | 119 | lib/zlog_live.c \ |
0bdeb5e5 | 120 | lib/zlog_targets.c \ |
5c25bd87 DL |
121 | lib/printf/printf-pos.c \ |
122 | lib/printf/vfprintf.c \ | |
123 | lib/printf/glue.c \ | |
7441ea1a | 124 | lib/routing_nb.c \ |
125 | lib/routing_nb_config.c \ | |
4a121f99 DL |
126 | # end |
127 | ||
3a11599c | 128 | nodist_lib_libfrr_la_SOURCES = \ |
a513824c | 129 | yang/frr-filter.yang.c \ |
3a11599c | 130 | yang/frr-interface.yang.c \ |
686d244f | 131 | yang/frr-route-map.yang.c \ |
3a11599c | 132 | yang/frr-route-types.yang.c \ |
3a7262b6 | 133 | yang/frr-vrf.yang.c \ |
8b043166 | 134 | yang/frr-routing.yang.c \ |
7441ea1a | 135 | yang/frr-nexthop.yang.c \ |
e6a0538b | 136 | yang/ietf/ietf-routing-types.yang.c \ |
b0f502c5 | 137 | yang/ietf/ietf-interfaces.yang.c \ |
bc8c00cc | 138 | yang/ietf/ietf-bgp-types.yang.c \ |
3a11599c DL |
139 | yang/frr-module-translator.yang.c \ |
140 | # end | |
141 | ||
74dc19a2 | 142 | vtysh_scan += \ |
2768748b DL |
143 | lib/distribute.c \ |
144 | lib/filter.c \ | |
b62578bd | 145 | lib/filter_cli.c \ |
2768748b DL |
146 | lib/if.c \ |
147 | lib/if_rmap.c \ | |
148 | lib/keychain.c \ | |
149 | lib/lib_vty.c \ | |
48843422 | 150 | lib/log_vty.c \ |
2768748b DL |
151 | lib/nexthop_group.c \ |
152 | lib/plist.c \ | |
153 | lib/routemap.c \ | |
154 | lib/routemap_cli.c \ | |
c4e57cd5 | 155 | lib/spf_backoff.c \ |
ee4dcee8 | 156 | lib/thread.c \ |
2768748b DL |
157 | lib/vrf.c \ |
158 | lib/vty.c \ | |
74dc19a2 DL |
159 | # end |
160 | # can be loaded as DSO - always include for vtysh | |
2768748b | 161 | vtysh_scan += lib/agentx.c |
74dc19a2 | 162 | |
1c2facd1 | 163 | if SQLITE3 |
fdbd8086 | 164 | lib_libfrr_la_LIBADD += $(SQLITE3_LIBS) |
1c2facd1 RW |
165 | lib_libfrr_la_SOURCES += lib/db.c |
166 | endif | |
167 | ||
94cfb069 DL |
168 | clippy_scan += \ |
169 | lib/if.c \ | |
b62578bd | 170 | lib/filter_cli.c \ |
94cfb069 DL |
171 | lib/log_vty.c \ |
172 | lib/nexthop_group.c \ | |
173 | lib/northbound_cli.c \ | |
174 | lib/plist.c \ | |
175 | lib/routemap_cli.c \ | |
45f01188 | 176 | lib/thread.c \ |
94cfb069 | 177 | lib/vty.c \ |
1c6261a9 | 178 | lib/zlog_5424_cli.c \ |
94cfb069 | 179 | # end |
4a121f99 DL |
180 | |
181 | pkginclude_HEADERS += \ | |
8e1f6512 | 182 | lib/agg_table.h \ |
bcea0c0f | 183 | lib/atomlist.h \ |
ac313345 | 184 | lib/base64.h \ |
4a121f99 DL |
185 | lib/bfd.h \ |
186 | lib/bitfield.h \ | |
187 | lib/buffer.h \ | |
188 | lib/checksum.h \ | |
14beb548 | 189 | lib/mlag.h \ |
4a121f99 DL |
190 | lib/command.h \ |
191 | lib/command_graph.h \ | |
192 | lib/command_match.h \ | |
de1a880c | 193 | lib/compiler.h \ |
fd8e262a | 194 | lib/cspf.h \ |
4a121f99 | 195 | lib/csv.h \ |
1c2facd1 | 196 | lib/db.h \ |
aea03ad6 | 197 | lib/debug.h \ |
96673e06 | 198 | lib/defaults.h \ |
4a121f99 | 199 | lib/distribute.h \ |
3155489a | 200 | lib/ferr.h \ |
4a121f99 | 201 | lib/filter.h \ |
cd85bc2e | 202 | lib/freebsd-queue.h \ |
5dbb0a7b | 203 | lib/frrlua.h \ |
5f98c815 | 204 | lib/frrscript.h \ |
4a121f99 DL |
205 | lib/frr_pthread.h \ |
206 | lib/frratomic.h \ | |
3e41733f | 207 | lib/frrcu.h \ |
fe011935 | 208 | lib/frrstr.h \ |
4a121f99 DL |
209 | lib/getopt.h \ |
210 | lib/graph.h \ | |
211 | lib/hash.h \ | |
212 | lib/hook.h \ | |
17136bf2 | 213 | lib/iana_afi.h \ |
a94eca09 | 214 | lib/id_alloc.h \ |
4a121f99 DL |
215 | lib/if.h \ |
216 | lib/if_rmap.h \ | |
217 | lib/imsg.h \ | |
218 | lib/ipaddr.h \ | |
219 | lib/jhash.h \ | |
220 | lib/json.h \ | |
221 | lib/keychain.h \ | |
24e7c5c8 | 222 | lib/ldp_sync.h \ |
b66d022e | 223 | lib/lib_errors.h \ |
1c0d8808 | 224 | lib/lib_vty.h \ |
4a121f99 | 225 | lib/libfrr.h \ |
912d45a1 | 226 | lib/libfrr_trace.h \ |
4a121f99 DL |
227 | lib/libospf.h \ |
228 | lib/linklist.h \ | |
bbd85e20 | 229 | lib/link_state.h \ |
4a121f99 | 230 | lib/log.h \ |
f73126c3 | 231 | lib/log_vty.h \ |
4a121f99 DL |
232 | lib/md5.h \ |
233 | lib/memory.h \ | |
4a121f99 DL |
234 | lib/module.h \ |
235 | lib/monotime.h \ | |
236 | lib/mpls.h \ | |
e496b420 | 237 | lib/srv6.h \ |
4a121f99 DL |
238 | lib/network.h \ |
239 | lib/nexthop.h \ | |
7ee30f28 | 240 | lib/nexthop_group.h \ |
50d89650 | 241 | lib/nexthop_group_private.h \ |
1c2facd1 RW |
242 | lib/northbound.h \ |
243 | lib/northbound_cli.h \ | |
244 | lib/northbound_db.h \ | |
4a121f99 DL |
245 | lib/ns.h \ |
246 | lib/openbsd-queue.h \ | |
247 | lib/openbsd-tree.h \ | |
248 | lib/plist.h \ | |
4a121f99 | 249 | lib/prefix.h \ |
5c25bd87 | 250 | lib/printfrr.h \ |
4a121f99 DL |
251 | lib/privs.h \ |
252 | lib/ptm_lib.h \ | |
5c52c06c | 253 | lib/pullwr.h \ |
6833ae01 | 254 | lib/pw.h \ |
4a121f99 | 255 | lib/qobj.h \ |
cd85bc2e | 256 | lib/queue.h \ |
5318d896 | 257 | lib/ringbuf.h \ |
4a121f99 | 258 | lib/routemap.h \ |
94effaf0 | 259 | lib/route_opaque.h \ |
31bfa062 | 260 | lib/sbuf.h \ |
440d5faa | 261 | lib/seqlock.h \ |
4a121f99 DL |
262 | lib/sha256.h \ |
263 | lib/sigevent.h \ | |
264 | lib/skiplist.h \ | |
98ea5be8 | 265 | lib/smux.h \ |
4a121f99 DL |
266 | lib/sockopt.h \ |
267 | lib/sockunion.h \ | |
268 | lib/spf_backoff.h \ | |
269 | lib/srcdest_table.h \ | |
31f937fb | 270 | lib/srte.h \ |
4a121f99 DL |
271 | lib/stream.h \ |
272 | lib/systemd.h \ | |
273 | lib/table.h \ | |
274 | lib/termtable.h \ | |
275 | lib/thread.h \ | |
552e2a30 | 276 | lib/trace.h \ |
80911bc2 | 277 | lib/typerb.h \ |
abd71baa | 278 | lib/typesafe.h \ |
4a121f99 | 279 | lib/vector.h \ |
4a121f99 DL |
280 | lib/vlan.h \ |
281 | lib/vrf.h \ | |
282 | lib/vrf_int.h \ | |
283 | lib/vty.h \ | |
284 | lib/vxlan.h \ | |
285 | lib/wheel.h \ | |
286 | lib/workqueue.h \ | |
8e427c29 | 287 | lib/xref.h \ |
1c2facd1 RW |
288 | lib/yang.h \ |
289 | lib/yang_translator.h \ | |
290 | lib/yang_wrappers.h \ | |
4a121f99 DL |
291 | lib/zclient.h \ |
292 | lib/zebra.h \ | |
0bdeb5e5 | 293 | lib/zlog.h \ |
1c6261a9 | 294 | lib/zlog_5424.h \ |
0798d276 | 295 | lib/zlog_live.h \ |
0bdeb5e5 | 296 | lib/zlog_targets.h \ |
0031a6bb | 297 | lib/pbr.h \ |
7441ea1a | 298 | lib/routing_nb.h \ |
64dd7736 DL |
299 | \ |
300 | lib/assert/assert.h \ | |
4a121f99 DL |
301 | # end |
302 | ||
58f8a9ec | 303 | |
70d27c5b DL |
304 | nodist_pkginclude_HEADERS += \ |
305 | lib/route_types.h \ | |
306 | lib/version.h \ | |
307 | # end | |
308 | ||
4a121f99 DL |
309 | noinst_HEADERS += \ |
310 | lib/clippy.h \ | |
4a121f99 | 311 | lib/plist_int.h \ |
5c25bd87 DL |
312 | lib/printf/printfcommon.h \ |
313 | lib/printf/printflocal.h \ | |
4a121f99 DL |
314 | #end |
315 | ||
d6e76257 DL |
316 | # General note about module and module helper library (libfrrsnmp, libfrrzmq) |
317 | # linking: If we're linking libfrr statically into daemons, we *must* remove | |
318 | # libfrr from modules because modules will always link it in dynamically and | |
319 | # thus 2 copies of libfrr will be loaded... hilarity ensues. | |
320 | # | |
321 | # Not linking libfrr into modules should generally work fine because the | |
322 | # executable refers to libfrr either way and the dynamic linker should make | |
323 | # libfrr available to modules. If some OS platform has a dynamic linker that | |
324 | # doesn't do that, libfrr needs to be readded to modules, but _only_ _if_ | |
325 | # it's not linked into daemons statically. | |
326 | ||
4a121f99 DL |
327 | # |
328 | # SNMP support | |
329 | # | |
330 | if SNMP | |
331 | lib_LTLIBRARIES += lib/libfrrsnmp.la | |
332 | endif | |
333 | ||
0c4285d7 | 334 | lib_libfrrsnmp_la_CFLAGS = $(AM_CFLAGS) $(SNMP_CFLAGS) -std=gnu11 |
63116a70 | 335 | lib_libfrrsnmp_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0 |
d6e76257 | 336 | lib_libfrrsnmp_la_LIBADD = $(SNMP_LIBS) |
4a121f99 DL |
337 | lib_libfrrsnmp_la_SOURCES = \ |
338 | lib/agentx.c \ | |
4a121f99 DL |
339 | lib/snmp.c \ |
340 | # end | |
341 | ||
04b4b595 | 342 | |
fe9e7b71 DL |
343 | # |
344 | # c-ares support | |
345 | # | |
346 | if CARES | |
347 | lib_LTLIBRARIES += lib/libfrrcares.la | |
348 | pkginclude_HEADERS += lib/resolver.h | |
433d9af2 | 349 | vtysh_scan += lib/resolver.c |
fe9e7b71 DL |
350 | endif |
351 | ||
0c4285d7 | 352 | lib_libfrrcares_la_CFLAGS = $(AM_CFLAGS) $(CARES_CFLAGS) |
63116a70 | 353 | lib_libfrrcares_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0 |
fe9e7b71 DL |
354 | lib_libfrrcares_la_LIBADD = $(CARES_LIBS) |
355 | lib_libfrrcares_la_SOURCES = \ | |
356 | lib/resolver.c \ | |
357 | #end | |
358 | ||
b6116506 DL |
359 | # |
360 | # ZeroMQ support | |
361 | # | |
362 | if ZEROMQ | |
363 | lib_LTLIBRARIES += lib/libfrrzmq.la | |
364 | pkginclude_HEADERS += lib/frr_zmq.h | |
365 | endif | |
366 | ||
0c4285d7 | 367 | lib_libfrrzmq_la_CFLAGS = $(AM_CFLAGS) $(ZEROMQ_CFLAGS) |
63116a70 | 368 | lib_libfrrzmq_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0 |
d6e76257 | 369 | lib_libfrrzmq_la_LIBADD = $(ZEROMQ_LIBS) |
b6116506 DL |
370 | lib_libfrrzmq_la_SOURCES = \ |
371 | lib/frr_zmq.c \ | |
372 | #end | |
373 | ||
5bce33b3 RW |
374 | # |
375 | # Tail-f's ConfD support | |
376 | # | |
377 | if CONFD | |
378 | module_LTLIBRARIES += lib/confd.la | |
379 | endif | |
380 | ||
0c4285d7 | 381 | lib_confd_la_CFLAGS = $(AM_CFLAGS) $(CONFD_CFLAGS) |
63116a70 | 382 | lib_confd_la_LDFLAGS = $(MODULE_LDFLAGS) |
fdbd8086 | 383 | lib_confd_la_LIBADD = lib/libfrr.la $(CONFD_LIBS) |
5bce33b3 RW |
384 | lib_confd_la_SOURCES = lib/northbound_confd.c |
385 | ||
a7ca2199 RW |
386 | # |
387 | # Sysrepo support | |
388 | # | |
389 | if SYSREPO | |
390 | module_LTLIBRARIES += lib/sysrepo.la | |
391 | endif | |
392 | ||
0c4285d7 | 393 | lib_sysrepo_la_CFLAGS = $(AM_CFLAGS) $(SYSREPO_CFLAGS) |
63116a70 | 394 | lib_sysrepo_la_LDFLAGS = $(MODULE_LDFLAGS) |
fdbd8086 | 395 | lib_sysrepo_la_LIBADD = lib/libfrr.la $(SYSREPO_LIBS) |
a7ca2199 RW |
396 | lib_sysrepo_la_SOURCES = lib/northbound_sysrepo.c |
397 | ||
ec2ac5f2 RW |
398 | # |
399 | # gRPC northbound plugin | |
400 | # | |
401 | if GRPC | |
402 | module_LTLIBRARIES += lib/grpc.la | |
403 | endif | |
404 | ||
405 | lib_grpc_la_CXXFLAGS = $(WERROR) $(GRPC_CFLAGS) | |
63116a70 | 406 | lib_grpc_la_LDFLAGS = $(MODULE_LDFLAGS) |
ec2ac5f2 RW |
407 | lib_grpc_la_LIBADD = lib/libfrr.la grpc/libfrrgrpc_pb.la $(GRPC_LIBS) |
408 | lib_grpc_la_SOURCES = lib/northbound_grpc.cpp | |
409 | ||
4a121f99 DL |
410 | # |
411 | # CLI utilities | |
412 | # | |
413 | noinst_PROGRAMS += \ | |
4a121f99 DL |
414 | lib/grammar_sandbox \ |
415 | # end | |
416 | ||
89727c8d DL |
417 | if BUILD_CLIPPY |
418 | noinst_PROGRAMS += lib/clippy | |
419 | else | |
a71c5039 DL |
420 | if HOSTTOOLS_CLIPPY |
421 | $(CLIPPY): | |
422 | @$(MAKE) -C $(top_builddir)/hosttools lib/route_types.h lib/clippy | |
423 | endif | |
89727c8d DL |
424 | endif |
425 | ||
4a121f99 DL |
426 | lib_grammar_sandbox_SOURCES = \ |
427 | lib/grammar_sandbox_main.c | |
428 | lib_grammar_sandbox_LDADD = \ | |
429 | lib/libfrr.la | |
430 | ||
64dd7736 | 431 | lib_clippy_CPPFLAGS = $(CPPFLAGS_BASE) -D_GNU_SOURCE -DBUILDING_CLIPPY |
0c4285d7 | 432 | lib_clippy_CFLAGS = $(AC_CFLAGS) $(PYTHON_CFLAGS) |
5609b3af | 433 | lib_clippy_LDADD = $(PYTHON_LIBS) $(UST_LIBS) -lelf |
63116a70 DL |
434 | # no $(SAN_FLAGS) here |
435 | lib_clippy_LDFLAGS = -export-dynamic $(AC_LDFLAGS) $(AC_LDFLAGS_EXEC) | |
4a121f99 | 436 | lib_clippy_SOURCES = \ |
8e427c29 | 437 | lib/jhash.c \ |
4a121f99 DL |
438 | lib/clippy.c \ |
439 | lib/command_graph.c \ | |
440 | lib/command_lex.l \ | |
441 | lib/command_parse.y \ | |
442 | lib/command_py.c \ | |
443 | lib/defun_lex.l \ | |
5609b3af | 444 | lib/elf_py.c \ |
4a121f99 | 445 | lib/graph.c \ |
912d45a1 | 446 | lib/libfrr_trace.c \ |
4a121f99 | 447 | lib/memory.c \ |
5609b3af | 448 | lib/typesafe.c \ |
4a121f99 DL |
449 | lib/vector.c \ |
450 | # end | |
451 | ||
aad24c5b DL |
452 | # (global) clippy rules for all directories |
453 | ||
454 | AM_V_CLIPPY = $(am__v_CLIPPY_$(V)) | |
455 | am__v_CLIPPY_ = $(am__v_CLIPPY_$(AM_DEFAULT_VERBOSITY)) | |
456 | am__v_CLIPPY_0 = @echo " CLIPPY " $@; | |
457 | am__v_CLIPPY_1 = | |
458 | ||
a71c5039 | 459 | CLIPPY_DEPS = $(CLIPPY) $(top_srcdir)/python/clidef.py |
aad24c5b | 460 | |
8fb40377 | 461 | SUFFIXES += _clippy.c |
aad24c5b | 462 | .c_clippy.c: |
a71c5039 | 463 | $(AM_V_CLIPPY) $(CLIPPY) $(top_srcdir)/python/clidef.py -o $@ $< |
aad24c5b | 464 | |
a1e6ab1e DL |
465 | # xrelfo, the ELF xref extractor |
466 | ||
467 | AM_V_XRELFO = $(am__v_XRELFO_$(V)) | |
468 | am__v_XRELFO_ = $(am__v_XRELFO_$(AM_DEFAULT_VERBOSITY)) | |
469 | am__v_XRELFO_0 = @echo " XRELFO " $@; | |
470 | am__v_XRELFO_1 = | |
471 | ||
2621bb8b | 472 | XRELFO_FLAGS = -Wlog-format -Wlog-args |
2621bb8b | 473 | |
a1e6ab1e DL |
474 | SUFFIXES += .xref |
475 | %.xref: % $(CLIPPY) | |
13f9aea3 | 476 | $(AM_V_XRELFO) $(CLIPPY) $(top_srcdir)/python/xrelfo.py $(WERROR) $(XRELFO_FLAGS) -o $@ $< |
a1e6ab1e DL |
477 | |
478 | # dependencies added in python/makefile.py | |
479 | frr.xref: | |
480 | $(AM_V_XRELFO) $(CLIPPY) $(top_srcdir)/python/xrelfo.py -o $@ $^ | |
481 | all-am: frr.xref | |
482 | ||
483 | clean-xref: | |
484 | -rm -rf $(xrefs) frr.xref | |
485 | clean-local: clean-xref | |
486 | ||
aad24c5b DL |
487 | ## automake's "ylwrap" is a great piece of GNU software... not. |
488 | .l.c: | |
489 | $(AM_V_LEX)$(am__skiplex) $(LEXCOMPILE) $< | |
490 | .y.c: | |
491 | $(AM_V_YACC)$(am__skipyacc) $(YACCCOMPILE) $< | |
4a121f99 DL |
492 | |
493 | # | |
494 | # generated sources & extra foo | |
495 | # | |
496 | EXTRA_DIST += \ | |
497 | lib/command_lex.h \ | |
70d27c5b | 498 | lib/command_parse.h \ |
4a121f99 | 499 | lib/gitversion.pl \ |
4a121f99 DL |
500 | lib/route_types.pl \ |
501 | lib/route_types.txt \ | |
502 | # end | |
503 | ||
504 | BUILT_SOURCES += \ | |
4a121f99 DL |
505 | lib/gitversion.h \ |
506 | lib/route_types.h \ | |
507 | # end | |
508 | ||
f1b32b2e DL |
509 | ## force route_types.h |
510 | $(lib_clippy_OBJECTS): lib/route_types.h | |
511 | $(lib_libfrr_la_OBJECTS): lib/route_types.h | |
512 | ||
4a121f99 DL |
513 | AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@ |
514 | ||
515 | lib/command_lex.h: lib/command_lex.c | |
516 | @if test ! -f $@; then rm -f "lib/command_lex.c"; else :; fi | |
517 | @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) "lib/command_lex.c"; else :; fi | |
f1b32b2e | 518 | lib/command_lex.lo: lib/command_parse.h |
4a121f99 | 519 | lib/command_parse.lo: lib/command_lex.h |
fdbd8086 DL |
520 | lib/clippy-command_lex.$(OBJEXT): lib/command_parse.h |
521 | lib/clippy-command_parse.$(OBJEXT): lib/command_lex.h | |
f1b32b2e | 522 | lib/lib_clippy-command_lex.$(OBJEXT): lib/command_parse.h |
4a121f99 DL |
523 | lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h |
524 | ||
f0368a3e MS |
525 | DISTCLEANFILES += lib/command_lex.h \ |
526 | lib/command_lex.c \ | |
527 | lib/command_parse.h \ | |
528 | lib/command_parse.c | |
529 | ||
b3b4dfa5 IR |
530 | rt_enabled = |
531 | ||
532 | if BABELD | |
533 | rt_enabled += --enabled babeld | |
534 | endif | |
535 | if BFDD | |
536 | rt_enabled += --enabled bfdd | |
537 | endif | |
538 | if BGPD | |
539 | rt_enabled += --enabled bgpd | |
540 | if ENABLE_BGP_VNC | |
541 | rt_enabled += --enabled bgpd-vnc | |
542 | endif | |
543 | endif | |
544 | if EIGRPD | |
545 | rt_enabled += --enabled eigrpd | |
546 | endif | |
547 | if ISISD | |
548 | rt_enabled += --enabled isisd | |
549 | endif | |
550 | if FABRICD | |
551 | rt_enabled += --enabled fabricd | |
552 | endif | |
553 | if LDPD | |
554 | rt_enabled += --enabled ldpd | |
555 | endif | |
556 | if NHRPD | |
557 | rt_enabled += --enabled nhrpd | |
558 | endif | |
559 | if OSPFD | |
560 | rt_enabled += --enabled ospfd | |
561 | endif | |
562 | if OSPF6D | |
563 | rt_enabled += --enabled ospf6d | |
564 | endif | |
565 | if PBRD | |
566 | rt_enabled += --enabled pbrd | |
567 | endif | |
568 | if PIMD | |
569 | rt_enabled += --enabled pimd | |
570 | endif | |
571 | if RIPD | |
572 | rt_enabled += --enabled ripd | |
573 | endif | |
574 | if RIPNGD | |
575 | rt_enabled += --enabled ripngd | |
576 | endif | |
577 | if SHARPD | |
578 | rt_enabled += --enabled sharpd | |
579 | endif | |
580 | if ZEBRA | |
581 | rt_enabled += --enabled zebra | |
582 | endif | |
583 | ||
4a121f99 | 584 | lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl |
b3b4dfa5 | 585 | $(PERL) $(top_srcdir)/lib/route_types.pl $(rt_enabled) < $(top_srcdir)/lib/route_types.txt > $@ |
67cf020d | 586 | DISTCLEANFILES += lib/route_types.h |
4a121f99 DL |
587 | |
588 | if GIT_VERSION | |
589 | # bit of a trick here to always have up-to-date git stamps without triggering | |
485ac9a7 | 590 | # unnecessary rebuilds. .PHONY causes the .tmp file to be rebuilt always, |
4a121f99 DL |
591 | # but if we use that on gitversion.h it'll ripple through the .c file deps. |
592 | # (even if gitversion.h's file timestamp doesn't change, make will think it | |
593 | # did, because of .PHONY...) | |
594 | ||
9e53b315 | 595 | PHONY_GITVERSION=lib/gitversion.h.tmp |
4a121f99 DL |
596 | .SILENT: lib/gitversion.h lib/gitversion.h.tmp |
597 | GITH=lib/gitversion.h | |
598 | lib/gitversion.h.tmp: $(top_srcdir)/.git | |
fdbd8086 | 599 | $(PERL) $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp |
4a121f99 | 600 | lib/gitversion.h: lib/gitversion.h.tmp |
bd402424 | 601 | { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH} |
4a121f99 DL |
602 | |
603 | else | |
9e53b315 | 604 | PHONY_GITVERSION=lib/gitversion.h |
4a121f99 DL |
605 | lib/gitversion.h: |
606 | true | |
607 | endif | |
9e53b315 | 608 | .PHONY: $(PHONY_GITVERSION) |