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