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