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