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