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