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