1 # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 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)
14 lib_libopenvswitch_la_LIBADD += ${PTHREAD_LIBS}
17 lib_libopenvswitch_la_LDFLAGS = \
18 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
19 -Wl,--version-script=$(top_builddir)/lib/libopenvswitch.sym \
22 lib_libopenvswitch_la_SOURCES = \
40 lib/classifier-private.h \
56 lib/daemon-private.h \
75 lib/dynamic-string.c \
76 lib/dynamic-string.h \
109 lib/learning-switch.c \
110 lib/learning-switch.h \
118 lib/mcast-snooping.c \
119 lib/mcast-snooping.h \
127 lib/netdev-provider.h \
153 lib/ofp-version-opt.h \
154 lib/ofp-version-opt.c \
157 lib/ovs-atomic-c11.h \
158 lib/ovs-atomic-clang.h \
159 lib/ovs-atomic-flag-gcc4.7+.h \
160 lib/ovs-atomic-gcc4+.h \
161 lib/ovs-atomic-gcc4.7+.h \
162 lib/ovs-atomic-i586.h \
163 lib/ovs-atomic-locked.c \
164 lib/ovs-atomic-locked.h \
165 lib/ovs-atomic-msvc.h \
166 lib/ovs-atomic-pthreads.h \
167 lib/ovs-atomic-x86_64.h \
181 lib/ovsdb-idl-provider.h \
210 lib/rstp-state-machines.c \
211 lib/rstp-state-machines.h \
233 lib/stream-provider.h \
242 lib/syslog-direct.c \
243 lib/syslog-direct.h \
246 lib/syslog-provider.h \
253 lib/tnl-neigh-cache.c \
254 lib/tnl-neigh-cache.h \
271 lib/vconn-provider.h \
279 lib/lldp/aa-structs.h \
281 lib/lldp/lldp-const.h \
282 lib/lldp/lldp-tlv.h \
285 lib/lldp/lldpd-structs.c \
286 lib/lldp/lldpd-structs.h
289 lib_libopenvswitch_la_SOURCES += \
290 lib/daemon-windows.c \
292 lib/getrusage-windows.c \
293 lib/latch-windows.c \
294 lib/route-table-stub.c \
295 lib/if-notifier-stub.c \
298 lib_libopenvswitch_la_SOURCES += \
303 lib/socket-util-unix.c \
311 nodist_lib_libopenvswitch_la_SOURCES = \
315 CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
317 lib_LTLIBRARIES += lib/libsflow.la
318 lib_libsflow_la_LDFLAGS = \
319 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
320 -Wl,--version-script=$(top_builddir)/lib/libsflow.sym \
322 lib_libsflow_la_SOURCES = \
326 lib/sflow_sampler.c \
329 lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
330 lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
332 lib_libsflow_la_CFLAGS += -Wno-unused
334 if HAVE_WNO_UNUSED_PARAMETER
335 lib_libsflow_la_CFLAGS += -Wno-unused-parameter
339 lib_libopenvswitch_la_SOURCES += \
346 lib/netlink-notifier.c \
347 lib/netlink-notifier.h \
348 lib/netlink-protocol.h \
349 lib/netlink-socket.c \
350 lib/netlink-socket.h \
360 lib_libopenvswitch_la_SOURCES += \
366 lib_libopenvswitch_la_SOURCES += \
369 lib/netdev-windows.c \
370 lib/netlink-notifier.c \
371 lib/netlink-notifier.h \
372 lib/netlink-protocol.h \
373 lib/netlink-socket.c \
378 lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
380 lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
384 lib_libopenvswitch_la_SOURCES += \
385 lib/route-table-stub.c \
386 lib/if-notifier-stub.c
390 lib_libopenvswitch_la_SOURCES += \
391 lib/if-notifier-bsd.c \
395 lib/route-table-bsd.c
399 lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
400 nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
401 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
402 $(AM_V_GEN)(echo '#include "lib/dhparams.h"' && \
403 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
404 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
405 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
406 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp && \
407 mv lib/dhparams.c.tmp lib/dhparams.c
409 lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
413 $(srcdir)/lib/libopenvswitch.pc \
414 $(srcdir)/lib/libsflow.pc
425 lib/coverage-unixctl.man \
428 lib/db-ctl-base.man \
430 lib/memory-unixctl.man \
431 lib/ofp-version.man \
434 lib/service-syn.man \
435 lib/ssl-bootstrap.man \
436 lib/ssl-bootstrap-syn.man \
437 lib/ssl-peer-ca-cert.man \
438 lib/ssl-peer-ca-cert-syn.man \
443 lib/unixctl-syn.man \
444 lib/vconn-active.man \
445 lib/vconn-passive.man \
446 lib/vlog-unixctl.man \
451 OVSIDL_BUILT += lib/vswitch-idl.c lib/vswitch-idl.h lib/vswitch-idl.ovsidl
453 EXTRA_DIST += lib/vswitch-idl.ann
454 lib/vswitch-idl.ovsidl: vswitchd/vswitch.ovsschema lib/vswitch-idl.ann
455 $(AM_V_GEN)$(OVSDB_IDLC) annotate $(srcdir)/vswitchd/vswitch.ovsschema $(srcdir)/lib/vswitch-idl.ann > $@.tmp && mv $@.tmp $@
457 lib/dirs.c: lib/dirs.c.in Makefile
458 $(AM_V_GEN)($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
459 -e 's,[@]srcdir[@],$(srcdir),g' \
460 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
461 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
462 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
463 -e 's,[@]bindir[@],"$(bindir)",g' \
464 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
465 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
466 > lib/dirs.c.tmp && \
467 mv lib/dirs.c.tmp lib/dirs.c
469 lib/meta-flow.inc: $(srcdir)/build-aux/extract-ofp-fields lib/meta-flow.h
470 $(AM_V_GEN)$(run_python) $^ --meta-flow > $@.tmp && mv $@.tmp $@
471 lib/meta-flow.lo: lib/meta-flow.inc
472 lib/nx-match.inc: $(srcdir)/build-aux/extract-ofp-fields lib/meta-flow.h
473 $(AM_V_GEN)$(run_python) $^ --nx-match > $@.tmp && mv $@.tmp $@
474 lib/nx-match.lo: lib/nx-match.inc
475 CLEANFILES += lib/meta-flow.inc lib/nx-match.inc
476 EXTRA_DIST += build-aux/extract-ofp-fields
478 lib/ofp-actions.inc1: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
479 $(AM_V_GEN)$(run_python) $^ --prototypes > $@.tmp && mv $@.tmp $@
480 lib/ofp-actions.inc2: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
481 $(AM_V_GEN)$(run_python) $^ --definitions > $@.tmp && mv $@.tmp $@
482 lib/ofp-actions.lo: lib/ofp-actions.inc1 lib/ofp-actions.inc2
483 CLEANFILES += lib/ofp-actions.inc1 lib/ofp-actions.inc2
484 EXTRA_DIST += build-aux/extract-ofp-actions
486 lib/ofp-errors.inc: lib/ofp-errors.h include/openflow/openflow-common.h \
487 $(srcdir)/build-aux/extract-ofp-errors
488 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-errors \
489 $(srcdir)/lib/ofp-errors.h \
490 $(srcdir)/include/openflow/openflow-common.h > $@.tmp && \
492 lib/ofp-errors.lo: lib/ofp-errors.inc
493 CLEANFILES += lib/ofp-errors.inc
494 EXTRA_DIST += build-aux/extract-ofp-errors
496 lib/ofp-msgs.inc: lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
497 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
498 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
499 lib/ofp-msgs.lo: lib/ofp-msgs.inc
500 CLEANFILES += lib/ofp-msgs.inc
501 EXTRA_DIST += build-aux/extract-ofp-msgs
503 INSTALL_DATA_LOCAL += lib-install-data-local
504 lib-install-data-local:
505 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
506 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
507 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
508 $(MKDIR_P) $(DESTDIR)$(DBDIR)