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