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