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