]> git.proxmox.com Git - mirror_ovs.git/blob - lib/automake.mk
dpif-netdev: Reorder elements in dp_netdev_port structure.
[mirror_ovs.git] / lib / automake.mk
1 # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Nicira, Inc.
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
8 lib_LTLIBRARIES += lib/libopenvswitch.la
9
10 lib_libopenvswitch_la_LIBADD = $(SSL_LIBS)
11 lib_libopenvswitch_la_LIBADD += $(CAPNG_LDADD)
12
13 if WIN32
14 lib_libopenvswitch_la_LIBADD += ${PTHREAD_LIBS}
15 endif
16
17 lib_libopenvswitch_la_LDFLAGS = \
18 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
19 -Wl,--version-script=$(top_builddir)/lib/libopenvswitch.sym \
20 $(AM_LDFLAGS)
21
22 lib_libopenvswitch_la_SOURCES = \
23 lib/aes128.c \
24 lib/aes128.h \
25 lib/async-append.h \
26 lib/backtrace.c \
27 lib/backtrace.h \
28 lib/bfd.c \
29 lib/bfd.h \
30 lib/bitmap.h \
31 lib/bundle.c \
32 lib/bundle.h \
33 lib/byte-order.h \
34 lib/byteq.c \
35 lib/byteq.h \
36 lib/cfm.c \
37 lib/cfm.h \
38 lib/classifier.c \
39 lib/classifier.h \
40 lib/classifier-private.h \
41 lib/ccmap.c \
42 lib/ccmap.h \
43 lib/cmap.c \
44 lib/cmap.h \
45 lib/colors.c \
46 lib/colors.h \
47 lib/command-line.c \
48 lib/command-line.h \
49 lib/compiler.h \
50 lib/connectivity.c \
51 lib/connectivity.h \
52 lib/conntrack-icmp.c \
53 lib/conntrack-private.h \
54 lib/conntrack-tcp.c \
55 lib/conntrack-other.c \
56 lib/conntrack.c \
57 lib/conntrack.h \
58 lib/coverage.c \
59 lib/coverage.h \
60 lib/crc32c.c \
61 lib/crc32c.h \
62 lib/csum.c \
63 lib/csum.h \
64 lib/ct-dpif.c \
65 lib/ct-dpif.h \
66 lib/daemon.c \
67 lib/daemon.h \
68 lib/daemon-private.h \
69 lib/db-ctl-base.c \
70 lib/db-ctl-base.h \
71 lib/dhcp.h \
72 lib/dummy.c \
73 lib/dummy.h \
74 lib/dhparams.h \
75 lib/dirs.h \
76 lib/dpctl.c \
77 lib/dpctl.h \
78 lib/dp-packet.h \
79 lib/dp-packet.c \
80 lib/dpdk.h \
81 lib/dpif-netdev.c \
82 lib/dpif-netdev.h \
83 lib/dpif-provider.h \
84 lib/dpif.c \
85 lib/dpif.h \
86 lib/heap.c \
87 lib/heap.h \
88 lib/dynamic-string.c \
89 lib/entropy.c \
90 lib/entropy.h \
91 lib/fat-rwlock.c \
92 lib/fat-rwlock.h \
93 lib/fatal-signal.c \
94 lib/fatal-signal.h \
95 lib/flow.c \
96 lib/flow.h \
97 lib/guarded-list.c \
98 lib/guarded-list.h \
99 lib/hash.c \
100 lib/hash.h \
101 lib/hindex.c \
102 lib/hindex.h \
103 lib/hmap.c \
104 lib/hmapx.c \
105 lib/hmapx.h \
106 lib/id-pool.c \
107 lib/id-pool.h \
108 lib/jhash.c \
109 lib/jhash.h \
110 lib/json.c \
111 lib/jsonrpc.c \
112 lib/jsonrpc.h \
113 lib/lacp.c \
114 lib/lacp.h \
115 lib/latch.h \
116 lib/learn.c \
117 lib/learn.h \
118 lib/learning-switch.c \
119 lib/learning-switch.h \
120 lib/lockfile.c \
121 lib/lockfile.h \
122 lib/mac-learning.c \
123 lib/mac-learning.h \
124 lib/match.c \
125 lib/mcast-snooping.c \
126 lib/mcast-snooping.h \
127 lib/memory.c \
128 lib/memory.h \
129 lib/meta-flow.c \
130 lib/multipath.c \
131 lib/multipath.h \
132 lib/netdev-dpdk.h \
133 lib/netdev-dummy.c \
134 lib/netdev-provider.h \
135 lib/netdev-vport.c \
136 lib/netdev-vport.h \
137 lib/netdev-vport-private.h \
138 lib/netdev.c \
139 lib/netdev.h \
140 lib/netflow.h \
141 lib/netlink.c \
142 lib/netlink.h \
143 lib/nx-match.c \
144 lib/nx-match.h \
145 lib/object-collection.c \
146 lib/object-collection.h \
147 lib/odp-execute.c \
148 lib/odp-execute.h \
149 lib/odp-util.c \
150 lib/odp-util.h \
151 lib/ofp-actions.c \
152 lib/ofp-errors.c \
153 lib/ofp-msgs.c \
154 lib/ofp-parse.c \
155 lib/ofp-print.c \
156 lib/ofp-prop.c \
157 lib/ofp-util.c \
158 lib/ofp-version-opt.h \
159 lib/ofp-version-opt.c \
160 lib/ofpbuf.c \
161 lib/ovs-atomic-c11.h \
162 lib/ovs-atomic-clang.h \
163 lib/ovs-atomic-flag-gcc4.7+.h \
164 lib/ovs-atomic-gcc4+.h \
165 lib/ovs-atomic-gcc4.7+.h \
166 lib/ovs-atomic-i586.h \
167 lib/ovs-atomic-locked.c \
168 lib/ovs-atomic-locked.h \
169 lib/ovs-atomic-msvc.h \
170 lib/ovs-atomic-pthreads.h \
171 lib/ovs-atomic-x86_64.h \
172 lib/ovs-atomic.h \
173 lib/ovs-lldp.c \
174 lib/ovs-lldp.h \
175 lib/ovs-numa.c \
176 lib/ovs-numa.h \
177 lib/ovs-rcu.c \
178 lib/ovs-rcu.h \
179 lib/ovs-router.h \
180 lib/ovs-router.c \
181 lib/ovs-thread.c \
182 lib/ovs-thread.h \
183 lib/ovsdb-data.c \
184 lib/ovsdb-data.h \
185 lib/ovsdb-error.c \
186 lib/ovsdb-error.h \
187 lib/ovsdb-idl-provider.h \
188 lib/ovsdb-idl.c \
189 lib/ovsdb-idl.h \
190 lib/ovsdb-map-op.c \
191 lib/ovsdb-map-op.h \
192 lib/ovsdb-set-op.c \
193 lib/ovsdb-set-op.h \
194 lib/ovsdb-condition.h \
195 lib/ovsdb-condition.c \
196 lib/ovsdb-parser.c \
197 lib/ovsdb-parser.h \
198 lib/ovsdb-types.c \
199 lib/ovsdb-types.h \
200 lib/packets.c \
201 lib/packets.h \
202 lib/pcap-file.c \
203 lib/pcap-file.h \
204 lib/perf-counter.h \
205 lib/perf-counter.c \
206 lib/poll-loop.c \
207 lib/poll-loop.h \
208 lib/process.c \
209 lib/process.h \
210 lib/pvector.c \
211 lib/pvector.h \
212 lib/random.c \
213 lib/random.h \
214 lib/rconn.c \
215 lib/rconn.h \
216 lib/rculist.h \
217 lib/reconnect.c \
218 lib/reconnect.h \
219 lib/rstp.c \
220 lib/rstp.h \
221 lib/rstp-common.h \
222 lib/rstp-state-machines.c \
223 lib/rstp-state-machines.h \
224 lib/sat-math.h \
225 lib/seq.c \
226 lib/seq.h \
227 lib/sha1.c \
228 lib/sha1.h \
229 lib/shash.c \
230 lib/simap.c \
231 lib/simap.h \
232 lib/smap.c \
233 lib/smap.h \
234 lib/socket-util.c \
235 lib/socket-util.h \
236 lib/sort.c \
237 lib/sort.h \
238 lib/sset.c \
239 lib/sset.h \
240 lib/stp.c \
241 lib/stp.h \
242 lib/stream-fd.c \
243 lib/stream-fd.h \
244 lib/stream-provider.h \
245 lib/stream-ssl.h \
246 lib/stream-tcp.c \
247 lib/stream.c \
248 lib/stream.h \
249 lib/stdio.c \
250 lib/string.c \
251 lib/svec.c \
252 lib/svec.h \
253 lib/syslog-direct.c \
254 lib/syslog-direct.h \
255 lib/syslog-libc.c \
256 lib/syslog-libc.h \
257 lib/syslog-provider.h \
258 lib/table.c \
259 lib/table.h \
260 lib/timer.c \
261 lib/timer.h \
262 lib/timeval.c \
263 lib/timeval.h \
264 lib/tnl-neigh-cache.c \
265 lib/tnl-neigh-cache.h \
266 lib/tnl-ports.c \
267 lib/tnl-ports.h \
268 lib/netdev-native-tnl.c \
269 lib/netdev-native-tnl.h \
270 lib/token-bucket.c \
271 lib/tun-metadata.c \
272 lib/tun-metadata.h \
273 lib/unaligned.h \
274 lib/unicode.c \
275 lib/unicode.h \
276 lib/unixctl.c \
277 lib/unixctl.h \
278 lib/util.c \
279 lib/util.h \
280 lib/uuid.c \
281 lib/uuid.h \
282 lib/valgrind.h \
283 lib/vconn-provider.h \
284 lib/vconn-stream.c \
285 lib/vconn.c \
286 lib/versions.h \
287 lib/vlan-bitmap.c \
288 lib/vlan-bitmap.h \
289 lib/vlog.c \
290 lib/lldp/aa-structs.h \
291 lib/lldp/lldp.c \
292 lib/lldp/lldp-const.h \
293 lib/lldp/lldp-tlv.h \
294 lib/lldp/lldpd.c \
295 lib/lldp/lldpd.h \
296 lib/lldp/lldpd-structs.c \
297 lib/lldp/lldpd-structs.h
298
299 if WIN32
300 lib_libopenvswitch_la_SOURCES += \
301 lib/daemon-windows.c \
302 lib/getopt_long.c \
303 lib/getrusage-windows.c \
304 lib/latch-windows.c \
305 lib/route-table-stub.c \
306 lib/if-notifier-stub.c \
307 lib/stream-windows.c \
308 lib/strsep.c
309 else
310 lib_libopenvswitch_la_SOURCES += \
311 lib/daemon-unix.c \
312 lib/latch-unix.c \
313 lib/signals.c \
314 lib/signals.h \
315 lib/socket-util-unix.c \
316 lib/stream-unix.c
317 endif
318
319 EXTRA_DIST += \
320 lib/stdio.h.in \
321 lib/string.h.in
322
323 nodist_lib_libopenvswitch_la_SOURCES = \
324 lib/dirs.c \
325 lib/vswitch-idl.c \
326 lib/vswitch-idl.h
327 CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
328
329 lib_LTLIBRARIES += lib/libsflow.la
330 lib_libsflow_la_LDFLAGS = \
331 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
332 -Wl,--version-script=$(top_builddir)/lib/libsflow.sym \
333 $(AM_LDFLAGS)
334 lib_libsflow_la_SOURCES = \
335 lib/sflow_api.h \
336 lib/sflow.h \
337 lib/sflow_agent.c \
338 lib/sflow_sampler.c \
339 lib/sflow_poller.c \
340 lib/sflow_receiver.c
341 lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
342 lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
343 if HAVE_WNO_UNUSED
344 lib_libsflow_la_CFLAGS += -Wno-unused
345 endif
346 if HAVE_WNO_UNUSED_PARAMETER
347 lib_libsflow_la_CFLAGS += -Wno-unused-parameter
348 endif
349
350 if LINUX
351 lib_libopenvswitch_la_SOURCES += \
352 lib/dpif-netlink.c \
353 lib/dpif-netlink.h \
354 lib/if-notifier.c \
355 lib/if-notifier.h \
356 lib/netdev-linux.c \
357 lib/netdev-linux.h \
358 lib/netlink-conntrack.c \
359 lib/netlink-conntrack.h \
360 lib/netlink-notifier.c \
361 lib/netlink-notifier.h \
362 lib/netlink-protocol.h \
363 lib/netlink-socket.c \
364 lib/netlink-socket.h \
365 lib/rtnetlink.c \
366 lib/rtnetlink.h \
367 lib/route-table.c \
368 lib/route-table.h
369 endif
370
371 if DPDK_NETDEV
372 lib_libopenvswitch_la_SOURCES += \
373 lib/dpdk.c \
374 lib/netdev-dpdk.c
375 else
376 lib_libopenvswitch_la_SOURCES += \
377 lib/dpdk-stub.c
378 endif
379
380 if WIN32
381 lib_libopenvswitch_la_SOURCES += \
382 lib/dpif-netlink.c \
383 lib/dpif-netlink.h \
384 lib/netdev-windows.c \
385 lib/netlink-conntrack.c \
386 lib/netlink-conntrack.h \
387 lib/netlink-notifier.c \
388 lib/netlink-notifier.h \
389 lib/netlink-protocol.h \
390 lib/netlink-socket.c \
391 lib/netlink-socket.h
392 endif
393
394 if HAVE_POSIX_AIO
395 lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
396 else
397 lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
398 endif
399
400 if ESX
401 lib_libopenvswitch_la_SOURCES += \
402 lib/route-table-stub.c \
403 lib/if-notifier-stub.c
404 endif
405
406 if HAVE_IF_DL
407 lib_libopenvswitch_la_SOURCES += \
408 lib/if-notifier-bsd.c \
409 lib/netdev-bsd.c \
410 lib/rtbsd.c \
411 lib/rtbsd.h \
412 lib/route-table-bsd.c
413 endif
414
415 if HAVE_OPENSSL
416 lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
417 nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
418 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
419 $(AM_V_GEN)(echo '#include "lib/dhparams.h"' && \
420 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
421 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
422 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
423 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp && \
424 mv lib/dhparams.c.tmp lib/dhparams.c
425 else
426 lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
427 endif
428
429 pkgconfig_DATA += \
430 $(srcdir)/lib/libopenvswitch.pc \
431 $(srcdir)/lib/libsflow.pc
432
433 EXTRA_DIST += \
434 lib/dh1024.pem \
435 lib/dh2048.pem \
436 lib/dh4096.pem \
437 lib/common.xml \
438 lib/daemon.xml \
439 lib/dirs.c.in \
440 lib/db-ctl-base.xml \
441 lib/ssl.xml \
442 lib/vlog.xml
443
444 MAN_FRAGMENTS += \
445 lib/colors.man \
446 lib/common.man \
447 lib/common-syn.man \
448 lib/coverage-unixctl.man \
449 lib/daemon.man \
450 lib/daemon-syn.man \
451 lib/db-ctl-base.man \
452 lib/dpctl.man \
453 lib/memory-unixctl.man \
454 lib/ofp-version.man \
455 lib/ovs.tmac \
456 lib/service.man \
457 lib/service-syn.man \
458 lib/ssl-bootstrap.man \
459 lib/ssl-bootstrap-syn.man \
460 lib/ssl-peer-ca-cert.man \
461 lib/ssl-peer-ca-cert-syn.man \
462 lib/ssl.man \
463 lib/ssl-syn.man \
464 lib/table.man \
465 lib/unixctl.man \
466 lib/unixctl-syn.man \
467 lib/vconn-active.man \
468 lib/vconn-passive.man \
469 lib/vlog-unixctl.man \
470 lib/vlog-syn.man \
471 lib/vlog.man
472
473 # vswitch IDL
474 OVSIDL_BUILT += lib/vswitch-idl.c lib/vswitch-idl.h lib/vswitch-idl.ovsidl
475
476 EXTRA_DIST += lib/vswitch-idl.ann
477 lib/vswitch-idl.ovsidl: vswitchd/vswitch.ovsschema lib/vswitch-idl.ann
478 $(AM_V_GEN)$(OVSDB_IDLC) annotate $(srcdir)/vswitchd/vswitch.ovsschema $(srcdir)/lib/vswitch-idl.ann > $@.tmp && mv $@.tmp $@
479
480 lib/dirs.c: lib/dirs.c.in Makefile
481 $(AM_V_GEN)($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
482 -e 's,[@]srcdir[@],$(srcdir),g' \
483 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
484 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
485 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
486 -e 's,[@]bindir[@],"$(bindir)",g' \
487 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
488 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
489 > lib/dirs.c.tmp && \
490 mv lib/dirs.c.tmp lib/dirs.c
491
492 lib/meta-flow.inc: $(srcdir)/build-aux/extract-ofp-fields include/openvswitch/meta-flow.h
493 $(AM_V_GEN)$(run_python) $^ --meta-flow > $@.tmp && mv $@.tmp $@
494 lib/meta-flow.lo: lib/meta-flow.inc
495 lib/nx-match.inc: $(srcdir)/build-aux/extract-ofp-fields include/openvswitch/meta-flow.h
496 $(AM_V_GEN)$(run_python) $^ --nx-match > $@.tmp && mv $@.tmp $@
497 lib/nx-match.lo: lib/nx-match.inc
498 CLEANFILES += lib/meta-flow.inc lib/nx-match.inc
499 EXTRA_DIST += build-aux/extract-ofp-fields
500
501 lib/ofp-actions.inc1: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
502 $(AM_V_GEN)$(run_python) $^ --prototypes > $@.tmp && mv $@.tmp $@
503 lib/ofp-actions.inc2: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
504 $(AM_V_GEN)$(run_python) $^ --definitions > $@.tmp && mv $@.tmp $@
505 lib/ofp-actions.lo: lib/ofp-actions.inc1 lib/ofp-actions.inc2
506 CLEANFILES += lib/ofp-actions.inc1 lib/ofp-actions.inc2
507 EXTRA_DIST += build-aux/extract-ofp-actions
508
509 lib/ofp-errors.inc: include/openvswitch/ofp-errors.h include/openflow/openflow-common.h \
510 $(srcdir)/build-aux/extract-ofp-errors
511 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-errors \
512 $(srcdir)/include/openvswitch/ofp-errors.h \
513 $(srcdir)/include/openflow/openflow-common.h > $@.tmp && \
514 mv $@.tmp $@
515 lib/ofp-errors.lo: lib/ofp-errors.inc
516 CLEANFILES += lib/ofp-errors.inc
517 EXTRA_DIST += build-aux/extract-ofp-errors
518
519 lib/ofp-msgs.inc: include/openvswitch/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
520 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
521 $(srcdir)/include/openvswitch/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
522 lib/ofp-msgs.lo: lib/ofp-msgs.inc
523 CLEANFILES += lib/ofp-msgs.inc
524 EXTRA_DIST += build-aux/extract-ofp-msgs
525
526 INSTALL_DATA_LOCAL += lib-install-data-local
527 lib-install-data-local:
528 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
529 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
530 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
531 $(MKDIR_P) $(DESTDIR)$(DBDIR)
532 $(MKDIR_P) $(DESTDIR)$(sysconfdir)/openvswitch