]>
Commit | Line | Data |
---|---|---|
95974447 | 1 | # Copyright (C) 2009, 2010, 2011, 2012 Nicira Networks, Inc. |
a14bc59f BP |
2 | # |
3 | # Copying and distribution of this file, with or without modification, | |
4 | # are permitted in any medium without royalty provided the copyright | |
5 | # notice and this notice are preserved. This file is offered as-is, | |
6 | # without warranty of any kind. | |
7 | ||
064af421 BP |
8 | noinst_LIBRARIES += lib/libopenvswitch.a |
9 | ||
10 | lib_libopenvswitch_a_SOURCES = \ | |
d918d9d1 BP |
11 | lib/aes128.c \ |
12 | lib/aes128.h \ | |
3b6a2571 EJ |
13 | lib/autopath.c \ |
14 | lib/autopath.h \ | |
064af421 BP |
15 | lib/backtrace.c \ |
16 | lib/backtrace.h \ | |
17 | lib/bitmap.c \ | |
18 | lib/bitmap.h \ | |
f620b43a BP |
19 | lib/bond.c \ |
20 | lib/bond.h \ | |
daff3353 EJ |
21 | lib/bundle.c \ |
22 | lib/bundle.h \ | |
10a24935 | 23 | lib/byte-order.h \ |
1c617a49 BP |
24 | lib/byteq.c \ |
25 | lib/byteq.h \ | |
b31bcf60 EJ |
26 | lib/cfm.c \ |
27 | lib/cfm.h \ | |
064af421 BP |
28 | lib/classifier.c \ |
29 | lib/classifier.h \ | |
30 | lib/command-line.c \ | |
31 | lib/command-line.h \ | |
32 | lib/compiler.h \ | |
33 | lib/coverage.c \ | |
34 | lib/coverage.h \ | |
064af421 BP |
35 | lib/csum.c \ |
36 | lib/csum.h \ | |
37 | lib/daemon.c \ | |
38 | lib/daemon.h \ | |
195c8086 | 39 | lib/dhcp.h \ |
614c4892 BP |
40 | lib/dummy.c \ |
41 | lib/dummy.h \ | |
064af421 | 42 | lib/dhparams.h \ |
064af421 | 43 | lib/dirs.h \ |
72865317 | 44 | lib/dpif-netdev.c \ |
96fba48f BP |
45 | lib/dpif-provider.h \ |
46 | lib/dpif.c \ | |
47 | lib/dpif.h \ | |
95974447 BP |
48 | lib/heap.c \ |
49 | lib/heap.h \ | |
064af421 BP |
50 | lib/dynamic-string.c \ |
51 | lib/dynamic-string.h \ | |
e251c8d0 BP |
52 | lib/entropy.c \ |
53 | lib/entropy.h \ | |
064af421 BP |
54 | lib/fatal-signal.c \ |
55 | lib/fatal-signal.h \ | |
064af421 BP |
56 | lib/flow.c \ |
57 | lib/flow.h \ | |
58 | lib/hash.c \ | |
59 | lib/hash.h \ | |
60 | lib/hmap.c \ | |
61 | lib/hmap.h \ | |
f4ac3fc1 BP |
62 | lib/hmapx.c \ |
63 | lib/hmapx.h \ | |
f38b84ea BP |
64 | lib/json.c \ |
65 | lib/json.h \ | |
f2129093 BP |
66 | lib/jsonrpc.c \ |
67 | lib/jsonrpc.h \ | |
6aa74308 EJ |
68 | lib/lacp.c \ |
69 | lib/lacp.h \ | |
064af421 BP |
70 | lib/leak-checker.c \ |
71 | lib/leak-checker.h \ | |
75a75043 BP |
72 | lib/learn.c \ |
73 | lib/learn.h \ | |
064af421 BP |
74 | lib/learning-switch.c \ |
75 | lib/learning-switch.h \ | |
76 | lib/list.c \ | |
77 | lib/list.h \ | |
ac718c9d BP |
78 | lib/lockfile.c \ |
79 | lib/lockfile.h \ | |
064af421 BP |
80 | lib/mac-learning.c \ |
81 | lib/mac-learning.h \ | |
6a885fd0 BP |
82 | lib/meta-flow.c \ |
83 | lib/meta-flow.h \ | |
53ddd40a BP |
84 | lib/multipath.c \ |
85 | lib/multipath.h \ | |
614c4892 | 86 | lib/netdev-dummy.c \ |
5146acb1 | 87 | lib/netdev-provider.h \ |
064af421 BP |
88 | lib/netdev.c \ |
89 | lib/netdev.h \ | |
9c8e276e | 90 | lib/netflow.h \ |
2fe27d5a BP |
91 | lib/netlink.c \ |
92 | lib/netlink.h \ | |
09246b99 BP |
93 | lib/nx-match.c \ |
94 | lib/nx-match.h \ | |
064af421 BP |
95 | lib/odp-util.c \ |
96 | lib/odp-util.h \ | |
dc4762ed BP |
97 | lib/ofp-errors.c \ |
98 | lib/ofp-errors.h \ | |
f22716dc JP |
99 | lib/ofp-parse.c \ |
100 | lib/ofp-parse.h \ | |
064af421 BP |
101 | lib/ofp-print.c \ |
102 | lib/ofp-print.h \ | |
fa37b408 | 103 | lib/ofp-util.c \ |
e23ae585 | 104 | lib/ofp-util.def \ |
fa37b408 | 105 | lib/ofp-util.h \ |
064af421 BP |
106 | lib/ofpbuf.c \ |
107 | lib/ofpbuf.h \ | |
f85f8ebb BP |
108 | lib/ovsdb-data.c \ |
109 | lib/ovsdb-data.h \ | |
110 | lib/ovsdb-error.c \ | |
111 | lib/ovsdb-error.h \ | |
c3bb4bd7 BP |
112 | lib/ovsdb-idl-provider.h \ |
113 | lib/ovsdb-idl.c \ | |
114 | lib/ovsdb-idl.h \ | |
f85f8ebb BP |
115 | lib/ovsdb-parser.c \ |
116 | lib/ovsdb-parser.h \ | |
117 | lib/ovsdb-types.c \ | |
118 | lib/ovsdb-types.h \ | |
b9e8b45a | 119 | lib/packets.c \ |
064af421 BP |
120 | lib/packets.h \ |
121 | lib/pcap.c \ | |
122 | lib/pcap.h \ | |
123 | lib/poll-loop.c \ | |
124 | lib/poll-loop.h \ | |
064af421 BP |
125 | lib/process.c \ |
126 | lib/process.h \ | |
064af421 BP |
127 | lib/random.c \ |
128 | lib/random.h \ | |
129 | lib/rconn.c \ | |
130 | lib/rconn.h \ | |
3ed497fc BP |
131 | lib/reconnect.c \ |
132 | lib/reconnect.h \ | |
064af421 BP |
133 | lib/sat-math.h \ |
134 | lib/sha1.c \ | |
135 | lib/sha1.h \ | |
136 | lib/shash.c \ | |
137 | lib/shash.h \ | |
138 | lib/signals.c \ | |
139 | lib/signals.h \ | |
140 | lib/socket-util.c \ | |
141 | lib/socket-util.h \ | |
f85f8ebb BP |
142 | lib/sort.c \ |
143 | lib/sort.h \ | |
f391294f BP |
144 | lib/sset.c \ |
145 | lib/sset.h \ | |
829a7d02 JP |
146 | lib/stp.c \ |
147 | lib/stp.h \ | |
c34b65c7 BP |
148 | lib/stream-fd.c \ |
149 | lib/stream-fd.h \ | |
150 | lib/stream-provider.h \ | |
9467fe62 | 151 | lib/stream-ssl.h \ |
c34b65c7 BP |
152 | lib/stream-tcp.c \ |
153 | lib/stream-unix.c \ | |
154 | lib/stream.c \ | |
155 | lib/stream.h \ | |
cc01d0bb BP |
156 | lib/stress.c \ |
157 | lib/stress.h \ | |
71d7c22f | 158 | lib/string.c \ |
59462465 | 159 | lib/string.h \ |
064af421 BP |
160 | lib/svec.c \ |
161 | lib/svec.h \ | |
3a3eb9da BP |
162 | lib/table.c \ |
163 | lib/table.h \ | |
064af421 BP |
164 | lib/tag.c \ |
165 | lib/tag.h \ | |
8650b075 EJ |
166 | lib/timer.c \ |
167 | lib/timer.h \ | |
064af421 BP |
168 | lib/timeval.c \ |
169 | lib/timeval.h \ | |
170 | lib/type-props.h \ | |
afa3a931 | 171 | lib/unaligned.h \ |
f38b84ea BP |
172 | lib/unicode.c \ |
173 | lib/unicode.h \ | |
fa0361b7 GG |
174 | lib/unixctl.c \ |
175 | lib/unixctl.h \ | |
064af421 BP |
176 | lib/util.c \ |
177 | lib/util.h \ | |
fa0361b7 GG |
178 | lib/uuid.c \ |
179 | lib/uuid.h \ | |
064af421 BP |
180 | lib/valgrind.h \ |
181 | lib/vconn-provider.h \ | |
064af421 | 182 | lib/vconn-stream.c \ |
064af421 BP |
183 | lib/vconn.c \ |
184 | lib/vconn.h \ | |
0fb7b915 BP |
185 | lib/vlan-bitmap.c \ |
186 | lib/vlan-bitmap.h \ | |
025e874a BP |
187 | lib/vlandev.c \ |
188 | lib/vlandev.h \ | |
064af421 | 189 | lib/vlog.c \ |
6e037e3c EJ |
190 | lib/vlog.h \ |
191 | lib/vswitch-idl.c \ | |
192 | lib/vswitch-idl.h | |
193 | ||
424d1282 BP |
194 | nodist_lib_libopenvswitch_a_SOURCES = \ |
195 | lib/dirs.c | |
196 | CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES) | |
064af421 | 197 | |
c72e245a BP |
198 | noinst_LIBRARIES += lib/libsflow.a |
199 | lib_libsflow_a_SOURCES = \ | |
200 | lib/sflow_api.h \ | |
201 | lib/sflow.h \ | |
202 | lib/sflow_agent.c \ | |
203 | lib/sflow_sampler.c \ | |
204 | lib/sflow_poller.c \ | |
205 | lib/sflow_receiver.c | |
206 | lib_libsflow_a_CFLAGS = $(AM_CFLAGS) | |
207 | if HAVE_WNO_UNUSED | |
208 | lib_libsflow_a_CFLAGS += -Wno-unused | |
209 | endif | |
52af5b99 BP |
210 | if HAVE_WNO_UNUSED_PARAMETER |
211 | lib_libsflow_a_CFLAGS += -Wno-unused-parameter | |
212 | endif | |
c72e245a | 213 | |
064af421 BP |
214 | if HAVE_NETLINK |
215 | lib_libopenvswitch_a_SOURCES += \ | |
c83cdd30 | 216 | lib/dpif-linux.c \ |
9fe3b9a2 | 217 | lib/dpif-linux.h \ |
c83cdd30 | 218 | lib/netdev-linux.c \ |
d3980822 | 219 | lib/netdev-linux.h \ |
c83cdd30 BP |
220 | lib/netdev-vport.c \ |
221 | lib/netdev-vport.h \ | |
45c8d3a1 EJ |
222 | lib/netlink-notifier.c \ |
223 | lib/netlink-notifier.h \ | |
064af421 | 224 | lib/netlink-protocol.h \ |
2fe27d5a BP |
225 | lib/netlink-socket.c \ |
226 | lib/netlink-socket.h \ | |
21d6e22e | 227 | lib/rtnetlink-link.c \ |
ea83a2fc | 228 | lib/rtnetlink-link.h \ |
a132aa96 EJ |
229 | lib/route-table.c \ |
230 | lib/route-table.h | |
064af421 BP |
231 | endif |
232 | ||
233 | if HAVE_OPENSSL | |
fe55ad15 | 234 | lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c |
424d1282 | 235 | nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c |
064af421 BP |
236 | lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem |
237 | (echo '#include "lib/dhparams.h"' && \ | |
238 | openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \ | |
239 | openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \ | |
240 | openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \ | |
241 | | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp | |
242 | mv lib/dhparams.c.tmp lib/dhparams.c | |
bf8f2167 BP |
243 | else |
244 | lib_libopenvswitch_a_SOURCES += lib/stream-nossl.c | |
064af421 BP |
245 | endif |
246 | ||
247 | EXTRA_DIST += \ | |
248 | lib/dh1024.pem \ | |
249 | lib/dh2048.pem \ | |
b43c6fe2 BP |
250 | lib/dh4096.pem \ |
251 | lib/dirs.c.in | |
064af421 | 252 | |
0027492d | 253 | MAN_FRAGMENTS += \ |
064af421 | 254 | lib/common.man \ |
f7f62235 | 255 | lib/common-syn.man \ |
a5f607bc | 256 | lib/coverage-unixctl.man \ |
064af421 | 257 | lib/daemon.man \ |
f7f62235 | 258 | lib/daemon-syn.man \ |
064af421 | 259 | lib/leak-checker.man \ |
23edef9e | 260 | lib/ovs.tmac \ |
84ee7bcf | 261 | lib/ssl-bootstrap.man \ |
9467fe62 | 262 | lib/ssl-bootstrap-syn.man \ |
84ee7bcf BP |
263 | lib/ssl-peer-ca-cert.man \ |
264 | lib/ssl.man \ | |
9467fe62 | 265 | lib/ssl-syn.man \ |
cc01d0bb | 266 | lib/stress-unixctl.man \ |
3a3eb9da | 267 | lib/table.man \ |
7b38bdc8 BP |
268 | lib/unixctl.man \ |
269 | lib/unixctl-syn.man \ | |
84ee7bcf BP |
270 | lib/vconn-active.man \ |
271 | lib/vconn-passive.man \ | |
b16fdafe | 272 | lib/vlog-unixctl.man \ |
f7f62235 | 273 | lib/vlog-syn.man \ |
064af421 BP |
274 | lib/vlog.man |
275 | ||
6e037e3c EJ |
276 | # vswitch IDL |
277 | OVSIDL_BUILT += \ | |
278 | lib/vswitch-idl.c \ | |
279 | lib/vswitch-idl.h \ | |
280 | lib/vswitch-idl.ovsidl | |
281 | ||
282 | EXTRA_DIST += lib/vswitch-idl.ann | |
283 | VSWITCH_IDL_FILES = vswitchd/vswitch.ovsschema lib/vswitch-idl.ann | |
284 | lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES) | |
285 | $(OVSDB_IDLC) -C $(srcdir) annotate $(VSWITCH_IDL_FILES) > $@.tmp | |
286 | mv $@.tmp $@ | |
287 | ||
b43c6fe2 BP |
288 | lib/dirs.c: lib/dirs.c.in Makefile |
289 | ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \ | |
290 | -e 's,[@]srcdir[@],$(srcdir),g' \ | |
291 | -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \ | |
292 | -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \ | |
293 | -e 's,[@]bindir[@],"$(bindir)",g' \ | |
2fad9ebd | 294 | -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \ |
b43c6fe2 BP |
295 | -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \ |
296 | > lib/dirs.c.tmp | |
064af421 BP |
297 | mv lib/dirs.c.tmp lib/dirs.c |
298 | ||
90bf1e07 BP |
299 | $(srcdir)/lib/ofp-errors.inc: \ |
300 | lib/ofp-errors.h $(srcdir)/build-aux/extract-ofp-errors | |
301 | $(PYTHON) $(srcdir)/build-aux/extract-ofp-errors \ | |
302 | $(srcdir)/lib/ofp-errors.h > $@.tmp && mv $@.tmp $@ | |
a082dd9b | 303 | $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc |
90bf1e07 | 304 | EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc |
dc4762ed | 305 | |
b2df0225 | 306 | INSTALL_DATA_LOCAL += lib-install-data-local |
99155935 | 307 | lib-install-data-local: |
064af421 BP |
308 | $(MKDIR_P) $(DESTDIR)$(RUNDIR) |
309 | $(MKDIR_P) $(DESTDIR)$(PKIDIR) | |
310 | $(MKDIR_P) $(DESTDIR)$(LOGDIR) | |
311 | ||
d76f09ea | 312 | if !USE_LINKER_SECTIONS |
611d30ce BP |
313 | # All distributed sources, with names adjust properly for referencing |
314 | # from $(builddir). | |
315 | all_sources = \ | |
316 | `for file in $(DIST_SOURCES); do \ | |
317 | if test -f $$file; then \ | |
318 | echo $$file; \ | |
319 | else \ | |
320 | echo $(VPATH)/$$file; \ | |
321 | fi; \ | |
322 | done` | |
323 | ||
d76f09ea BP |
324 | lib/coverage.$(OBJEXT): lib/coverage.def |
325 | lib/coverage.def: $(DIST_SOURCES) | |
326 | sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@ | |
327 | CLEANFILES += lib/coverage.def | |
22c79496 | 328 | |
cc01d0bb BP |
329 | lib/stress.$(OBJEXT): lib/stress.def |
330 | lib/stress.def: $(DIST_SOURCES) | |
331 | sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@ | |
332 | CLEANFILES += lib/stress.def | |
333 | ||
611d30ce BP |
334 | lib/vlog.$(OBJEXT): lib/vlog-modules.def |
335 | lib/vlog-modules.def: $(DIST_SOURCES) | |
336 | sed -n 's|^VLOG_DEFINE_\(THIS_\)\{0,1\}MODULE(\([_a-zA-Z0-9]\{1,\}\)).*$$|VLOG_MODULE(\2)|p' $(all_sources) | LC_ALL=C sort -u > $@ | |
337 | CLEANFILES += lib/vlog-modules.def | |
338 | endif |