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