]> git.proxmox.com Git - ovs.git/blame - lib/automake.mk
FAQ: add an entry for MAC learning + VLAN
[ovs.git] / lib / automake.mk
CommitLineData
b8e67377 1# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Nicira, 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
38b7a52b 8lib_LTLIBRARIES += lib/libopenvswitch.la
064af421 9
38b7a52b 10lib_libopenvswitch_la_LIBADD = $(SSL_LIBS)
94887cf4
GS
11
12if WIN32
13lib_libopenvswitch_la_LIBADD += ${PTHREAD_LIBS}
14endif
15
38b7a52b
HS
16lib_libopenvswitch_la_LDFLAGS = -release $(VERSION)
17
18lib_libopenvswitch_la_SOURCES = \
d918d9d1
BP
19 lib/aes128.c \
20 lib/aes128.h \
97eba8fc 21 lib/async-append.h \
064af421
BP
22 lib/backtrace.c \
23 lib/backtrace.h \
ccc09689
EJ
24 lib/bfd.c \
25 lib/bfd.h \
064af421
BP
26 lib/bitmap.c \
27 lib/bitmap.h \
daff3353
EJ
28 lib/bundle.c \
29 lib/bundle.h \
10a24935 30 lib/byte-order.h \
1c617a49
BP
31 lib/byteq.c \
32 lib/byteq.h \
b31bcf60
EJ
33 lib/cfm.c \
34 lib/cfm.h \
064af421
BP
35 lib/classifier.c \
36 lib/classifier.h \
0e666160
BP
37 lib/cmap.c \
38 lib/cmap.h \
064af421
BP
39 lib/command-line.c \
40 lib/command-line.h \
41 lib/compiler.h \
da4a6191
JS
42 lib/connectivity.c \
43 lib/connectivity.h \
064af421
BP
44 lib/coverage.c \
45 lib/coverage.h \
97025b23
JS
46 lib/crc32c.c \
47 lib/crc32c.h \
064af421
BP
48 lib/csum.c \
49 lib/csum.h \
d6bc33f3 50 lib/daemon.c \
064af421 51 lib/daemon.h \
3834bcf2 52 lib/daemon-private.h \
195c8086 53 lib/dhcp.h \
614c4892
BP
54 lib/dummy.c \
55 lib/dummy.h \
064af421 56 lib/dhparams.h \
064af421 57 lib/dirs.h \
72865317 58 lib/dpif-netdev.c \
df1e5a3b 59 lib/dpif-netdev.h \
96fba48f
BP
60 lib/dpif-provider.h \
61 lib/dpif.c \
62 lib/dpif.h \
95974447
BP
63 lib/heap.c \
64 lib/heap.h \
064af421
BP
65 lib/dynamic-string.c \
66 lib/dynamic-string.h \
e251c8d0
BP
67 lib/entropy.c \
68 lib/entropy.h \
b8e67377
BP
69 lib/fat-rwlock.c \
70 lib/fat-rwlock.h \
064af421
BP
71 lib/fatal-signal.c \
72 lib/fatal-signal.h \
064af421
BP
73 lib/flow.c \
74 lib/flow.h \
05067881
BP
75 lib/guarded-list.c \
76 lib/guarded-list.h \
064af421
BP
77 lib/hash.c \
78 lib/hash.h \
822b7f52
BP
79 lib/hindex.c \
80 lib/hindex.h \
064af421
BP
81 lib/hmap.c \
82 lib/hmap.h \
f4ac3fc1
BP
83 lib/hmapx.c \
84 lib/hmapx.h \
c49d1dd1
BP
85 lib/jhash.c \
86 lib/jhash.h \
f38b84ea
BP
87 lib/json.c \
88 lib/json.h \
f2129093
BP
89 lib/jsonrpc.c \
90 lib/jsonrpc.h \
6aa74308
EJ
91 lib/lacp.c \
92 lib/lacp.h \
aad84c8e 93 lib/latch.h \
75a75043
BP
94 lib/learn.c \
95 lib/learn.h \
064af421
BP
96 lib/learning-switch.c \
97 lib/learning-switch.h \
98 lib/list.c \
99 lib/list.h \
ac718c9d
BP
100 lib/lockfile.c \
101 lib/lockfile.h \
064af421
BP
102 lib/mac-learning.c \
103 lib/mac-learning.h \
81a76618
BP
104 lib/match.c \
105 lib/match.h \
4a95091d
FL
106 lib/mcast-snooping.c \
107 lib/mcast-snooping.h \
0d085684
BP
108 lib/memory.c \
109 lib/memory.h \
6a885fd0
BP
110 lib/meta-flow.c \
111 lib/meta-flow.h \
53ddd40a
BP
112 lib/multipath.c \
113 lib/multipath.h \
614c4892 114 lib/netdev-dummy.c \
5146acb1 115 lib/netdev-provider.h \
c060c4cf
EJ
116 lib/netdev-vport.c \
117 lib/netdev-vport.h \
064af421
BP
118 lib/netdev.c \
119 lib/netdev.h \
9c8e276e 120 lib/netflow.h \
2fe27d5a
BP
121 lib/netlink.c \
122 lib/netlink.h \
09246b99
BP
123 lib/nx-match.c \
124 lib/nx-match.h \
f094af7b
SH
125 lib/odp-execute.c \
126 lib/odp-execute.h \
064af421
BP
127 lib/odp-util.c \
128 lib/odp-util.h \
f25d0cf3
BP
129 lib/ofp-actions.c \
130 lib/ofp-actions.h \
dc4762ed
BP
131 lib/ofp-errors.c \
132 lib/ofp-errors.h \
982697a4
BP
133 lib/ofp-msgs.c \
134 lib/ofp-msgs.h \
f22716dc
JP
135 lib/ofp-parse.c \
136 lib/ofp-parse.h \
064af421
BP
137 lib/ofp-print.c \
138 lib/ofp-print.h \
fa37b408 139 lib/ofp-util.c \
e23ae585 140 lib/ofp-util.def \
fa37b408 141 lib/ofp-util.h \
020c9387
SH
142 lib/ofp-version-opt.h \
143 lib/ofp-version-opt.c \
064af421
BP
144 lib/ofpbuf.c \
145 lib/ofpbuf.h \
31a3fc6e 146 lib/ovs-atomic-c11.h \
29ab0cf7
BP
147 lib/ovs-atomic-clang.h \
148 lib/ovs-atomic-flag-gcc4.7+.h \
31a3fc6e
BP
149 lib/ovs-atomic-gcc4+.h \
150 lib/ovs-atomic-gcc4.7+.h \
1bd2c9ed
BP
151 lib/ovs-atomic-locked.c \
152 lib/ovs-atomic-locked.h \
31a3fc6e
BP
153 lib/ovs-atomic-pthreads.h \
154 lib/ovs-atomic.h \
0f2ea848
BP
155 lib/ovs-rcu.c \
156 lib/ovs-rcu.h \
ec68790f
BP
157 lib/ovs-thread.c \
158 lib/ovs-thread.h \
f85f8ebb
BP
159 lib/ovsdb-data.c \
160 lib/ovsdb-data.h \
161 lib/ovsdb-error.c \
162 lib/ovsdb-error.h \
c3bb4bd7
BP
163 lib/ovsdb-idl-provider.h \
164 lib/ovsdb-idl.c \
165 lib/ovsdb-idl.h \
f85f8ebb
BP
166 lib/ovsdb-parser.c \
167 lib/ovsdb-parser.h \
168 lib/ovsdb-types.c \
169 lib/ovsdb-types.h \
91088554
DDP
170 lib/packet-dpif.c \
171 lib/packet-dpif.h \
b9e8b45a 172 lib/packets.c \
064af421 173 lib/packets.h \
2c78a3e6
SS
174 lib/pcap-file.c \
175 lib/pcap-file.h \
064af421
BP
176 lib/poll-loop.c \
177 lib/poll-loop.h \
064af421
BP
178 lib/process.c \
179 lib/process.h \
064af421
BP
180 lib/random.c \
181 lib/random.h \
182 lib/rconn.c \
183 lib/rconn.h \
3ed497fc
BP
184 lib/reconnect.c \
185 lib/reconnect.h \
064af421 186 lib/sat-math.h \
55b40355
BP
187 lib/seq.c \
188 lib/seq.h \
064af421
BP
189 lib/sha1.c \
190 lib/sha1.h \
191 lib/shash.c \
192 lib/shash.h \
44bac24b
BP
193 lib/simap.c \
194 lib/simap.h \
79f1cbe9
EJ
195 lib/smap.c \
196 lib/smap.h \
064af421
BP
197 lib/socket-util.c \
198 lib/socket-util.h \
f85f8ebb
BP
199 lib/sort.c \
200 lib/sort.h \
f391294f
BP
201 lib/sset.c \
202 lib/sset.h \
829a7d02
JP
203 lib/stp.c \
204 lib/stp.h \
c34b65c7
BP
205 lib/stream-fd.h \
206 lib/stream-provider.h \
9467fe62 207 lib/stream-ssl.h \
c34b65c7 208 lib/stream-tcp.c \
c34b65c7
BP
209 lib/stream.c \
210 lib/stream.h \
cde1c287 211 lib/stdio.c \
71d7c22f 212 lib/string.c \
064af421
BP
213 lib/svec.c \
214 lib/svec.h \
3a3eb9da
BP
215 lib/table.c \
216 lib/table.h \
b63e3bbc
BP
217 lib/tag.c \
218 lib/tag.h \
8650b075
EJ
219 lib/timer.c \
220 lib/timer.h \
064af421
BP
221 lib/timeval.c \
222 lib/timeval.h \
648f4f1f
BP
223 lib/token-bucket.c \
224 lib/token-bucket.h \
064af421 225 lib/type-props.h \
afa3a931 226 lib/unaligned.h \
f38b84ea
BP
227 lib/unicode.c \
228 lib/unicode.h \
fa0361b7
GG
229 lib/unixctl.c \
230 lib/unixctl.h \
064af421
BP
231 lib/util.c \
232 lib/util.h \
fa0361b7
GG
233 lib/uuid.c \
234 lib/uuid.h \
064af421
BP
235 lib/valgrind.h \
236 lib/vconn-provider.h \
064af421 237 lib/vconn-stream.c \
064af421
BP
238 lib/vconn.c \
239 lib/vconn.h \
0fb7b915
BP
240 lib/vlan-bitmap.c \
241 lib/vlan-bitmap.h \
025e874a
BP
242 lib/vlandev.c \
243 lib/vlandev.h \
064af421 244 lib/vlog.c \
6e037e3c
EJ
245 lib/vlog.h \
246 lib/vswitch-idl.c \
add17b69
BD
247 lib/vswitch-idl.h \
248 lib/vtep-idl.c \
249 lib/vtep-idl.h
9d0581fd 250
4ca828d7 251if WIN32
9d0581fd 252lib_libopenvswitch_la_SOURCES += \
fda546bd 253 lib/daemon-windows.c \
9d0581fd 254 lib/getopt_long.c \
1680d3d7 255 lib/getrusage-windows.c \
6500157f 256 lib/latch-windows.c \
7482ddda 257 lib/route-table-stub.c \
f062911f 258 lib/strsep.c \
6500157f 259 lib/stream-fd-windows.c
4ca828d7 260else
9d0581fd 261lib_libopenvswitch_la_SOURCES += \
a91dc444 262 lib/daemon-unix.c \
6500157f 263 lib/latch-unix.c \
60567113
GS
264 lib/signals.c \
265 lib/signals.h \
7f1e1c7f 266 lib/socket-util-unix.c \
6500157f 267 lib/stream-fd-unix.c \
7ff04d92 268 lib/stream-unix.c
4ca828d7
LS
269endif
270
cde1c287
BP
271EXTRA_DIST += \
272 lib/stdio.h.in \
273 lib/string.h.in
6e037e3c 274
38b7a52b 275nodist_lib_libopenvswitch_la_SOURCES = \
424d1282 276 lib/dirs.c
38b7a52b 277CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
064af421 278
38b7a52b
HS
279lib_LTLIBRARIES += lib/libsflow.la
280lib_libsflow_la_LDFLAGS = -release $(VERSION)
281lib_libsflow_la_SOURCES = \
c72e245a
BP
282 lib/sflow_api.h \
283 lib/sflow.h \
284 lib/sflow_agent.c \
285 lib/sflow_sampler.c \
286 lib/sflow_poller.c \
287 lib/sflow_receiver.c
38b7a52b
HS
288lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
289lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
c72e245a 290if HAVE_WNO_UNUSED
38b7a52b 291lib_libsflow_la_CFLAGS += -Wno-unused
c72e245a 292endif
52af5b99 293if HAVE_WNO_UNUSED_PARAMETER
38b7a52b 294lib_libsflow_la_CFLAGS += -Wno-unused-parameter
52af5b99 295endif
c72e245a 296
5020f5f0 297if LINUX
38b7a52b 298lib_libopenvswitch_la_SOURCES += \
c83cdd30 299 lib/dpif-linux.c \
9fe3b9a2 300 lib/dpif-linux.h \
c83cdd30 301 lib/netdev-linux.c \
d3980822 302 lib/netdev-linux.h \
45c8d3a1
EJ
303 lib/netlink-notifier.c \
304 lib/netlink-notifier.h \
064af421 305 lib/netlink-protocol.h \
2fe27d5a
BP
306 lib/netlink-socket.c \
307 lib/netlink-socket.h \
21d6e22e 308 lib/rtnetlink-link.c \
ea83a2fc 309 lib/rtnetlink-link.h \
a132aa96
EJ
310 lib/route-table.c \
311 lib/route-table.h
064af421
BP
312endif
313
8a9562d2
PS
314if DPDK_NETDEV
315lib_libopenvswitch_la_SOURCES += \
316 lib/netdev-dpdk.c \
317 lib/netdev-dpdk.h
318endif
319
97eba8fc 320if HAVE_POSIX_AIO
38b7a52b 321lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
97eba8fc 322else
38b7a52b 323lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
97eba8fc
BP
324endif
325
361906b1 326if ESX
38b7a52b 327lib_libopenvswitch_la_SOURCES += \
361906b1
EJ
328 lib/route-table-stub.c
329endif
330
9360d9b7 331if HAVE_IF_DL
38b7a52b 332lib_libopenvswitch_la_SOURCES += \
f6eb6b20
GL
333 lib/netdev-bsd.c \
334 lib/rtbsd.c \
335 lib/rtbsd.h \
9360d9b7
EM
336 lib/route-table-bsd.c
337endif
338
064af421 339if HAVE_OPENSSL
38b7a52b
HS
340lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
341nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
064af421
BP
342lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
343 (echo '#include "lib/dhparams.h"' && \
344 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
345 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
346 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
347 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
348 mv lib/dhparams.c.tmp lib/dhparams.c
bf8f2167 349else
38b7a52b 350lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
064af421
BP
351endif
352
353EXTRA_DIST += \
354 lib/dh1024.pem \
355 lib/dh2048.pem \
b43c6fe2
BP
356 lib/dh4096.pem \
357 lib/dirs.c.in
064af421 358
0027492d 359MAN_FRAGMENTS += \
064af421 360 lib/common.man \
f7f62235 361 lib/common-syn.man \
a5f607bc 362 lib/coverage-unixctl.man \
064af421 363 lib/daemon.man \
f7f62235 364 lib/daemon-syn.man \
149ff68a 365 lib/memory-unixctl.man \
020c9387 366 lib/ofp-version.man \
23edef9e 367 lib/ovs.tmac \
fda546bd
GS
368 lib/service.man \
369 lib/service-syn.man \
84ee7bcf 370 lib/ssl-bootstrap.man \
9467fe62 371 lib/ssl-bootstrap-syn.man \
84ee7bcf
BP
372 lib/ssl-peer-ca-cert.man \
373 lib/ssl.man \
9467fe62 374 lib/ssl-syn.man \
3a3eb9da 375 lib/table.man \
7b38bdc8
BP
376 lib/unixctl.man \
377 lib/unixctl-syn.man \
84ee7bcf
BP
378 lib/vconn-active.man \
379 lib/vconn-passive.man \
b16fdafe 380 lib/vlog-unixctl.man \
f7f62235 381 lib/vlog-syn.man \
064af421
BP
382 lib/vlog.man
383
6e037e3c
EJ
384# vswitch IDL
385OVSIDL_BUILT += \
e3a88027
EJ
386 $(srcdir)/lib/vswitch-idl.c \
387 $(srcdir)/lib/vswitch-idl.h \
add17b69
BD
388 $(srcdir)/lib/vswitch-idl.ovsidl \
389 $(srcdir)/lib/vtep-idl.c \
390 $(srcdir)/lib/vtep-idl.h \
391 $(srcdir)/lib/vtep-idl.ovsidl
6e037e3c 392
e3a88027 393EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
8c8c0f3a
BP
394VSWITCH_IDL_FILES = \
395 $(srcdir)/vswitchd/vswitch.ovsschema \
396 $(srcdir)/lib/vswitch-idl.ann
e3a88027 397$(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
8c8c0f3a 398 $(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
6e037e3c
EJ
399 mv $@.tmp $@
400
add17b69
BD
401EXTRA_DIST += $(srcdir)/lib/vtep-idl.ann
402VTEP_IDL_FILES = \
403 $(srcdir)/vtep/vtep.ovsschema \
404 $(srcdir)/lib/vtep-idl.ann
405$(srcdir)/lib/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
406 $(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp
407 mv $@.tmp $@
408
b43c6fe2
BP
409lib/dirs.c: lib/dirs.c.in Makefile
410 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
411 -e 's,[@]srcdir[@],$(srcdir),g' \
412 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
413 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
f973f2af 414 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
b43c6fe2 415 -e 's,[@]bindir[@],"$(bindir)",g' \
2fad9ebd 416 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
b43c6fe2
BP
417 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
418 > lib/dirs.c.tmp
064af421
BP
419 mv lib/dirs.c.tmp lib/dirs.c
420
90bf1e07 421$(srcdir)/lib/ofp-errors.inc: \
514887ee
BP
422 lib/ofp-errors.h include/openflow/openflow-common.h \
423 $(srcdir)/build-aux/extract-ofp-errors
853d1083 424 $(run_python) $(srcdir)/build-aux/extract-ofp-errors \
514887ee
BP
425 $(srcdir)/lib/ofp-errors.h \
426 $(srcdir)/include/openflow/openflow-common.h > $@.tmp
427 mv $@.tmp $@
a082dd9b 428$(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
90bf1e07 429EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
dc4762ed 430
982697a4
BP
431$(srcdir)/lib/ofp-msgs.inc: \
432 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
433 $(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
434 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
435$(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
436EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
437
b2df0225 438INSTALL_DATA_LOCAL += lib-install-data-local
99155935 439lib-install-data-local:
064af421
BP
440 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
441 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
442 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
f973f2af 443 $(MKDIR_P) $(DESTDIR)$(DBDIR)
064af421 444