]> git.proxmox.com Git - mirror_frr.git/blame - lib/subdir.am
Merge pull request #891 from Jafaral/portability
[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 \
126 lib/qobj.h \
127 lib/route_types.h \
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 \
144 lib/version.h \
145 lib/vlan.h \
146 lib/vrf.h \
147 lib/vrf_int.h \
148 lib/vty.h \
149 lib/vxlan.h \
150 lib/wheel.h \
151 lib/workqueue.h \
152 lib/zassert.h \
153 lib/zclient.h \
154 lib/zebra.h \
155 # end
156
157noinst_HEADERS += \
158 lib/clippy.h \
159 lib/log_int.h \
160 lib/plist_int.h \
161 #end
162
163#
164# SNMP support
165#
166if SNMP
167lib_LTLIBRARIES += lib/libfrrsnmp.la
168endif
169
170lib_libfrrsnmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
171lib_libfrrsnmp_la_LDFLAGS = -version-info 0:0:0
172lib_libfrrsnmp_la_LIBADD = lib/libfrr.la $(SNMP_LIBS)
173lib_libfrrsnmp_la_SOURCES = \
174 lib/agentx.c \
175 lib/smux.c \
176 lib/snmp.c \
177 # end
178
179#
180# CLI utilities
181#
182noinst_PROGRAMS += \
183 lib/clippy \
184 lib/grammar_sandbox \
185 # end
186
187lib_grammar_sandbox_SOURCES = \
188 lib/grammar_sandbox_main.c
189lib_grammar_sandbox_LDADD = \
190 lib/libfrr.la
191
192lib_clippy_CPPFLAGS = -D_GNU_SOURCE -I$(top_srcdir)/lib
193lib_clippy_CFLAGS = $(PYTHON_CFLAGS)
194lib_clippy_LDADD = $(PYTHON_LIBS)
195lib_clippy_SOURCES = \
196 lib/clippy.c \
197 lib/command_graph.c \
198 lib/command_lex.l \
199 lib/command_parse.y \
200 lib/command_py.c \
201 lib/defun_lex.l \
202 lib/graph.c \
203 lib/memory.c \
204 lib/vector.c \
205 # end
206
207
208#
209# generated sources & extra foo
210#
211EXTRA_DIST += \
212 lib/command_lex.h \
213 lib/gitversion.pl \
214 lib/queue.h \
215 lib/route_types.pl \
216 lib/route_types.txt \
217 # end
218
219BUILT_SOURCES += \
220 lib/command_lex.h \
221 lib/command_parse.h \
222 lib/gitversion.h \
223 lib/route_types.h \
224 # end
225
f1b32b2e
DL
226## force route_types.h
227$(lib_clippy_OBJECTS): lib/route_types.h
228$(lib_libfrr_la_OBJECTS): lib/route_types.h
229
4a121f99
DL
230AM_YFLAGS = -d -Dapi.prefix=@BISON_OPENBRACE@cmd_yy@BISON_CLOSEBRACE@ @BISON_VERBOSE@
231
232lib/command_lex.h: lib/command_lex.c
233 @if test ! -f $@; then rm -f "lib/command_lex.c"; else :; fi
234 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) "lib/command_lex.c"; else :; fi
f1b32b2e 235lib/command_lex.lo: lib/command_parse.h
4a121f99 236lib/command_parse.lo: lib/command_lex.h
f1b32b2e 237lib/lib_clippy-command_lex.$(OBJEXT): lib/command_parse.h
4a121f99
DL
238lib/lib_clippy-command_parse.$(OBJEXT): lib/command_lex.h
239
240lib/route_types.h: $(top_srcdir)/lib/route_types.txt $(top_srcdir)/lib/route_types.pl
241 @PERL@ $(top_srcdir)/lib/route_types.pl < $(top_srcdir)/lib/route_types.txt > $@
242
243if GIT_VERSION
244# bit of a trick here to always have up-to-date git stamps without triggering
245# unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
246# but if we use that on gitversion.h it'll ripple through the .c file deps.
247# (even if gitversion.h's file timestamp doesn't change, make will think it
248# did, because of .PHONY...)
249
250.PHONY: lib/gitversion.h.tmp
251.SILENT: lib/gitversion.h lib/gitversion.h.tmp
252GITH=lib/gitversion.h
253lib/gitversion.h.tmp: $(top_srcdir)/.git
254 @PERL@ $(top_srcdir)/lib/gitversion.pl $(top_srcdir) > ${GITH}.tmp
255lib/gitversion.h: lib/gitversion.h.tmp
bd402424 256 { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp ${GITH}.tmp ${GITH}
4a121f99
DL
257
258else
259.PHONY: lib/gitversion.h
260lib/gitversion.h:
261 true
262endif