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