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