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
= \
38 lib_libopenvswitchavx512_la_SOURCES
= \
39 lib
/dpif-netdev-lookup-avx512-gather.c
40 lib_libopenvswitchavx512_la_LDFLAGS
= \
45 # Build core vswitch libraries as before
46 lib_libopenvswitch_la_SOURCES
= \
64 lib
/classifier-private.h \
76 lib
/conntrack-icmp.c \
77 lib
/conntrack-private.h \
81 lib
/conntrack-other.c \
94 lib
/daemon-private.h \
107 lib
/dpif-netdev-lookup.h \
108 lib
/dpif-netdev-lookup.c \
109 lib
/dpif-netdev-lookup-autovalidator.c \
110 lib
/dpif-netdev-lookup-generic.c \
113 lib
/dpif-netdev-private.h \
114 lib
/dpif-netdev-perf.c \
115 lib
/dpif-netdev-perf.h \
116 lib
/dpif-provider.h \
121 lib
/dynamic-string.c \
142 lib
/if-notifier-manual.c \
156 lib
/learning-switch.c \
157 lib
/learning-switch.h \
163 lib
/mcast-snooping.c \
164 lib
/mcast-snooping.h \
173 lib
/netdev-offload.c \
174 lib
/netdev-offload.h \
175 lib
/netdev-offload-provider.h \
176 lib
/netdev-provider.h \
179 lib
/netdev-vport-private.h \
188 lib
/object-collection.c \
189 lib
/object-collection.h \
196 lib
/ofp-connection.c \
216 lib
/ofp-version-opt.h \
217 lib
/ofp-version-opt.c \
219 lib
/ovs-atomic-c
++.h \
220 lib
/ovs-atomic-c11.h \
221 lib
/ovs-atomic-clang.h \
222 lib
/ovs-atomic-flag-gcc4.7
+.h \
223 lib
/ovs-atomic-gcc4
+.h \
224 lib
/ovs-atomic-gcc4.7
+.h \
225 lib
/ovs-atomic-i586.h \
226 lib
/ovs-atomic-locked.c \
227 lib
/ovs-atomic-locked.h \
228 lib
/ovs-atomic-msvc.h \
229 lib
/ovs-atomic-pthreads.h \
230 lib
/ovs-atomic-x86_64.h \
246 lib
/ovsdb-idl-provider.h \
253 lib
/ovsdb-condition.h \
254 lib
/ovsdb-condition.c \
257 lib
/ovsdb-session.c \
258 lib
/ovsdb-session.h \
285 lib
/rstp-state-machines.c \
286 lib
/rstp-state-machines.h \
309 lib
/stream-provider.h \
318 lib
/syslog-direct.c \
319 lib
/syslog-direct.h \
324 lib
/syslog-provider.h \
331 lib
/tnl-neigh-cache.c \
332 lib
/tnl-neigh-cache.h \
335 lib
/netdev-native-tnl.c \
336 lib
/netdev-native-tnl.h \
345 lib
/userspace-tso.c \
346 lib
/userspace-tso.h \
352 lib
/vconn-provider.h \
360 lib
/lldp
/aa-structs.h \
362 lib
/lldp
/lldp-const.h \
363 lib
/lldp
/lldp-tlv.h \
366 lib
/lldp
/lldpd-structs.c \
367 lib
/lldp
/lldpd-structs.h
370 lib_libopenvswitch_la_SOURCES
+= \
371 lib
/daemon-windows.c \
373 lib
/getrusage-windows.c \
374 lib
/latch-windows.c \
375 lib
/route-table-stub.c \
376 lib
/if-notifier-stub.c \
377 lib
/stream-windows.c \
380 lib_libopenvswitch_la_SOURCES
+= \
385 lib
/socket-util-unix.c \
393 nodist_lib_libopenvswitch_la_SOURCES
= \
395 lib
/ovsdb-server-idl.c \
396 lib
/ovsdb-server-idl.h \
399 CLEANFILES
+= $(nodist_lib_libopenvswitch_la_SOURCES
)
401 lib_LTLIBRARIES
+= lib
/libsflow.la
402 lib_libsflow_la_LDFLAGS
= \
404 -Wl
,--version-script
=$(top_builddir
)/lib
/libsflow.sym \
406 lib_libsflow_la_SOURCES
= \
410 lib
/sflow_sampler.c \
413 lib_libsflow_la_CPPFLAGS
= $(AM_CPPFLAGS
)
414 lib_libsflow_la_CFLAGS
= $(AM_CFLAGS
)
416 lib_libsflow_la_CFLAGS
+= -Wno-unused
418 if HAVE_WNO_UNUSED_PARAMETER
419 lib_libsflow_la_CFLAGS
+= -Wno-unused-parameter
423 lib_libopenvswitch_la_SOURCES
+= \
426 lib
/dpif-netlink-rtnl.c \
427 lib
/dpif-netlink-rtnl.h \
431 lib
/netdev-linux-private.h \
432 lib
/netdev-offload-tc.c \
433 lib
/netlink-conntrack.c \
434 lib
/netlink-conntrack.h \
435 lib
/netlink-notifier.c \
436 lib
/netlink-notifier.h \
437 lib
/netlink-protocol.h \
438 lib
/netlink-socket.c \
439 lib
/netlink-socket.h \
449 lib_libopenvswitch_la_SOURCES
+= \
450 lib
/netdev-afxdp-pool.c \
451 lib
/netdev-afxdp-pool.h \
457 lib_libopenvswitch_la_SOURCES
+= \
460 lib
/netdev-offload-dpdk.c
462 lib_libopenvswitch_la_SOURCES
+= \
467 lib_libopenvswitch_la_SOURCES
+= \
470 lib
/dpif-netlink-rtnl.h \
471 lib
/netdev-windows.c \
472 lib
/netlink-conntrack.c \
473 lib
/netlink-conntrack.h \
474 lib
/netlink-notifier.c \
475 lib
/netlink-notifier.h \
476 lib
/netlink-protocol.h \
477 lib
/netlink-socket.c \
478 lib
/netlink-socket.h \
484 lib_libopenvswitch_la_SOURCES
+= lib
/async-append-aio.c
486 lib_libopenvswitch_la_SOURCES
+= lib
/async-append-null.c
490 lib_libopenvswitch_la_SOURCES
+= \
491 lib
/if-notifier-bsd.c \
495 lib
/route-table-bsd.c
498 .PHONY
: generate-dhparams-c
500 lib_libopenvswitch_la_SOURCES
+= lib
/stream-ssl.c lib
/dhparams.c
502 # Manually regenerates lib/dhparams.c. Not normally necessary since
503 # lib/dhparams.c is part of the repository and doesn't normally need
506 $(AM_V_GEN
)cd
$(srcdir) && \
507 build-aux
/generate-dhparams-c
> lib
/dhparams.c.tmp
&& \
508 mv lib
/dhparams.c.tmp lib
/dhparams.c
510 lib_libopenvswitch_la_SOURCES
+= lib
/stream-nossl.c
513 lib_libopenvswitch_la_SOURCES
+= lib
/dns-resolve.h
515 lib_libopenvswitch_la_SOURCES
+= lib
/dns-resolve.c
517 lib_libopenvswitch_la_SOURCES
+= lib
/dns-resolve-stub.c
521 lib
/libopenvswitch.
pc \
531 lib
/db-ctl-base.xml \
533 lib
/ssl-bootstrap.xml \
534 lib
/ssl-peer-ca-cert.xml \
543 lib
/coverage-unixctl.man \
546 lib
/db-ctl-base.man \
548 lib
/dpdk-unixctl.man \
549 lib
/memory-unixctl.man \
550 lib
/netdev-dpdk-unixctl.man \
551 lib
/dpif-netdev-unixctl.man \
552 lib
/ofp-version.man \
555 lib
/service-syn.man \
556 lib
/ssl-bootstrap.man \
557 lib
/ssl-bootstrap-syn.man \
558 lib
/ssl-peer-ca-cert.man \
559 lib
/ssl-peer-ca-cert-syn.man \
562 lib
/ssl-connect.man \
563 lib
/ssl-connect-syn.man \
566 lib
/unixctl-syn.man \
567 lib
/vconn-active.man \
568 lib
/vconn-passive.man \
569 lib
/vlog-unixctl.man \
574 OVSIDL_BUILT
+= lib
/vswitch-idl.c lib
/vswitch-idl.h lib
/vswitch-idl.ovsidl
576 EXTRA_DIST
+= lib
/vswitch-idl.ann
577 lib
/vswitch-idl.ovsidl
: vswitchd
/vswitch.ovsschema lib
/vswitch-idl.ann
578 $(AM_V_GEN
)$(OVSDB_IDLC
) annotate
$(srcdir)/vswitchd
/vswitch.ovsschema
$(srcdir)/lib
/vswitch-idl.ann
> $@.tmp
&& mv
$@.tmp
$@
580 lib
/dirs.c
: lib
/dirs.c.in Makefile
581 $(AM_V_GEN
)($(ro_c
) && sed
< $(srcdir)/lib
/dirs.c.in \
582 -e
's,[@]srcdir[@],$(srcdir),g' \
583 -e
's,[@]LOGDIR[@],"$(LOGDIR)",g' \
584 -e
's,[@]RUNDIR[@],"$(RUNDIR)",g' \
585 -e
's,[@]DBDIR[@],"$(DBDIR)",g' \
586 -e
's,[@]bindir[@],"$(bindir)",g' \
587 -e
's,[@]sysconfdir[@],"$(sysconfdir)",g' \
588 -e
's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
589 > lib
/dirs.c.tmp
&& \
590 mv lib
/dirs.c.tmp lib
/dirs.c
592 lib
/meta-flow.inc
: $(srcdir)/build-aux
/extract-ofp-fields
include/openvswitch
/meta-flow.h
593 $(AM_V_GEN
)$(run_python
) $< meta-flow
$(srcdir)/include/openvswitch
/meta-flow.h
> $@.tmp
594 $(AM_V_at
)mv
$@.tmp
$@
595 lib
/meta-flow.lo
: lib
/meta-flow.inc
596 lib
/nx-match.inc
: $(srcdir)/build-aux
/extract-ofp-fields
include/openvswitch
/meta-flow.h
597 $(AM_V_GEN
)$(run_python
) $< nx-match
$(srcdir)/include/openvswitch
/meta-flow.h
> $@.tmp
598 $(AM_V_at
)mv
$@.tmp
$@
599 lib
/nx-match.lo
: lib
/nx-match.inc
600 CLEANFILES
+= lib
/meta-flow.inc lib
/nx-match.inc
601 EXTRA_DIST
+= build-aux
/extract-ofp-fields
603 lib
/ofp-actions.inc1
: $(srcdir)/build-aux
/extract-ofp-actions lib
/ofp-actions.c
604 $(AM_V_GEN
)$(run_python
) $< prototypes
$(srcdir)/lib
/ofp-actions.c
> $@.tmp
&& mv
$@.tmp
$@
605 lib
/ofp-actions.inc2
: $(srcdir)/build-aux
/extract-ofp-actions lib
/ofp-actions.c
606 $(AM_V_GEN
)$(run_python
) $< definitions
$(srcdir)/lib
/ofp-actions.c
> $@.tmp
&& mv
$@.tmp
$@
607 lib
/ofp-actions.lo
: lib
/ofp-actions.inc1 lib
/ofp-actions.inc2
608 CLEANFILES
+= lib
/ofp-actions.inc1 lib
/ofp-actions.inc2
609 EXTRA_DIST
+= build-aux
/extract-ofp-actions
611 lib
/ofp-errors.inc
: include/openvswitch
/ofp-errors.h
include/openflow
/openflow-common.h \
612 $(srcdir)/build-aux
/extract-ofp-errors
613 $(AM_V_GEN
)$(run_python
) $(srcdir)/build-aux
/extract-ofp-errors \
614 $(srcdir)/include/openvswitch
/ofp-errors.h \
615 $(srcdir)/include/openflow
/openflow-common.h
> $@.tmp
&& \
617 lib
/ofp-errors.lo
: lib
/ofp-errors.inc
618 CLEANFILES
+= lib
/ofp-errors.inc
619 EXTRA_DIST
+= build-aux
/extract-ofp-errors
621 lib
/ofp-msgs.inc
: include/openvswitch
/ofp-msgs.h
$(srcdir)/build-aux
/extract-ofp-msgs
622 $(AM_V_GEN
)$(run_python
) $(srcdir)/build-aux
/extract-ofp-msgs \
623 $(srcdir)/include/openvswitch
/ofp-msgs.h
$@
> $@.tmp
&& mv
$@.tmp
$@
624 lib
/ofp-msgs.lo
: lib
/ofp-msgs.inc
625 CLEANFILES
+= lib
/ofp-msgs.inc
626 EXTRA_DIST
+= build-aux
/extract-ofp-msgs
629 OVSIDL_BUILT
+= lib
/ovsdb-server-idl.c lib
/ovsdb-server-idl.h lib
/ovsdb-server-idl.ovsidl
630 EXTRA_DIST
+= lib
/ovsdb-server-idl.ann
631 lib
/ovsdb-server-idl.ovsidl
: ovsdb
/_server.ovsschema lib
/ovsdb-server-idl.ann
632 $(AM_V_GEN
)$(OVSDB_IDLC
) annotate
$(srcdir)/ovsdb
/_server.ovsschema
$(srcdir)/lib
/ovsdb-server-idl.ann
> $@.tmp
&& mv
$@.tmp
$@
634 INSTALL_DATA_LOCAL
+= lib-install-data-local
635 lib-install-data-local
:
636 $(MKDIR_P
) $(DESTDIR
)$(PKIDIR
)
637 $(MKDIR_P
) $(DESTDIR
)$(sysconfdir
)/openvswitch
639 man_MANS
+= lib
/ovs-fields
.7
640 CLEANFILES
+= lib
/ovs-fields
.7
641 lib
/ovs-fields
.7: $(srcdir)/build-aux
/extract-ofp-fields
include/openvswitch
/meta-flow.h lib
/meta-flow.xml
642 $(AM_V_GEN
)PYTHONIOENCODING
=utf8
$(run_python
) $< \
643 --ovs-version
=$(VERSION
) ovs-fields \
644 $(srcdir)/include/openvswitch
/meta-flow.h \
645 $(srcdir)/lib
/meta-flow.xml
> $@.tmp
646 $(AM_V_at
)mv
$@.tmp
$@
647 EXTRA_DIST
+= lib
/meta-flow.xml
649 man_MANS
+= lib
/ovs-actions
.7
650 CLEANFILES
+= lib
/ovs-actions
.7
651 lib
/ovs-actions
.7: $(srcdir)/build-aux
/extract-ofp-actions lib
/ovs-actions.xml
652 $(AM_V_GEN
)PYTHONIOENCODING
=utf8
$(run_python
) $< \
653 --ovs-version
=$(VERSION
) ovs-actions \
654 $(srcdir)/lib
/ovs-actions.xml
> $@.tmp
655 $(AM_V_at
)mv
$@.tmp
$@
656 EXTRA_DIST
+= lib
/ovs-actions.xml