1 # Copyright (C) 2009-2018 Nicira, Inc.
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.
8 lib_LTLIBRARIES
+= lib
/libopenvswitch.la
10 lib_libopenvswitch_la_LIBADD
= $(SSL_LIBS
)
11 lib_libopenvswitch_la_LIBADD
+= $(CAPNG_LDADD
)
12 lib_libopenvswitch_la_LIBADD
+= $(LIBBPF_LDADD
)
16 lib_libopenvswitch_la_LIBADD
+= ${PTHREAD_LIBS}
19 lib_libopenvswitch_la_LDFLAGS
= \
21 -Wl
,--version-script
=$(top_builddir
)/lib
/libopenvswitch.sym \
25 # Build library of avx512 code with CPU ISA CFLAGS enabled. This allows the
26 # compiler to use the ISA features required for the ISA optimized code-paths.
27 # Use LDFLAGS to compile only static library of this code, as it should be
28 # statically linked into vswitchd even if vswitchd is a shared build.
29 lib_LTLIBRARIES
+= lib
/libopenvswitchavx512.la
30 lib_libopenvswitch_la_LIBADD
+= lib
/libopenvswitchavx512.la
31 lib_libopenvswitchavx512_la_CFLAGS
= \
37 lib_libopenvswitchavx512_la_SOURCES
= \
38 lib
/dpif-netdev-lookup-avx512-gather.c
39 lib_libopenvswitchavx512_la_LDFLAGS
= \
43 # Build core vswitch libraries as before
44 lib_libopenvswitch_la_SOURCES
= \
62 lib
/classifier-private.h \
74 lib
/conntrack-icmp.c \
75 lib
/conntrack-private.h \
79 lib
/conntrack-other.c \
92 lib
/daemon-private.h \
105 lib
/dpif-netdev-lookup.h \
106 lib
/dpif-netdev-lookup.c \
107 lib
/dpif-netdev-lookup-autovalidator.c \
108 lib
/dpif-netdev-lookup-generic.c \
111 lib
/dpif-netdev-private.h \
112 lib
/dpif-netdev-perf.c \
113 lib
/dpif-netdev-perf.h \
114 lib
/dpif-provider.h \
119 lib
/dynamic-string.c \
140 lib
/if-notifier-manual.c \
154 lib
/learning-switch.c \
155 lib
/learning-switch.h \
161 lib
/mcast-snooping.c \
162 lib
/mcast-snooping.h \
171 lib
/netdev-offload.c \
172 lib
/netdev-offload.h \
173 lib
/netdev-offload-provider.h \
174 lib
/netdev-provider.h \
177 lib
/netdev-vport-private.h \
186 lib
/object-collection.c \
187 lib
/object-collection.h \
194 lib
/ofp-connection.c \
214 lib
/ofp-version-opt.h \
215 lib
/ofp-version-opt.c \
217 lib
/ovs-atomic-c
++.h \
218 lib
/ovs-atomic-c11.h \
219 lib
/ovs-atomic-clang.h \
220 lib
/ovs-atomic-flag-gcc4.7
+.h \
221 lib
/ovs-atomic-gcc4
+.h \
222 lib
/ovs-atomic-gcc4.7
+.h \
223 lib
/ovs-atomic-i586.h \
224 lib
/ovs-atomic-locked.c \
225 lib
/ovs-atomic-locked.h \
226 lib
/ovs-atomic-msvc.h \
227 lib
/ovs-atomic-pthreads.h \
228 lib
/ovs-atomic-x86_64.h \
244 lib
/ovsdb-idl-provider.h \
251 lib
/ovsdb-condition.h \
252 lib
/ovsdb-condition.c \
255 lib
/ovsdb-session.c \
256 lib
/ovsdb-session.h \
283 lib
/rstp-state-machines.c \
284 lib
/rstp-state-machines.h \
307 lib
/stream-provider.h \
316 lib
/syslog-direct.c \
317 lib
/syslog-direct.h \
322 lib
/syslog-provider.h \
329 lib
/tnl-neigh-cache.c \
330 lib
/tnl-neigh-cache.h \
333 lib
/netdev-native-tnl.c \
334 lib
/netdev-native-tnl.h \
343 lib
/userspace-tso.c \
344 lib
/userspace-tso.h \
350 lib
/vconn-provider.h \
358 lib
/lldp
/aa-structs.h \
360 lib
/lldp
/lldp-const.h \
361 lib
/lldp
/lldp-tlv.h \
364 lib
/lldp
/lldpd-structs.c \
365 lib
/lldp
/lldpd-structs.h
368 lib_libopenvswitch_la_SOURCES
+= \
369 lib
/daemon-windows.c \
371 lib
/getrusage-windows.c \
372 lib
/latch-windows.c \
373 lib
/route-table-stub.c \
374 lib
/if-notifier-stub.c \
375 lib
/stream-windows.c \
378 lib_libopenvswitch_la_SOURCES
+= \
383 lib
/socket-util-unix.c \
391 nodist_lib_libopenvswitch_la_SOURCES
= \
393 lib
/ovsdb-server-idl.c \
394 lib
/ovsdb-server-idl.h \
397 CLEANFILES
+= $(nodist_lib_libopenvswitch_la_SOURCES
)
399 lib_LTLIBRARIES
+= lib
/libsflow.la
400 lib_libsflow_la_LDFLAGS
= \
402 -Wl
,--version-script
=$(top_builddir
)/lib
/libsflow.sym \
404 lib_libsflow_la_SOURCES
= \
408 lib
/sflow_sampler.c \
411 lib_libsflow_la_CPPFLAGS
= $(AM_CPPFLAGS
)
412 lib_libsflow_la_CFLAGS
= $(AM_CFLAGS
)
414 lib_libsflow_la_CFLAGS
+= -Wno-unused
416 if HAVE_WNO_UNUSED_PARAMETER
417 lib_libsflow_la_CFLAGS
+= -Wno-unused-parameter
421 lib_libopenvswitch_la_SOURCES
+= \
424 lib
/dpif-netlink-rtnl.c \
425 lib
/dpif-netlink-rtnl.h \
429 lib
/netdev-linux-private.h \
430 lib
/netdev-offload-tc.c \
431 lib
/netlink-conntrack.c \
432 lib
/netlink-conntrack.h \
433 lib
/netlink-notifier.c \
434 lib
/netlink-notifier.h \
435 lib
/netlink-protocol.h \
436 lib
/netlink-socket.c \
437 lib
/netlink-socket.h \
447 lib_libopenvswitch_la_SOURCES
+= \
448 lib
/netdev-afxdp-pool.c \
449 lib
/netdev-afxdp-pool.h \
455 lib_libopenvswitch_la_SOURCES
+= \
458 lib
/netdev-offload-dpdk.c
460 lib_libopenvswitch_la_SOURCES
+= \
465 lib_libopenvswitch_la_SOURCES
+= \
468 lib
/dpif-netlink-rtnl.h \
469 lib
/netdev-windows.c \
470 lib
/netlink-conntrack.c \
471 lib
/netlink-conntrack.h \
472 lib
/netlink-notifier.c \
473 lib
/netlink-notifier.h \
474 lib
/netlink-protocol.h \
475 lib
/netlink-socket.c \
476 lib
/netlink-socket.h \
482 lib_libopenvswitch_la_SOURCES
+= lib
/async-append-aio.c
484 lib_libopenvswitch_la_SOURCES
+= lib
/async-append-null.c
488 lib_libopenvswitch_la_SOURCES
+= \
489 lib
/if-notifier-bsd.c \
493 lib
/route-table-bsd.c
496 .PHONY
: generate-dhparams-c
498 lib_libopenvswitch_la_SOURCES
+= lib
/stream-ssl.c lib
/dhparams.c
500 # Manually regenerates lib/dhparams.c. Not normally necessary since
501 # lib/dhparams.c is part of the repository and doesn't normally need
504 $(AM_V_GEN
)cd
$(srcdir) && \
505 build-aux
/generate-dhparams-c
> lib
/dhparams.c.tmp
&& \
506 mv lib
/dhparams.c.tmp lib
/dhparams.c
508 lib_libopenvswitch_la_SOURCES
+= lib
/stream-nossl.c
511 lib_libopenvswitch_la_SOURCES
+= lib
/dns-resolve.h
513 lib_libopenvswitch_la_SOURCES
+= lib
/dns-resolve.c
515 lib_libopenvswitch_la_SOURCES
+= lib
/dns-resolve-stub.c
519 lib
/libopenvswitch.
pc \
529 lib
/db-ctl-base.xml \
531 lib
/ssl-bootstrap.xml \
532 lib
/ssl-peer-ca-cert.xml \
541 lib
/coverage-unixctl.man \
544 lib
/db-ctl-base.man \
546 lib
/dpdk-unixctl.man \
547 lib
/memory-unixctl.man \
548 lib
/netdev-dpdk-unixctl.man \
549 lib
/dpif-netdev-unixctl.man \
550 lib
/ofp-version.man \
553 lib
/service-syn.man \
554 lib
/ssl-bootstrap.man \
555 lib
/ssl-bootstrap-syn.man \
556 lib
/ssl-peer-ca-cert.man \
557 lib
/ssl-peer-ca-cert-syn.man \
560 lib
/ssl-connect.man \
561 lib
/ssl-connect-syn.man \
564 lib
/unixctl-syn.man \
565 lib
/vconn-active.man \
566 lib
/vconn-passive.man \
567 lib
/vlog-unixctl.man \
572 OVSIDL_BUILT
+= lib
/vswitch-idl.c lib
/vswitch-idl.h lib
/vswitch-idl.ovsidl
574 EXTRA_DIST
+= lib
/vswitch-idl.ann
575 lib
/vswitch-idl.ovsidl
: vswitchd
/vswitch.ovsschema lib
/vswitch-idl.ann
576 $(AM_V_GEN
)$(OVSDB_IDLC
) annotate
$(srcdir)/vswitchd
/vswitch.ovsschema
$(srcdir)/lib
/vswitch-idl.ann
> $@.tmp
&& mv
$@.tmp
$@
578 lib
/dirs.c
: lib
/dirs.c.in Makefile
579 $(AM_V_GEN
)($(ro_c
) && sed
< $(srcdir)/lib
/dirs.c.in \
580 -e
's,[@]srcdir[@],$(srcdir),g' \
581 -e
's,[@]LOGDIR[@],"$(LOGDIR)",g' \
582 -e
's,[@]RUNDIR[@],"$(RUNDIR)",g' \
583 -e
's,[@]DBDIR[@],"$(DBDIR)",g' \
584 -e
's,[@]bindir[@],"$(bindir)",g' \
585 -e
's,[@]sysconfdir[@],"$(sysconfdir)",g' \
586 -e
's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
587 > lib
/dirs.c.tmp
&& \
588 mv lib
/dirs.c.tmp lib
/dirs.c
590 lib
/meta-flow.inc
: $(srcdir)/build-aux
/extract-ofp-fields
include/openvswitch
/meta-flow.h
591 $(AM_V_GEN
)$(run_python
) $< meta-flow
$(srcdir)/include/openvswitch
/meta-flow.h
> $@.tmp
592 $(AM_V_at
)mv
$@.tmp
$@
593 lib
/meta-flow.lo
: lib
/meta-flow.inc
594 lib
/nx-match.inc
: $(srcdir)/build-aux
/extract-ofp-fields
include/openvswitch
/meta-flow.h
595 $(AM_V_GEN
)$(run_python
) $< nx-match
$(srcdir)/include/openvswitch
/meta-flow.h
> $@.tmp
596 $(AM_V_at
)mv
$@.tmp
$@
597 lib
/nx-match.lo
: lib
/nx-match.inc
598 CLEANFILES
+= lib
/meta-flow.inc lib
/nx-match.inc
599 EXTRA_DIST
+= build-aux
/extract-ofp-fields
601 lib
/ofp-actions.inc1
: $(srcdir)/build-aux
/extract-ofp-actions lib
/ofp-actions.c
602 $(AM_V_GEN
)$(run_python
) $< prototypes
$(srcdir)/lib
/ofp-actions.c
> $@.tmp
&& mv
$@.tmp
$@
603 lib
/ofp-actions.inc2
: $(srcdir)/build-aux
/extract-ofp-actions lib
/ofp-actions.c
604 $(AM_V_GEN
)$(run_python
) $< definitions
$(srcdir)/lib
/ofp-actions.c
> $@.tmp
&& mv
$@.tmp
$@
605 lib
/ofp-actions.lo
: lib
/ofp-actions.inc1 lib
/ofp-actions.inc2
606 CLEANFILES
+= lib
/ofp-actions.inc1 lib
/ofp-actions.inc2
607 EXTRA_DIST
+= build-aux
/extract-ofp-actions
609 lib
/ofp-errors.inc
: include/openvswitch
/ofp-errors.h
include/openflow
/openflow-common.h \
610 $(srcdir)/build-aux
/extract-ofp-errors
611 $(AM_V_GEN
)$(run_python
) $(srcdir)/build-aux
/extract-ofp-errors \
612 $(srcdir)/include/openvswitch
/ofp-errors.h \
613 $(srcdir)/include/openflow
/openflow-common.h
> $@.tmp
&& \
615 lib
/ofp-errors.lo
: lib
/ofp-errors.inc
616 CLEANFILES
+= lib
/ofp-errors.inc
617 EXTRA_DIST
+= build-aux
/extract-ofp-errors
619 lib
/ofp-msgs.inc
: include/openvswitch
/ofp-msgs.h
$(srcdir)/build-aux
/extract-ofp-msgs
620 $(AM_V_GEN
)$(run_python
) $(srcdir)/build-aux
/extract-ofp-msgs \
621 $(srcdir)/include/openvswitch
/ofp-msgs.h
$@
> $@.tmp
&& mv
$@.tmp
$@
622 lib
/ofp-msgs.lo
: lib
/ofp-msgs.inc
623 CLEANFILES
+= lib
/ofp-msgs.inc
624 EXTRA_DIST
+= build-aux
/extract-ofp-msgs
627 OVSIDL_BUILT
+= lib
/ovsdb-server-idl.c lib
/ovsdb-server-idl.h lib
/ovsdb-server-idl.ovsidl
628 EXTRA_DIST
+= lib
/ovsdb-server-idl.ann
629 lib
/ovsdb-server-idl.ovsidl
: ovsdb
/_server.ovsschema lib
/ovsdb-server-idl.ann
630 $(AM_V_GEN
)$(OVSDB_IDLC
) annotate
$(srcdir)/ovsdb
/_server.ovsschema
$(srcdir)/lib
/ovsdb-server-idl.ann
> $@.tmp
&& mv
$@.tmp
$@
632 INSTALL_DATA_LOCAL
+= lib-install-data-local
633 lib-install-data-local
:
634 $(MKDIR_P
) $(DESTDIR
)$(PKIDIR
)
635 $(MKDIR_P
) $(DESTDIR
)$(sysconfdir
)/openvswitch
637 man_MANS
+= lib
/ovs-fields
.7
638 CLEANFILES
+= lib
/ovs-fields
.7
639 lib
/ovs-fields
.7: $(srcdir)/build-aux
/extract-ofp-fields
include/openvswitch
/meta-flow.h lib
/meta-flow.xml
640 $(AM_V_GEN
)PYTHONIOENCODING
=utf8
$(run_python
) $< \
641 --ovs-version
=$(VERSION
) ovs-fields \
642 $(srcdir)/include/openvswitch
/meta-flow.h \
643 $(srcdir)/lib
/meta-flow.xml
> $@.tmp
644 $(AM_V_at
)mv
$@.tmp
$@
645 EXTRA_DIST
+= lib
/meta-flow.xml
647 man_MANS
+= lib
/ovs-actions
.7
648 CLEANFILES
+= lib
/ovs-actions
.7
649 lib
/ovs-actions
.7: $(srcdir)/build-aux
/extract-ofp-actions lib
/ovs-actions.xml
650 $(AM_V_GEN
)PYTHONIOENCODING
=utf8
$(run_python
) $< \
651 --ovs-version
=$(VERSION
) ovs-actions \
652 $(srcdir)/lib
/ovs-actions.xml
> $@.tmp
653 $(AM_V_at
)mv
$@.tmp
$@
654 EXTRA_DIST
+= lib
/ovs-actions.xml