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