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