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