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