]> git.proxmox.com Git - mirror_frr.git/blame - lib/subdir.am
lib: inline route_node_lock()/route_node_unlock()
[mirror_frr.git] / lib / subdir.am
CommitLineData
4a121f99
DL
1#
2# libfrr
3#
4lib_LTLIBRARIES += lib/libfrr.la
5lib_libfrr_la_LDFLAGS = -version-info 0:0:0
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 \
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 \
31bfa062 54 lib/sbuf.c \
4a121f99
DL
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
f1b32b2e 77lib/plist_clippy.c: $(CLIPPY_DEPS)
4a121f99
DL
78lib/plist.lo: lib/plist_clippy.c
79
80pkginclude_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/csv.h \
89 lib/distribute.h \
90 lib/event_counter.h \
91 lib/fifo.h \
92 lib/filter.h \
93 lib/frr_pthread.h \
94 lib/frratomic.h \
95 lib/getopt.h \
96 lib/graph.h \
97 lib/hash.h \
98 lib/hook.h \
99 lib/if.h \
100 lib/if_rmap.h \
101 lib/imsg.h \
102 lib/ipaddr.h \
103 lib/jhash.h \
104 lib/json.h \
105 lib/keychain.h \
106 lib/libfrr.h \
107 lib/libospf.h \
108 lib/linklist.h \
109 lib/log.h \
110 lib/md5.h \
111 lib/memory.h \
112 lib/memory_vty.h \
113 lib/module.h \
114 lib/monotime.h \
115 lib/mpls.h \
116 lib/network.h \
117 lib/nexthop.h \
118 lib/ns.h \
119 lib/openbsd-queue.h \
120 lib/openbsd-tree.h \
121 lib/plist.h \
122 lib/pqueue.h \
123 lib/prefix.h \
124 lib/privs.h \
125 lib/ptm_lib.h \
6833ae01 126 lib/pw.h \
4a121f99 127 lib/qobj.h \
4a121f99 128 lib/routemap.h \
31bfa062 129 lib/sbuf.h \
4a121f99
DL
130 lib/sha256.h \
131 lib/sigevent.h \
132 lib/skiplist.h \
133 lib/smux.h \
134 lib/sockopt.h \
135 lib/sockunion.h \
136 lib/spf_backoff.h \
137 lib/srcdest_table.h \
138 lib/stream.h \
139 lib/systemd.h \
140 lib/table.h \
141 lib/termtable.h \
142 lib/thread.h \
143 lib/vector.h \
4a121f99
DL
144 lib/vlan.h \
145 lib/vrf.h \
146 lib/vrf_int.h \
147 lib/vty.h \
148 lib/vxlan.h \
149 lib/wheel.h \
150 lib/workqueue.h \
151 lib/zassert.h \
152 lib/zclient.h \
153 lib/zebra.h \
154 # end
155
70d27c5b
DL
156nodist_pkginclude_HEADERS += \
157 lib/route_types.h \
158 lib/version.h \
159 # end
160
4a121f99
DL
161noinst_HEADERS += \
162 lib/clippy.h \
163 lib/log_int.h \
164 lib/plist_int.h \
165 #end
166
167#
168# SNMP support
169#
170if SNMP
171lib_LTLIBRARIES += lib/libfrrsnmp.la
172endif
173
174lib_libfrrsnmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
175lib_libfrrsnmp_la_LDFLAGS = -version-info 0:0:0
176lib_libfrrsnmp_la_LIBADD = lib/libfrr.la $(SNMP_LIBS)
177lib_libfrrsnmp_la_SOURCES = \
178 lib/agentx.c \
179 lib/smux.c \
180 lib/snmp.c \
181 # end
182
183#
184# CLI utilities
185#
186noinst_PROGRAMS += \
4a121f99
DL
187 lib/grammar_sandbox \
188 # end
189
89727c8d
DL
190if BUILD_CLIPPY
191noinst_PROGRAMS += lib/clippy
192else
193$(HOSTTOOLS)lib/clippy:
194 @$(MAKE) -C $(top_builddir)/$(HOSTTOOLS) lib/route_types.h lib/clippy
195endif
196
4a121f99
DL
197lib_grammar_sandbox_SOURCES = \
198 lib/grammar_sandbox_main.c
199lib_grammar_sandbox_LDADD = \
200 lib/libfrr.la
201
89727c8d 202lib_clippy_CPPFLAGS = $(AM_CPPFLAGS) -D_GNU_SOURCE
4a121f99
DL
203lib_clippy_CFLAGS = $(PYTHON_CFLAGS)
204lib_clippy_LDADD = $(PYTHON_LIBS)
205lib_clippy_SOURCES = \
206 lib/clippy.c \
207 lib/command_graph.c \
208 lib/command_lex.l \
209 lib/command_parse.y \
210 lib/command_py.c \
211 lib/defun_lex.l \
212 lib/graph.c \
213 lib/memory.c \
214 lib/vector.c \
215 # end
216
217
218#
219# generated sources & extra foo
220#
221EXTRA_DIST += \
222 lib/command_lex.h \
70d27c5b 223 lib/command_parse.h \
4a121f99
DL
224 lib/gitversion.pl \
225 lib/queue.h \
226 lib/route_types.pl \
227 lib/route_types.txt \
228 # end
229
230BUILT_SOURCES += \
4a121f99
DL
231 lib/gitversion.h \
232 lib/route_types.h \
233 # end
234
f1b32b2e
DL
235## force route_types.h
236$(lib_clippy_OBJECTS): lib/route_types.h
237$(lib_libfrr_la_OBJECTS): lib/route_types.h
238
4a121f99
DL
239AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@
240
241lib/command_lex.h: lib/command_lex.c
242 @if test ! -f $@; then rm -f "lib/command_lex.c"; else :; fi
243 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) "lib/command_lex.c"; else :; fi
f1b32b2e 244lib/command_lex.lo: lib/command_parse.h
4a121f99 245lib/command_parse.lo: lib/command_lex.h
f1b32b2e 246lib/lib_clippy-command_lex.$(OBJEXT): lib/command_parse.h
4a121f99
DL
247lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h
248
249lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl
250 @PERL@ $(top_srcdir)/lib/route_types.pl < $(top_srcdir)/lib/route_types.txt > $@
251
252if GIT_VERSION
253# bit of a trick here to always have up-to-date git stamps without triggering
254# unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
255# but if we use that on gitversion.h it'll ripple through the .c file deps.
256# (even if gitversion.h's file timestamp doesn't change, make will think it
257# did, because of .PHONY...)
258
259.PHONY: lib/gitversion.h.tmp
260.SILENT: lib/gitversion.h lib/gitversion.h.tmp
261GITH=lib/gitversion.h
262lib/gitversion.h.tmp: $(top_srcdir)/.git
263 @PERL@ $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp
264lib/gitversion.h: lib/gitversion.h.tmp
bd402424 265 { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH}
4a121f99
DL
266
267else
268.PHONY: lib/gitversion.h
269lib/gitversion.h:
270 true
271endif