]> git.proxmox.com Git - mirror_frr.git/blob - lib/subdir.am
build: move vtysh & manpage listings to subdir.am
[mirror_frr.git] / lib / subdir.am
1 #
2 # libfrr
3 #
4 lib_LTLIBRARIES += lib/libfrr.la
5 lib_libfrr_la_LDFLAGS = -version-info 0:0:0
6 lib_libfrr_la_LIBADD = @LIBCAP@
7
8 lib_libfrr_la_SOURCES = \
9 lib/agg_table.c \
10 lib/bfd.c \
11 lib/buffer.c \
12 lib/checksum.c \
13 lib/command.c \
14 lib/command_graph.c \
15 lib/command_lex.l \
16 lib/command_match.c \
17 lib/command_parse.y \
18 lib/csv.c \
19 lib/debug.c \
20 lib/distribute.c \
21 lib/event_counter.c \
22 lib/ferr.c \
23 lib/filter.c \
24 lib/frr_pthread.c \
25 lib/frrstr.c \
26 lib/getopt.c \
27 lib/getopt1.c \
28 lib/grammar_sandbox.c \
29 lib/graph.c \
30 lib/hash.c \
31 lib/hook.c \
32 lib/if.c \
33 lib/if_rmap.c \
34 lib/imsg-buffer.c \
35 lib/imsg.c \
36 lib/jhash.c \
37 lib/json.c \
38 lib/keychain.c \
39 lib/lib_errors.c \
40 lib/libfrr.c \
41 lib/linklist.c \
42 lib/log.c \
43 lib/md5.c \
44 lib/memory.c \
45 lib/memory_vty.c \
46 lib/module.c \
47 lib/mpls.c \
48 lib/network.c \
49 lib/nexthop.c \
50 lib/netns_linux.c \
51 lib/netns_other.c \
52 lib/nexthop_group.c \
53 lib/openbsd-tree.c \
54 lib/pid_output.c \
55 lib/plist.c \
56 lib/pqueue.c \
57 lib/prefix.c \
58 lib/privs.c \
59 lib/ptm_lib.c \
60 lib/qobj.c \
61 lib/ringbuf.c \
62 lib/routemap.c \
63 lib/sbuf.c \
64 lib/sha256.c \
65 lib/sigevent.c \
66 lib/skiplist.c \
67 lib/sockopt.c \
68 lib/sockunion.c \
69 lib/spf_backoff.c \
70 lib/srcdest_table.c \
71 lib/stream.c \
72 lib/strlcat.c \
73 lib/strlcpy.c \
74 lib/systemd.c \
75 lib/table.c \
76 lib/termtable.c \
77 lib/thread.c \
78 lib/vector.c \
79 lib/vrf.c \
80 lib/vty.c \
81 lib/wheel.c \
82 lib/workqueue.c \
83 lib/zclient.c \
84 lib/logicalrouter.c \
85 # end
86
87 vtysh_scan += \
88 $(top_srcdir)/lib/distribute.c \
89 $(top_srcdir)/lib/filter.c \
90 $(top_srcdir)/lib/if.c \
91 $(top_srcdir)/lib/if_rmap.c \
92 $(top_srcdir)/lib/keychain.c \
93 $(top_srcdir)/lib/logicalrouter.c \
94 $(top_srcdir)/lib/nexthop_group.c \
95 $(top_srcdir)/lib/plist.c \
96 $(top_srcdir)/lib/routemap.c \
97 $(top_srcdir)/lib/vrf.c \
98 $(top_srcdir)/lib/vty.c \
99 # end
100 # can be loaded as DSO - always include for vtysh
101 vtysh_scan += $(top_srcdir)/lib/agentx.c
102
103 lib/plist_clippy.c: $(CLIPPY_DEPS)
104 lib/plist.lo: lib/plist_clippy.c
105 lib/nexthop_group_clippy.c: $(CLIPPY_DEPS)
106 lib/nexthop_group.lo: lib/nexthop_group_clippy.c
107
108 pkginclude_HEADERS += \
109 lib/agg_table.h \
110 lib/bfd.h \
111 lib/bitfield.h \
112 lib/buffer.h \
113 lib/checksum.h \
114 lib/command.h \
115 lib/command_graph.h \
116 lib/command_match.h \
117 lib/compiler.h \
118 lib/csv.h \
119 lib/debug.h \
120 lib/distribute.h \
121 lib/event_counter.h \
122 lib/ferr.h \
123 lib/fifo.h \
124 lib/filter.h \
125 lib/freebsd-queue.h \
126 lib/frr_pthread.h \
127 lib/frratomic.h \
128 lib/frrstr.h \
129 lib/getopt.h \
130 lib/graph.h \
131 lib/hash.h \
132 lib/hook.h \
133 lib/if.h \
134 lib/if_rmap.h \
135 lib/imsg.h \
136 lib/ipaddr.h \
137 lib/jhash.h \
138 lib/json.h \
139 lib/keychain.h \
140 lib/lib_errors.h \
141 lib/libfrr.h \
142 lib/libospf.h \
143 lib/linklist.h \
144 lib/log.h \
145 lib/md5.h \
146 lib/memory.h \
147 lib/memory_vty.h \
148 lib/module.h \
149 lib/monotime.h \
150 lib/mpls.h \
151 lib/network.h \
152 lib/nexthop.h \
153 lib/nexthop_group.h \
154 lib/ns.h \
155 lib/openbsd-queue.h \
156 lib/openbsd-tree.h \
157 lib/plist.h \
158 lib/pqueue.h \
159 lib/prefix.h \
160 lib/privs.h \
161 lib/ptm_lib.h \
162 lib/pw.h \
163 lib/qobj.h \
164 lib/queue.h \
165 lib/ringbuf.h \
166 lib/routemap.h \
167 lib/sbuf.h \
168 lib/sha256.h \
169 lib/sigevent.h \
170 lib/skiplist.h \
171 lib/smux.h \
172 lib/sockopt.h \
173 lib/sockunion.h \
174 lib/spf_backoff.h \
175 lib/srcdest_table.h \
176 lib/stream.h \
177 lib/systemd.h \
178 lib/table.h \
179 lib/termtable.h \
180 lib/thread.h \
181 lib/vector.h \
182 lib/vlan.h \
183 lib/vrf.h \
184 lib/vrf_int.h \
185 lib/vty.h \
186 lib/vxlan.h \
187 lib/wheel.h \
188 lib/workqueue.h \
189 lib/zassert.h \
190 lib/zclient.h \
191 lib/zebra.h \
192 lib/logicalrouter.h \
193 lib/pbr.h \
194 # end
195
196
197 nodist_pkginclude_HEADERS += \
198 lib/route_types.h \
199 lib/version.h \
200 # end
201
202 noinst_HEADERS += \
203 lib/clippy.h \
204 lib/log_int.h \
205 lib/plist_int.h \
206 #end
207
208 #
209 # SNMP support
210 #
211 if SNMP
212 lib_LTLIBRARIES += lib/libfrrsnmp.la
213 endif
214
215 lib_libfrrsnmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu99
216 lib_libfrrsnmp_la_LDFLAGS = -version-info 0:0:0
217 lib_libfrrsnmp_la_LIBADD = lib/libfrr.la $(SNMP_LIBS)
218 lib_libfrrsnmp_la_SOURCES = \
219 lib/agentx.c \
220 lib/snmp.c \
221 # end
222
223 #
224 # ZeroMQ support
225 #
226 if ZEROMQ
227 lib_LTLIBRARIES += lib/libfrrzmq.la
228 pkginclude_HEADERS += lib/frr_zmq.h
229 endif
230
231 lib_libfrrzmq_la_CFLAGS = $(WERROR) $(ZEROMQ_CFLAGS)
232 lib_libfrrzmq_la_LDFLAGS = -version-info 0:0:0
233 lib_libfrrzmq_la_LIBADD = lib/libfrr.la $(ZEROMQ_LIBS)
234 lib_libfrrzmq_la_SOURCES = \
235 lib/frr_zmq.c \
236 #end
237
238 #
239 # CLI utilities
240 #
241 noinst_PROGRAMS += \
242 lib/grammar_sandbox \
243 # end
244
245 if BUILD_CLIPPY
246 noinst_PROGRAMS += lib/clippy
247 else
248 $(HOSTTOOLS)lib/clippy:
249 @$(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/route_types.h lib/clippy
250 endif
251
252 lib_grammar_sandbox_SOURCES = \
253 lib/grammar_sandbox_main.c
254 lib_grammar_sandbox_LDADD = \
255 lib/libfrr.la
256
257 lib_clippy_CPPFLAGS = $(AM_CPPFLAGS) -D_GNU_SOURCE -DBUILDING_CLIPPY @SAN_CLIPPY_FLAGS@
258 lib_clippy_CFLAGS = $(PYTHON_CFLAGS) @SAN_CLIPPY_FLAGS@
259 lib_clippy_LDADD = $(PYTHON_LIBS)
260 lib_clippy_SOURCES = \
261 lib/clippy.c \
262 lib/command_graph.c \
263 lib/command_lex.l \
264 lib/command_parse.y \
265 lib/command_py.c \
266 lib/defun_lex.l \
267 lib/graph.c \
268 lib/memory.c \
269 lib/vector.c \
270 # end
271
272 # (global) clippy rules for all directories
273
274 AM_V_CLIPPY = $(am__v_CLIPPY_$(V))
275 am__v_CLIPPY_ = $(am__v_CLIPPY_$(AM_DEFAULT_VERBOSITY))
276 am__v_CLIPPY_0 = @echo " CLIPPY " $@;
277 am__v_CLIPPY_1 =
278
279 CLIPPY_DEPS = $(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py
280
281 SUFFIXES = _clippy.c .proto .pb-c.c .pb-c.h .pb.h
282 .c_clippy.c:
283 @{ test -x $(top_builddir)/$(HOSTTOOLS)lib/clippy || \
284 $(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/clippy; }
285 $(AM_V_CLIPPY) $(top_builddir)/$(HOSTTOOLS)lib/clippy $(top_srcdir)/python/clidef.py -o $@ $<
286
287 ## automake's "ylwrap" is a great piece of GNU software... not.
288 .l.c:
289 $(AM_V_LEX)$(am__skiplex) $(LEXCOMPILE) $<
290 .y.c:
291 $(AM_V_YACC)$(am__skipyacc) $(YACCCOMPILE) $<
292
293 #
294 # generated sources & extra foo
295 #
296 EXTRA_DIST += \
297 lib/command_lex.h \
298 lib/command_parse.h \
299 lib/gitversion.pl \
300 lib/route_types.pl \
301 lib/route_types.txt \
302 # end
303
304 BUILT_SOURCES += \
305 lib/gitversion.h \
306 lib/route_types.h \
307 # end
308
309 ## force route_types.h
310 $(lib_clippy_OBJECTS): lib/route_types.h
311 $(lib_libfrr_la_OBJECTS): lib/route_types.h
312
313 AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@
314
315 lib/command_lex.h: lib/command_lex.c
316 @if test ! -f $@; then rm -f "lib/command_lex.c"; else :; fi
317 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) "lib/command_lex.c"; else :; fi
318 lib/command_lex.lo: lib/command_parse.h
319 lib/command_parse.lo: lib/command_lex.h
320 lib/lib_clippy-command_lex.$(OBJEXT): lib/command_parse.h
321 lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h
322
323 lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl
324 @PERL@ $(top_srcdir)/lib/route_types.pl < $(top_srcdir)/lib/route_types.txt > $@
325
326 if GIT_VERSION
327 # bit of a trick here to always have up-to-date git stamps without triggering
328 # unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
329 # but if we use that on gitversion.h it'll ripple through the .c file deps.
330 # (even if gitversion.h's file timestamp doesn't change, make will think it
331 # did, because of .PHONY...)
332
333 PHONY_GITVERSION=lib/gitversion.h.tmp
334 .SILENT: lib/gitversion.h lib/gitversion.h.tmp
335 GITH=lib/gitversion.h
336 lib/gitversion.h.tmp: $(top_srcdir)/.git
337 @PERL@ $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp
338 lib/gitversion.h: lib/gitversion.h.tmp
339 { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH}
340
341 else
342 PHONY_GITVERSION=lib/gitversion.h
343 lib/gitversion.h:
344 true
345 endif
346 .PHONY: $(PHONY_GITVERSION)