]> git.proxmox.com Git - mirror_frr.git/blame - lib/subdir.am
Merge pull request #2942 from mjstapp/fix_new_atomics
[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 \
b66d022e 38 lib/lib_errors.c \
4a121f99
DL
39 lib/libfrr.c \
40 lib/linklist.c \
41 lib/log.c \
42 lib/md5.c \
43 lib/memory.c \
44 lib/memory_vty.c \
45 lib/module.c \
036fdaad 46 lib/mpls.c \
4a121f99
DL
47 lib/network.c \
48 lib/nexthop.c \
e26aedbe
PG
49 lib/netns_linux.c \
50 lib/netns_other.c \
7ee30f28 51 lib/nexthop_group.c \
4a121f99
DL
52 lib/openbsd-tree.c \
53 lib/pid_output.c \
54 lib/plist.c \
55 lib/pqueue.c \
56 lib/prefix.c \
57 lib/privs.c \
58 lib/ptm_lib.c \
59 lib/qobj.c \
5318d896 60 lib/ringbuf.c \
4a121f99 61 lib/routemap.c \
31bfa062 62 lib/sbuf.c \
4a121f99
DL
63 lib/sha256.c \
64 lib/sigevent.c \
65 lib/skiplist.c \
66 lib/sockopt.c \
67 lib/sockunion.c \
68 lib/spf_backoff.c \
69 lib/srcdest_table.c \
70 lib/stream.c \
71 lib/strlcat.c \
72 lib/strlcpy.c \
73 lib/systemd.c \
74 lib/table.c \
75 lib/termtable.c \
76 lib/thread.c \
77 lib/vector.c \
78 lib/vrf.c \
79 lib/vty.c \
80 lib/wheel.c \
81 lib/workqueue.c \
82 lib/zclient.c \
e26aedbe 83 lib/logicalrouter.c \
4a121f99
DL
84 # end
85
f1b32b2e 86lib/plist_clippy.c: $(CLIPPY_DEPS)
4a121f99 87lib/plist.lo: lib/plist_clippy.c
dba32923
DS
88lib/nexthop_group_clippy.c: $(CLIPPY_DEPS)
89lib/nexthop_group.lo: lib/nexthop_group_clippy.c
4a121f99
DL
90
91pkginclude_HEADERS += \
92 lib/bfd.h \
93 lib/bitfield.h \
94 lib/buffer.h \
95 lib/checksum.h \
96 lib/command.h \
97 lib/command_graph.h \
98 lib/command_match.h \
de1a880c 99 lib/compiler.h \
4a121f99 100 lib/csv.h \
aea03ad6 101 lib/debug.h \
4a121f99
DL
102 lib/distribute.h \
103 lib/event_counter.h \
3155489a 104 lib/ferr.h \
4a121f99
DL
105 lib/fifo.h \
106 lib/filter.h \
cd85bc2e 107 lib/freebsd-queue.h \
4a121f99
DL
108 lib/frr_pthread.h \
109 lib/frratomic.h \
fe011935 110 lib/frrstr.h \
4a121f99
DL
111 lib/getopt.h \
112 lib/graph.h \
113 lib/hash.h \
114 lib/hook.h \
115 lib/if.h \
116 lib/if_rmap.h \
117 lib/imsg.h \
118 lib/ipaddr.h \
119 lib/jhash.h \
120 lib/json.h \
121 lib/keychain.h \
b66d022e 122 lib/lib_errors.h \
4a121f99
DL
123 lib/libfrr.h \
124 lib/libospf.h \
125 lib/linklist.h \
126 lib/log.h \
127 lib/md5.h \
128 lib/memory.h \
129 lib/memory_vty.h \
130 lib/module.h \
131 lib/monotime.h \
132 lib/mpls.h \
133 lib/network.h \
134 lib/nexthop.h \
7ee30f28 135 lib/nexthop_group.h \
4a121f99
DL
136 lib/ns.h \
137 lib/openbsd-queue.h \
138 lib/openbsd-tree.h \
139 lib/plist.h \
140 lib/pqueue.h \
141 lib/prefix.h \
142 lib/privs.h \
143 lib/ptm_lib.h \
6833ae01 144 lib/pw.h \
4a121f99 145 lib/qobj.h \
cd85bc2e 146 lib/queue.h \
5318d896 147 lib/ringbuf.h \
4a121f99 148 lib/routemap.h \
31bfa062 149 lib/sbuf.h \
4a121f99
DL
150 lib/sha256.h \
151 lib/sigevent.h \
152 lib/skiplist.h \
4a121f99
DL
153 lib/sockopt.h \
154 lib/sockunion.h \
155 lib/spf_backoff.h \
156 lib/srcdest_table.h \
157 lib/stream.h \
158 lib/systemd.h \
159 lib/table.h \
160 lib/termtable.h \
161 lib/thread.h \
162 lib/vector.h \
4a121f99
DL
163 lib/vlan.h \
164 lib/vrf.h \
165 lib/vrf_int.h \
166 lib/vty.h \
167 lib/vxlan.h \
168 lib/wheel.h \
169 lib/workqueue.h \
170 lib/zassert.h \
171 lib/zclient.h \
172 lib/zebra.h \
e26aedbe 173 lib/logicalrouter.h \
0031a6bb 174 lib/pbr.h \
4a121f99
DL
175 # end
176
58f8a9ec 177
70d27c5b
DL
178nodist_pkginclude_HEADERS += \
179 lib/route_types.h \
180 lib/version.h \
181 # end
182
4a121f99
DL
183noinst_HEADERS += \
184 lib/clippy.h \
185 lib/log_int.h \
186 lib/plist_int.h \
187 #end
188
189#
190# SNMP support
191#
192if SNMP
193lib_LTLIBRARIES += lib/libfrrsnmp.la
194endif
195
7aad1594 196lib_libfrrsnmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS) -std=gnu99
4a121f99
DL
197lib_libfrrsnmp_la_LDFLAGS = -version-info 0:0:0
198lib_libfrrsnmp_la_LIBADD = lib/libfrr.la $(SNMP_LIBS)
199lib_libfrrsnmp_la_SOURCES = \
200 lib/agentx.c \
4a121f99
DL
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