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