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