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 if HAVE_LD_AVX512_GOOD
26 # Build library of avx512 code with CPU ISA CFLAGS enabled. This allows the
27 # compiler to use the ISA features required for the ISA optimized code-paths.
28 # Use LDFLAGS to compile only static library of this code, as it should be
29 # statically linked into vswitchd even if vswitchd is a shared build.
30 lib_LTLIBRARIES
+= lib
/libopenvswitchavx512.la
31 lib_libopenvswitch_la_LIBADD
+= lib
/libopenvswitchavx512.la
32 lib_libopenvswitchavx512_la_CFLAGS
= \
39 lib_libopenvswitchavx512_la_SOURCES
= \
40 lib
/dpif-netdev-lookup-avx512-gather.c
41 lib_libopenvswitchavx512_la_LDFLAGS
= \
46 # Build core vswitch libraries as before
47 lib_libopenvswitch_la_SOURCES
= \
65 lib
/classifier-private.h \
77 lib
/conntrack-icmp.c \
78 lib
/conntrack-private.h \
82 lib
/conntrack-other.c \
95 lib
/daemon-private.h \
108 lib
/dpif-netdev-lookup.h \
109 lib
/dpif-netdev-lookup.c \
110 lib
/dpif-netdev-lookup-autovalidator.c \
111 lib
/dpif-netdev-lookup-generic.c \
114 lib
/dpif-netdev-private.h \
115 lib
/dpif-netdev-perf.c \
116 lib
/dpif-netdev-perf.h \
117 lib
/dpif-provider.h \
122 lib
/dynamic-string.c \
143 lib
/if-notifier-manual.c \
157 lib
/learning-switch.c \
158 lib
/learning-switch.h \
164 lib
/mcast-snooping.c \
165 lib
/mcast-snooping.h \
174 lib
/netdev-offload.c \
175 lib
/netdev-offload.h \
176 lib
/netdev-offload-provider.h \
177 lib
/netdev-provider.h \
180 lib
/netdev-vport-private.h \
189 lib
/object-collection.c \
190 lib
/object-collection.h \
197 lib
/ofp-connection.c \
217 lib
/ofp-version-opt.h \
218 lib
/ofp-version-opt.c \
220 lib
/ovs-atomic-c
++.h \
221 lib
/ovs-atomic-c11.h \
222 lib
/ovs-atomic-clang.h \
223 lib
/ovs-atomic-flag-gcc4.7
+.h \
224 lib
/ovs-atomic-gcc4
+.h \
225 lib
/ovs-atomic-gcc4.7
+.h \
226 lib
/ovs-atomic-i586.h \
227 lib
/ovs-atomic-locked.c \
228 lib
/ovs-atomic-locked.h \
229 lib
/ovs-atomic-msvc.h \
230 lib
/ovs-atomic-pthreads.h \
231 lib
/ovs-atomic-x86_64.h \
247 lib
/ovsdb-idl-provider.h \
254 lib
/ovsdb-condition.h \
255 lib
/ovsdb-condition.c \
258 lib
/ovsdb-session.c \
259 lib
/ovsdb-session.h \
286 lib
/rstp-state-machines.c \
287 lib
/rstp-state-machines.h \
310 lib
/stream-provider.h \
319 lib
/syslog-direct.c \
320 lib
/syslog-direct.h \
325 lib
/syslog-provider.h \
332 lib
/tnl-neigh-cache.c \
333 lib
/tnl-neigh-cache.h \
336 lib
/netdev-native-tnl.c \
337 lib
/netdev-native-tnl.h \
346 lib
/userspace-tso.c \
347 lib
/userspace-tso.h \
353 lib
/vconn-provider.h \
361 lib
/lldp
/aa-structs.h \
363 lib
/lldp
/lldp-const.h \
364 lib
/lldp
/lldp-tlv.h \
367 lib
/lldp
/lldpd-structs.c \
368 lib
/lldp
/lldpd-structs.h
371 lib_libopenvswitch_la_SOURCES
+= \
372 lib
/daemon-windows.c \
374 lib
/getrusage-windows.c \
375 lib
/latch-windows.c \
376 lib
/route-table-stub.c \
377 lib
/if-notifier-stub.c \
378 lib
/stream-windows.c \
381 lib_libopenvswitch_la_SOURCES
+= \
386 lib
/socket-util-unix.c \
394 nodist_lib_libopenvswitch_la_SOURCES
= \
396 lib
/ovsdb-server-idl.c \
397 lib
/ovsdb-server-idl.h \
400 CLEANFILES
+= $(nodist_lib_libopenvswitch_la_SOURCES
)
402 lib_LTLIBRARIES
+= lib
/libsflow.la
403 lib_libsflow_la_LDFLAGS
= \
405 -Wl
,--version-script
=$(top_builddir
)/lib
/libsflow.sym \
407 lib_libsflow_la_SOURCES
= \
411 lib
/sflow_sampler.c \
414 lib_libsflow_la_CPPFLAGS
= $(AM_CPPFLAGS
)
415 lib_libsflow_la_CFLAGS
= $(AM_CFLAGS
)
417 lib_libsflow_la_CFLAGS
+= -Wno-unused
419 if HAVE_WNO_UNUSED_PARAMETER
420 lib_libsflow_la_CFLAGS
+= -Wno-unused-parameter
424 lib_libopenvswitch_la_SOURCES
+= \
427 lib
/dpif-netlink-rtnl.c \
428 lib
/dpif-netlink-rtnl.h \
432 lib
/netdev-linux-private.h \
433 lib
/netdev-offload-tc.c \
434 lib
/netlink-conntrack.c \
435 lib
/netlink-conntrack.h \
436 lib
/netlink-notifier.c \
437 lib
/netlink-notifier.h \
438 lib
/netlink-protocol.h \
439 lib
/netlink-socket.c \
440 lib
/netlink-socket.h \
450 lib_libopenvswitch_la_SOURCES
+= \
451 lib
/netdev-afxdp-pool.c \
452 lib
/netdev-afxdp-pool.h \
458 lib_libopenvswitch_la_SOURCES
+= \
461 lib
/netdev-offload-dpdk.c
463 lib_libopenvswitch_la_SOURCES
+= \
468 lib_libopenvswitch_la_SOURCES
+= \
471 lib
/dpif-netlink-rtnl.h \
472 lib
/netdev-windows.c \
473 lib
/netlink-conntrack.c \
474 lib
/netlink-conntrack.h \
475 lib
/netlink-notifier.c \
476 lib
/netlink-notifier.h \
477 lib
/netlink-protocol.h \
478 lib
/netlink-socket.c \
479 lib
/netlink-socket.h \
485 lib_libopenvswitch_la_SOURCES
+= lib
/async-append-aio.c
487 lib_libopenvswitch_la_SOURCES
+= lib
/async-append-null.c
491 lib_libopenvswitch_la_SOURCES
+= \
492 lib
/if-notifier-bsd.c \
496 lib
/route-table-bsd.c
499 .PHONY
: generate-dhparams-c
501 lib_libopenvswitch_la_SOURCES
+= lib
/stream-ssl.c lib
/dhparams.c
503 # Manually regenerates lib/dhparams.c. Not normally necessary since
504 # lib/dhparams.c is part of the repository and doesn't normally need
507 $(AM_V_GEN
)cd
$(srcdir) && \
508 build-aux
/generate-dhparams-c
> lib
/dhparams.c.tmp
&& \
509 mv lib
/dhparams.c.tmp lib
/dhparams.c
511 lib_libopenvswitch_la_SOURCES
+= lib
/stream-nossl.c
514 lib_libopenvswitch_la_SOURCES
+= lib
/dns-resolve.h
516 lib_libopenvswitch_la_SOURCES
+= lib
/dns-resolve.c
518 lib_libopenvswitch_la_SOURCES
+= lib
/dns-resolve-stub.c
522 lib
/libopenvswitch.
pc \
532 lib
/db-ctl-base.xml \
534 lib
/ssl-bootstrap.xml \
535 lib
/ssl-peer-ca-cert.xml \
544 lib
/coverage-unixctl.man \
547 lib
/db-ctl-base.man \
549 lib
/dpdk-unixctl.man \
550 lib
/memory-unixctl.man \
551 lib
/netdev-dpdk-unixctl.man \
552 lib
/dpif-netdev-unixctl.man \
553 lib
/ofp-version.man \
556 lib
/service-syn.man \
557 lib
/ssl-bootstrap.man \
558 lib
/ssl-bootstrap-syn.man \
559 lib
/ssl-peer-ca-cert.man \
560 lib
/ssl-peer-ca-cert-syn.man \
563 lib
/ssl-connect.man \
564 lib
/ssl-connect-syn.man \
567 lib
/unixctl-syn.man \
568 lib
/vconn-active.man \
569 lib
/vconn-passive.man \
570 lib
/vlog-unixctl.man \
575 OVSIDL_BUILT
+= lib
/vswitch-idl.c lib
/vswitch-idl.h lib
/vswitch-idl.ovsidl
577 EXTRA_DIST
+= lib
/vswitch-idl.ann
578 lib
/vswitch-idl.ovsidl
: vswitchd
/vswitch.ovsschema lib
/vswitch-idl.ann
579 $(AM_V_GEN
)$(OVSDB_IDLC
) annotate
$(srcdir)/vswitchd
/vswitch.ovsschema
$(srcdir)/lib
/vswitch-idl.ann
> $@.tmp
&& mv
$@.tmp
$@
581 lib
/dirs.c
: lib
/dirs.c.in Makefile
582 $(AM_V_GEN
)($(ro_c
) && sed
< $(srcdir)/lib
/dirs.c.in \
583 -e
's,[@]srcdir[@],$(srcdir),g' \
584 -e
's,[@]LOGDIR[@],"$(LOGDIR)",g' \
585 -e
's,[@]RUNDIR[@],"$(RUNDIR)",g' \
586 -e
's,[@]DBDIR[@],"$(DBDIR)",g' \
587 -e
's,[@]bindir[@],"$(bindir)",g' \
588 -e
's,[@]sysconfdir[@],"$(sysconfdir)",g' \
589 -e
's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
590 > lib
/dirs.c.tmp
&& \
591 mv lib
/dirs.c.tmp lib
/dirs.c
593 lib
/meta-flow.inc
: $(srcdir)/build-aux
/extract-ofp-fields
include/openvswitch
/meta-flow.h
594 $(AM_V_GEN
)$(run_python
) $< meta-flow
$(srcdir)/include/openvswitch
/meta-flow.h
> $@.tmp
595 $(AM_V_at
)mv
$@.tmp
$@
596 lib
/meta-flow.lo
: lib
/meta-flow.inc
597 lib
/nx-match.inc
: $(srcdir)/build-aux
/extract-ofp-fields
include/openvswitch
/meta-flow.h
598 $(AM_V_GEN
)$(run_python
) $< nx-match
$(srcdir)/include/openvswitch
/meta-flow.h
> $@.tmp
599 $(AM_V_at
)mv
$@.tmp
$@
600 lib
/nx-match.lo
: lib
/nx-match.inc
601 CLEANFILES
+= lib
/meta-flow.inc lib
/nx-match.inc
602 EXTRA_DIST
+= build-aux
/extract-ofp-fields
604 lib
/ofp-actions.inc1
: $(srcdir)/build-aux
/extract-ofp-actions lib
/ofp-actions.c
605 $(AM_V_GEN
)$(run_python
) $< prototypes
$(srcdir)/lib
/ofp-actions.c
> $@.tmp
&& mv
$@.tmp
$@
606 lib
/ofp-actions.inc2
: $(srcdir)/build-aux
/extract-ofp-actions lib
/ofp-actions.c
607 $(AM_V_GEN
)$(run_python
) $< definitions
$(srcdir)/lib
/ofp-actions.c
> $@.tmp
&& mv
$@.tmp
$@
608 lib
/ofp-actions.lo
: lib
/ofp-actions.inc1 lib
/ofp-actions.inc2
609 CLEANFILES
+= lib
/ofp-actions.inc1 lib
/ofp-actions.inc2
610 EXTRA_DIST
+= build-aux
/extract-ofp-actions
612 lib
/ofp-errors.inc
: include/openvswitch
/ofp-errors.h
include/openflow
/openflow-common.h \
613 $(srcdir)/build-aux
/extract-ofp-errors
614 $(AM_V_GEN
)$(run_python
) $(srcdir)/build-aux
/extract-ofp-errors \
615 $(srcdir)/include/openvswitch
/ofp-errors.h \
616 $(srcdir)/include/openflow
/openflow-common.h
> $@.tmp
&& \
618 lib
/ofp-errors.lo
: lib
/ofp-errors.inc
619 CLEANFILES
+= lib
/ofp-errors.inc
620 EXTRA_DIST
+= build-aux
/extract-ofp-errors
622 lib
/ofp-msgs.inc
: include/openvswitch
/ofp-msgs.h
$(srcdir)/build-aux
/extract-ofp-msgs
623 $(AM_V_GEN
)$(run_python
) $(srcdir)/build-aux
/extract-ofp-msgs \
624 $(srcdir)/include/openvswitch
/ofp-msgs.h
$@
> $@.tmp
&& mv
$@.tmp
$@
625 lib
/ofp-msgs.lo
: lib
/ofp-msgs.inc
626 CLEANFILES
+= lib
/ofp-msgs.inc
627 EXTRA_DIST
+= build-aux
/extract-ofp-msgs
630 OVSIDL_BUILT
+= lib
/ovsdb-server-idl.c lib
/ovsdb-server-idl.h lib
/ovsdb-server-idl.ovsidl
631 EXTRA_DIST
+= lib
/ovsdb-server-idl.ann
632 lib
/ovsdb-server-idl.ovsidl
: ovsdb
/_server.ovsschema lib
/ovsdb-server-idl.ann
633 $(AM_V_GEN
)$(OVSDB_IDLC
) annotate
$(srcdir)/ovsdb
/_server.ovsschema
$(srcdir)/lib
/ovsdb-server-idl.ann
> $@.tmp
&& mv
$@.tmp
$@
635 INSTALL_DATA_LOCAL
+= lib-install-data-local
636 lib-install-data-local
:
637 $(MKDIR_P
) $(DESTDIR
)$(PKIDIR
)
638 $(MKDIR_P
) $(DESTDIR
)$(sysconfdir
)/openvswitch
640 man_MANS
+= lib
/ovs-fields
.7
641 CLEANFILES
+= lib
/ovs-fields
.7
642 lib
/ovs-fields
.7: $(srcdir)/build-aux
/extract-ofp-fields
include/openvswitch
/meta-flow.h lib
/meta-flow.xml
643 $(AM_V_GEN
)PYTHONIOENCODING
=utf8
$(run_python
) $< \
644 --ovs-version
=$(VERSION
) ovs-fields \
645 $(srcdir)/include/openvswitch
/meta-flow.h \
646 $(srcdir)/lib
/meta-flow.xml
> $@.tmp
647 $(AM_V_at
)mv
$@.tmp
$@
648 EXTRA_DIST
+= lib
/meta-flow.xml
650 man_MANS
+= lib
/ovs-actions
.7
651 CLEANFILES
+= lib
/ovs-actions
.7
652 lib
/ovs-actions
.7: $(srcdir)/build-aux
/extract-ofp-actions lib
/ovs-actions.xml
653 $(AM_V_GEN
)PYTHONIOENCODING
=utf8
$(run_python
) $< \
654 --ovs-version
=$(VERSION
) ovs-actions \
655 $(srcdir)/lib
/ovs-actions.xml
> $@.tmp
656 $(AM_V_at
)mv
$@.tmp
$@
657 EXTRA_DIST
+= lib
/ovs-actions.xml