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