]>
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 |
2655e41f | 6 | lib_libfrr_la_LIBADD = $(LIBCAP) $(UNWIND_LIBS) $(LIBYANG_LIBS) $(LUA_LIB) $(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 \ |
4a121f99 | 21 | lib/distribute.c \ |
3155489a | 22 | lib/ferr.c \ |
4a121f99 | 23 | lib/filter.c \ |
5dbb0a7b | 24 | lib/frrlua.c \ |
4a121f99 | 25 | lib/frr_pthread.c \ |
fe011935 | 26 | lib/frrstr.c \ |
4a121f99 DL |
27 | lib/getopt.c \ |
28 | lib/getopt1.c \ | |
29 | lib/grammar_sandbox.c \ | |
30 | lib/graph.c \ | |
31 | lib/hash.c \ | |
32 | lib/hook.c \ | |
a94eca09 | 33 | lib/id_alloc.c \ |
4a121f99 DL |
34 | lib/if.c \ |
35 | lib/if_rmap.c \ | |
36 | lib/imsg-buffer.c \ | |
37 | lib/imsg.c \ | |
38 | lib/jhash.c \ | |
39 | lib/json.c \ | |
40 | lib/keychain.c \ | |
b66d022e | 41 | lib/lib_errors.c \ |
4a121f99 DL |
42 | lib/libfrr.c \ |
43 | lib/linklist.c \ | |
44 | lib/log.c \ | |
f73126c3 | 45 | lib/log_vty.c \ |
4a121f99 DL |
46 | lib/md5.c \ |
47 | lib/memory.c \ | |
48 | lib/memory_vty.c \ | |
6edbb8b2 | 49 | lib/mlag.c \ |
4a121f99 | 50 | lib/module.c \ |
036fdaad | 51 | lib/mpls.c \ |
4a121f99 DL |
52 | lib/network.c \ |
53 | lib/nexthop.c \ | |
e26aedbe PG |
54 | lib/netns_linux.c \ |
55 | lib/netns_other.c \ | |
7ee30f28 | 56 | lib/nexthop_group.c \ |
1c2facd1 RW |
57 | lib/northbound.c \ |
58 | lib/northbound_cli.c \ | |
59 | lib/northbound_db.c \ | |
e128c002 | 60 | lib/ntop.c \ |
4a121f99 DL |
61 | lib/openbsd-tree.c \ |
62 | lib/pid_output.c \ | |
63 | lib/plist.c \ | |
7629b6b7 | 64 | lib/pqueue.c \ |
4a121f99 DL |
65 | lib/prefix.c \ |
66 | lib/privs.c \ | |
67 | lib/ptm_lib.c \ | |
68 | lib/qobj.c \ | |
5318d896 | 69 | lib/ringbuf.c \ |
4a121f99 | 70 | lib/routemap.c \ |
31bfa062 | 71 | lib/sbuf.c \ |
440d5faa | 72 | lib/seqlock.c \ |
4a121f99 DL |
73 | lib/sha256.c \ |
74 | lib/sigevent.c \ | |
75 | lib/skiplist.c \ | |
76 | lib/sockopt.c \ | |
77 | lib/sockunion.c \ | |
78 | lib/spf_backoff.c \ | |
79 | lib/srcdest_table.c \ | |
80 | lib/stream.c \ | |
81 | lib/strlcat.c \ | |
82 | lib/strlcpy.c \ | |
83 | lib/systemd.c \ | |
84 | lib/table.c \ | |
85 | lib/termtable.c \ | |
86 | lib/thread.c \ | |
80911bc2 | 87 | lib/typerb.c \ |
abd71baa | 88 | lib/typesafe.c \ |
4a121f99 DL |
89 | lib/vector.c \ |
90 | lib/vrf.c \ | |
91 | lib/vty.c \ | |
92 | lib/wheel.c \ | |
93 | lib/workqueue.c \ | |
1c2facd1 RW |
94 | lib/yang.c \ |
95 | lib/yang_translator.c \ | |
96 | lib/yang_wrappers.c \ | |
4a121f99 | 97 | lib/zclient.c \ |
e26aedbe | 98 | lib/logicalrouter.c \ |
5c25bd87 DL |
99 | lib/printf/printf-pos.c \ |
100 | lib/printf/vfprintf.c \ | |
101 | lib/printf/glue.c \ | |
4a121f99 DL |
102 | # end |
103 | ||
3a11599c DL |
104 | nodist_lib_libfrr_la_SOURCES = \ |
105 | yang/frr-interface.yang.c \ | |
106 | yang/frr-route-types.yang.c \ | |
107 | yang/frr-module-translator.yang.c \ | |
108 | # end | |
109 | ||
74dc19a2 DL |
110 | vtysh_scan += \ |
111 | $(top_srcdir)/lib/distribute.c \ | |
112 | $(top_srcdir)/lib/filter.c \ | |
113 | $(top_srcdir)/lib/if.c \ | |
114 | $(top_srcdir)/lib/if_rmap.c \ | |
115 | $(top_srcdir)/lib/keychain.c \ | |
116 | $(top_srcdir)/lib/logicalrouter.c \ | |
117 | $(top_srcdir)/lib/nexthop_group.c \ | |
118 | $(top_srcdir)/lib/plist.c \ | |
119 | $(top_srcdir)/lib/routemap.c \ | |
120 | $(top_srcdir)/lib/vrf.c \ | |
121 | $(top_srcdir)/lib/vty.c \ | |
122 | # end | |
123 | # can be loaded as DSO - always include for vtysh | |
124 | vtysh_scan += $(top_srcdir)/lib/agentx.c | |
125 | ||
1c2facd1 | 126 | if SQLITE3 |
fdbd8086 | 127 | lib_libfrr_la_LIBADD += $(SQLITE3_LIBS) |
1c2facd1 RW |
128 | lib_libfrr_la_SOURCES += lib/db.c |
129 | endif | |
130 | ||
8f90d89b RW |
131 | lib/if_clippy.c: $(CLIPPY_DEPS) |
132 | lib/if.lo: lib/if_clippy.c | |
f1b32b2e | 133 | lib/plist_clippy.c: $(CLIPPY_DEPS) |
4a121f99 | 134 | lib/plist.lo: lib/plist_clippy.c |
dba32923 DS |
135 | lib/nexthop_group_clippy.c: $(CLIPPY_DEPS) |
136 | lib/nexthop_group.lo: lib/nexthop_group_clippy.c | |
1c2facd1 RW |
137 | lib/northbound_cli_clippy.c: $(CLIPPY_DEPS) |
138 | lib/northbound_cli.lo: lib/northbound_cli_clippy.c | |
2950f5da DS |
139 | lib/vty_clippy.c: $(CLIPPY_DEPS) |
140 | lib/vty.lo: lib/vty_clippy.c | |
f73126c3 SW |
141 | lib/log_vty_clippy.c: $(CLIPPY_DEPS) |
142 | lib/log_vty.lo: lib/log_vty_clippy.c | |
4a121f99 DL |
143 | |
144 | pkginclude_HEADERS += \ | |
8e1f6512 | 145 | lib/agg_table.h \ |
bcea0c0f | 146 | lib/atomlist.h \ |
4a121f99 DL |
147 | lib/bfd.h \ |
148 | lib/bitfield.h \ | |
149 | lib/buffer.h \ | |
150 | lib/checksum.h \ | |
14beb548 | 151 | lib/mlag.h \ |
4a121f99 DL |
152 | lib/command.h \ |
153 | lib/command_graph.h \ | |
154 | lib/command_match.h \ | |
de1a880c | 155 | lib/compiler.h \ |
4a121f99 | 156 | lib/csv.h \ |
1c2facd1 | 157 | lib/db.h \ |
aea03ad6 | 158 | lib/debug.h \ |
4a121f99 | 159 | lib/distribute.h \ |
3155489a | 160 | lib/ferr.h \ |
4a121f99 | 161 | lib/filter.h \ |
cd85bc2e | 162 | lib/freebsd-queue.h \ |
5dbb0a7b | 163 | lib/frrlua.h \ |
4a121f99 DL |
164 | lib/frr_pthread.h \ |
165 | lib/frratomic.h \ | |
fe011935 | 166 | lib/frrstr.h \ |
4a121f99 DL |
167 | lib/getopt.h \ |
168 | lib/graph.h \ | |
169 | lib/hash.h \ | |
170 | lib/hook.h \ | |
17136bf2 | 171 | lib/iana_afi.h \ |
a94eca09 | 172 | lib/id_alloc.h \ |
4a121f99 DL |
173 | lib/if.h \ |
174 | lib/if_rmap.h \ | |
175 | lib/imsg.h \ | |
176 | lib/ipaddr.h \ | |
177 | lib/jhash.h \ | |
178 | lib/json.h \ | |
179 | lib/keychain.h \ | |
b66d022e | 180 | lib/lib_errors.h \ |
4a121f99 DL |
181 | lib/libfrr.h \ |
182 | lib/libospf.h \ | |
183 | lib/linklist.h \ | |
184 | lib/log.h \ | |
f73126c3 | 185 | lib/log_vty.h \ |
4a121f99 DL |
186 | lib/md5.h \ |
187 | lib/memory.h \ | |
188 | lib/memory_vty.h \ | |
189 | lib/module.h \ | |
190 | lib/monotime.h \ | |
191 | lib/mpls.h \ | |
192 | lib/network.h \ | |
193 | lib/nexthop.h \ | |
7ee30f28 | 194 | lib/nexthop_group.h \ |
50d89650 | 195 | lib/nexthop_group_private.h \ |
1c2facd1 RW |
196 | lib/northbound.h \ |
197 | lib/northbound_cli.h \ | |
198 | lib/northbound_db.h \ | |
4a121f99 DL |
199 | lib/ns.h \ |
200 | lib/openbsd-queue.h \ | |
201 | lib/openbsd-tree.h \ | |
202 | lib/plist.h \ | |
7629b6b7 | 203 | lib/pqueue.h \ |
4a121f99 | 204 | lib/prefix.h \ |
5c25bd87 | 205 | lib/printfrr.h \ |
4a121f99 DL |
206 | lib/privs.h \ |
207 | lib/ptm_lib.h \ | |
6833ae01 | 208 | lib/pw.h \ |
4a121f99 | 209 | lib/qobj.h \ |
cd85bc2e | 210 | lib/queue.h \ |
5318d896 | 211 | lib/ringbuf.h \ |
4a121f99 | 212 | lib/routemap.h \ |
31bfa062 | 213 | lib/sbuf.h \ |
440d5faa | 214 | lib/seqlock.h \ |
4a121f99 DL |
215 | lib/sha256.h \ |
216 | lib/sigevent.h \ | |
217 | lib/skiplist.h \ | |
98ea5be8 | 218 | lib/smux.h \ |
4a121f99 DL |
219 | lib/sockopt.h \ |
220 | lib/sockunion.h \ | |
221 | lib/spf_backoff.h \ | |
222 | lib/srcdest_table.h \ | |
223 | lib/stream.h \ | |
224 | lib/systemd.h \ | |
225 | lib/table.h \ | |
226 | lib/termtable.h \ | |
227 | lib/thread.h \ | |
80911bc2 | 228 | lib/typerb.h \ |
abd71baa | 229 | lib/typesafe.h \ |
4a121f99 | 230 | lib/vector.h \ |
4a121f99 DL |
231 | lib/vlan.h \ |
232 | lib/vrf.h \ | |
233 | lib/vrf_int.h \ | |
234 | lib/vty.h \ | |
235 | lib/vxlan.h \ | |
236 | lib/wheel.h \ | |
237 | lib/workqueue.h \ | |
1c2facd1 RW |
238 | lib/yang.h \ |
239 | lib/yang_translator.h \ | |
240 | lib/yang_wrappers.h \ | |
4a121f99 DL |
241 | lib/zassert.h \ |
242 | lib/zclient.h \ | |
243 | lib/zebra.h \ | |
e26aedbe | 244 | lib/logicalrouter.h \ |
0031a6bb | 245 | lib/pbr.h \ |
4a121f99 DL |
246 | # end |
247 | ||
58f8a9ec | 248 | |
70d27c5b DL |
249 | nodist_pkginclude_HEADERS += \ |
250 | lib/route_types.h \ | |
251 | lib/version.h \ | |
252 | # end | |
253 | ||
4a121f99 DL |
254 | noinst_HEADERS += \ |
255 | lib/clippy.h \ | |
256 | lib/log_int.h \ | |
257 | lib/plist_int.h \ | |
5c25bd87 DL |
258 | lib/printf/printfcommon.h \ |
259 | lib/printf/printflocal.h \ | |
4a121f99 DL |
260 | #end |
261 | ||
d6e76257 DL |
262 | # General note about module and module helper library (libfrrsnmp, libfrrzmq) |
263 | # linking: If we're linking libfrr statically into daemons, we *must* remove | |
264 | # libfrr from modules because modules will always link it in dynamically and | |
265 | # thus 2 copies of libfrr will be loaded... hilarity ensues. | |
266 | # | |
267 | # Not linking libfrr into modules should generally work fine because the | |
268 | # executable refers to libfrr either way and the dynamic linker should make | |
269 | # libfrr available to modules. If some OS platform has a dynamic linker that | |
270 | # doesn't do that, libfrr needs to be readded to modules, but _only_ _if_ | |
271 | # it's not linked into daemons statically. | |
272 | ||
4a121f99 DL |
273 | # |
274 | # SNMP support | |
275 | # | |
276 | if SNMP | |
277 | lib_LTLIBRARIES += lib/libfrrsnmp.la | |
278 | endif | |
279 | ||
7aad1594 | 280 | lib_libfrrsnmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu99 |
4a121f99 | 281 | lib_libfrrsnmp_la_LDFLAGS = -version-info 0:0:0 |
d6e76257 | 282 | lib_libfrrsnmp_la_LIBADD = $(SNMP_LIBS) |
4a121f99 DL |
283 | lib_libfrrsnmp_la_SOURCES = \ |
284 | lib/agentx.c \ | |
4a121f99 DL |
285 | lib/snmp.c \ |
286 | # end | |
287 | ||
b6116506 DL |
288 | # |
289 | # ZeroMQ support | |
290 | # | |
291 | if ZEROMQ | |
292 | lib_LTLIBRARIES += lib/libfrrzmq.la | |
293 | pkginclude_HEADERS += lib/frr_zmq.h | |
294 | endif | |
295 | ||
296 | lib_libfrrzmq_la_CFLAGS = $(WERROR) $(ZEROMQ_CFLAGS) | |
297 | lib_libfrrzmq_la_LDFLAGS = -version-info 0:0:0 | |
d6e76257 | 298 | lib_libfrrzmq_la_LIBADD = $(ZEROMQ_LIBS) |
b6116506 DL |
299 | lib_libfrrzmq_la_SOURCES = \ |
300 | lib/frr_zmq.c \ | |
301 | #end | |
302 | ||
5bce33b3 RW |
303 | # |
304 | # Tail-f's ConfD support | |
305 | # | |
306 | if CONFD | |
307 | module_LTLIBRARIES += lib/confd.la | |
308 | endif | |
309 | ||
310 | lib_confd_la_CFLAGS = $(WERROR) $(CONFD_CFLAGS) | |
311 | lib_confd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic | |
fdbd8086 | 312 | lib_confd_la_LIBADD = lib/libfrr.la $(CONFD_LIBS) |
5bce33b3 RW |
313 | lib_confd_la_SOURCES = lib/northbound_confd.c |
314 | ||
a7ca2199 RW |
315 | # |
316 | # Sysrepo support | |
317 | # | |
318 | if SYSREPO | |
319 | module_LTLIBRARIES += lib/sysrepo.la | |
320 | endif | |
321 | ||
fdbd8086 | 322 | lib_sysrepo_la_CFLAGS = $(WERROR) $(SYSREPO_CFLAGS) |
a7ca2199 | 323 | lib_sysrepo_la_LDFLAGS = -avoid-version -module -shared -export-dynamic |
fdbd8086 | 324 | lib_sysrepo_la_LIBADD = lib/libfrr.la $(SYSREPO_LIBS) |
a7ca2199 RW |
325 | lib_sysrepo_la_SOURCES = lib/northbound_sysrepo.c |
326 | ||
ec2ac5f2 RW |
327 | # |
328 | # gRPC northbound plugin | |
329 | # | |
330 | if GRPC | |
331 | module_LTLIBRARIES += lib/grpc.la | |
332 | endif | |
333 | ||
334 | lib_grpc_la_CXXFLAGS = $(WERROR) $(GRPC_CFLAGS) | |
335 | lib_grpc_la_LDFLAGS = -avoid-version -module -shared -export-dynamic | |
336 | lib_grpc_la_LIBADD = lib/libfrr.la grpc/libfrrgrpc_pb.la $(GRPC_LIBS) | |
337 | lib_grpc_la_SOURCES = lib/northbound_grpc.cpp | |
338 | ||
4a121f99 DL |
339 | # |
340 | # CLI utilities | |
341 | # | |
342 | noinst_PROGRAMS += \ | |
4a121f99 DL |
343 | lib/grammar_sandbox \ |
344 | # end | |
345 | ||
89727c8d DL |
346 | if BUILD_CLIPPY |
347 | noinst_PROGRAMS += lib/clippy | |
348 | else | |
a71c5039 DL |
349 | if HOSTTOOLS_CLIPPY |
350 | $(CLIPPY): | |
351 | @$(MAKE) -C $(top_builddir)/hosttools lib/route_types.h lib/clippy | |
352 | endif | |
89727c8d DL |
353 | endif |
354 | ||
4a121f99 DL |
355 | lib_grammar_sandbox_SOURCES = \ |
356 | lib/grammar_sandbox_main.c | |
357 | lib_grammar_sandbox_LDADD = \ | |
358 | lib/libfrr.la | |
359 | ||
dbac691d DL |
360 | lib_clippy_CPPFLAGS = $(AM_CPPFLAGS) -D_GNU_SOURCE -DBUILDING_CLIPPY |
361 | lib_clippy_CFLAGS = $(PYTHON_CFLAGS) | |
4a121f99 | 362 | lib_clippy_LDADD = $(PYTHON_LIBS) |
dbac691d | 363 | lib_clippy_LDFLAGS = -export-dynamic |
4a121f99 DL |
364 | lib_clippy_SOURCES = \ |
365 | lib/clippy.c \ | |
366 | lib/command_graph.c \ | |
367 | lib/command_lex.l \ | |
368 | lib/command_parse.y \ | |
369 | lib/command_py.c \ | |
370 | lib/defun_lex.l \ | |
371 | lib/graph.c \ | |
372 | lib/memory.c \ | |
373 | lib/vector.c \ | |
374 | # end | |
375 | ||
aad24c5b DL |
376 | # (global) clippy rules for all directories |
377 | ||
378 | AM_V_CLIPPY = $(am__v_CLIPPY_$(V)) | |
379 | am__v_CLIPPY_ = $(am__v_CLIPPY_$(AM_DEFAULT_VERBOSITY)) | |
380 | am__v_CLIPPY_0 = @echo " CLIPPY " $@; | |
381 | am__v_CLIPPY_1 = | |
382 | ||
a71c5039 | 383 | CLIPPY_DEPS = $(CLIPPY) $(top_srcdir)/python/clidef.py |
aad24c5b | 384 | |
ec2ac5f2 | 385 | SUFFIXES = _clippy.c .proto .pb-c.c .pb-c.h .pb.h .pb.cc .grpc.pb.cc |
aad24c5b | 386 | .c_clippy.c: |
a71c5039 | 387 | $(AM_V_CLIPPY) $(CLIPPY) $(top_srcdir)/python/clidef.py -o $@ $< |
aad24c5b DL |
388 | |
389 | ## automake's "ylwrap" is a great piece of GNU software... not. | |
390 | .l.c: | |
391 | $(AM_V_LEX)$(am__skiplex) $(LEXCOMPILE) $< | |
392 | .y.c: | |
393 | $(AM_V_YACC)$(am__skipyacc) $(YACCCOMPILE) $< | |
4a121f99 DL |
394 | |
395 | # | |
396 | # generated sources & extra foo | |
397 | # | |
398 | EXTRA_DIST += \ | |
399 | lib/command_lex.h \ | |
70d27c5b | 400 | lib/command_parse.h \ |
4a121f99 | 401 | lib/gitversion.pl \ |
4a121f99 DL |
402 | lib/route_types.pl \ |
403 | lib/route_types.txt \ | |
404 | # end | |
405 | ||
406 | BUILT_SOURCES += \ | |
4a121f99 DL |
407 | lib/gitversion.h \ |
408 | lib/route_types.h \ | |
409 | # end | |
410 | ||
f1b32b2e DL |
411 | ## force route_types.h |
412 | $(lib_clippy_OBJECTS): lib/route_types.h | |
413 | $(lib_libfrr_la_OBJECTS): lib/route_types.h | |
414 | ||
4a121f99 DL |
415 | AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@ |
416 | ||
417 | lib/command_lex.h: lib/command_lex.c | |
418 | @if test ! -f $@; then rm -f "lib/command_lex.c"; else :; fi | |
419 | @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) "lib/command_lex.c"; else :; fi | |
f1b32b2e | 420 | lib/command_lex.lo: lib/command_parse.h |
4a121f99 | 421 | lib/command_parse.lo: lib/command_lex.h |
fdbd8086 DL |
422 | lib/clippy-command_lex.$(OBJEXT): lib/command_parse.h |
423 | lib/clippy-command_parse.$(OBJEXT): lib/command_lex.h | |
f1b32b2e | 424 | lib/lib_clippy-command_lex.$(OBJEXT): lib/command_parse.h |
4a121f99 DL |
425 | lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h |
426 | ||
427 | lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl | |
fdbd8086 | 428 | $(PERL) $(top_srcdir)/lib/route_types.pl < $(top_srcdir)/lib/route_types.txt > $@ |
67cf020d | 429 | DISTCLEANFILES += lib/route_types.h |
4a121f99 DL |
430 | |
431 | if GIT_VERSION | |
432 | # bit of a trick here to always have up-to-date git stamps without triggering | |
433 | # unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always, | |
434 | # but if we use that on gitversion.h it'll ripple through the .c file deps. | |
435 | # (even if gitversion.h's file timestamp doesn't change, make will think it | |
436 | # did, because of .PHONY...) | |
437 | ||
9e53b315 | 438 | PHONY_GITVERSION=lib/gitversion.h.tmp |
4a121f99 DL |
439 | .SILENT: lib/gitversion.h lib/gitversion.h.tmp |
440 | GITH=lib/gitversion.h | |
441 | lib/gitversion.h.tmp: $(top_srcdir)/.git | |
fdbd8086 | 442 | $(PERL) $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp |
4a121f99 | 443 | lib/gitversion.h: lib/gitversion.h.tmp |
bd402424 | 444 | { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH} |
4a121f99 DL |
445 | |
446 | else | |
9e53b315 | 447 | PHONY_GITVERSION=lib/gitversion.h |
4a121f99 DL |
448 | lib/gitversion.h: |
449 | true | |
450 | endif | |
9e53b315 | 451 | .PHONY: $(PHONY_GITVERSION) |