1 # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 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)
13 lib_libopenvswitch_la_LIBADD += ${PTHREAD_LIBS}
16 lib_libopenvswitch_la_LDFLAGS = -release $(VERSION)
18 lib_libopenvswitch_la_SOURCES = \
36 lib/classifier-private.h \
52 lib/daemon-private.h \
67 lib/dynamic-string.c \
68 lib/dynamic-string.h \
100 lib/learning-switch.c \
101 lib/learning-switch.h \
109 lib/mcast-snooping.c \
110 lib/mcast-snooping.h \
118 lib/netdev-provider.h \
144 lib/ofp-version-opt.h \
145 lib/ofp-version-opt.c \
148 lib/ovs-atomic-c11.h \
149 lib/ovs-atomic-clang.h \
150 lib/ovs-atomic-flag-gcc4.7+.h \
151 lib/ovs-atomic-gcc4+.h \
152 lib/ovs-atomic-gcc4.7+.h \
153 lib/ovs-atomic-i586.h \
154 lib/ovs-atomic-locked.c \
155 lib/ovs-atomic-locked.h \
156 lib/ovs-atomic-msvc.h \
157 lib/ovs-atomic-pthreads.h \
158 lib/ovs-atomic-x86_64.h \
168 lib/ovsdb-idl-provider.h \
198 lib/rstp-state-machines.c \
199 lib/rstp-state-machines.h \
221 lib/stream-provider.h \
251 lib/vconn-provider.h \
267 lib_libopenvswitch_la_SOURCES += \
268 lib/daemon-windows.c \
270 lib/getrusage-windows.c \
271 lib/latch-windows.c \
272 lib/route-table-stub.c \
275 lib_libopenvswitch_la_SOURCES += \
280 lib/socket-util-unix.c \
288 nodist_lib_libopenvswitch_la_SOURCES = \
290 CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
292 lib_LTLIBRARIES += lib/libsflow.la
293 lib_libsflow_la_LDFLAGS = -release $(VERSION)
294 lib_libsflow_la_SOURCES = \
298 lib/sflow_sampler.c \
301 lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
302 lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
304 lib_libsflow_la_CFLAGS += -Wno-unused
306 if HAVE_WNO_UNUSED_PARAMETER
307 lib_libsflow_la_CFLAGS += -Wno-unused-parameter
311 lib_libopenvswitch_la_SOURCES += \
316 lib/netlink-notifier.c \
317 lib/netlink-notifier.h \
318 lib/netlink-protocol.h \
319 lib/netlink-socket.c \
320 lib/netlink-socket.h \
325 lib/rtnetlink-link.c \
326 lib/rtnetlink-link.h \
332 lib_libopenvswitch_la_SOURCES += \
338 lib_libopenvswitch_la_SOURCES += \
341 lib/netdev-windows.c \
342 lib/netlink-notifier.c \
343 lib/netlink-notifier.h \
344 lib/netlink-protocol.h \
345 lib/netlink-socket.c \
350 lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
352 lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
356 lib_libopenvswitch_la_SOURCES += \
357 lib/route-table-stub.c
361 lib_libopenvswitch_la_SOURCES += \
365 lib/route-table-bsd.c
369 lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
370 nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
371 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
372 $(AM_V_GEN)(echo '#include "lib/dhparams.h"' && \
373 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
374 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
375 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
376 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp && \
377 mv lib/dhparams.c.tmp lib/dhparams.c
379 lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
391 lib/coverage-unixctl.man \
395 lib/memory-unixctl.man \
396 lib/ofp-version.man \
399 lib/service-syn.man \
400 lib/ssl-bootstrap.man \
401 lib/ssl-bootstrap-syn.man \
402 lib/ssl-peer-ca-cert.man \
407 lib/unixctl-syn.man \
408 lib/vconn-active.man \
409 lib/vconn-passive.man \
410 lib/vlog-unixctl.man \
416 $(srcdir)/lib/vswitch-idl.c \
417 $(srcdir)/lib/vswitch-idl.h \
418 $(srcdir)/lib/vswitch-idl.ovsidl \
419 $(srcdir)/lib/vtep-idl.c \
420 $(srcdir)/lib/vtep-idl.h \
421 $(srcdir)/lib/vtep-idl.ovsidl
423 EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
424 VSWITCH_IDL_FILES = \
425 $(srcdir)/vswitchd/vswitch.ovsschema \
426 $(srcdir)/lib/vswitch-idl.ann
427 $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
428 $(AM_V_GEN)$(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp && \
431 EXTRA_DIST += $(srcdir)/lib/vtep-idl.ann
433 $(srcdir)/vtep/vtep.ovsschema \
434 $(srcdir)/lib/vtep-idl.ann
435 $(srcdir)/lib/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
436 $(AM_V_GEN)$(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp && \
439 lib/dirs.c: lib/dirs.c.in Makefile
440 $(AM_V_GEN)($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
441 -e 's,[@]srcdir[@],$(srcdir),g' \
442 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
443 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
444 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
445 -e 's,[@]bindir[@],"$(bindir)",g' \
446 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
447 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
448 > lib/dirs.c.tmp && \
449 mv lib/dirs.c.tmp lib/dirs.c
451 lib/meta-flow.inc: $(srcdir)/build-aux/extract-ofp-fields lib/meta-flow.h
452 $(AM_V_GEN)$(run_python) $^ --meta-flow > $@.tmp && mv $@.tmp $@
453 lib/meta-flow.lo: lib/meta-flow.inc
454 lib/nx-match.inc: $(srcdir)/build-aux/extract-ofp-fields lib/meta-flow.h
455 $(AM_V_GEN)$(run_python) $^ --nx-match > $@.tmp && mv $@.tmp $@
456 lib/nx-match.lo: lib/nx-match.inc
457 CLEANFILES += lib/meta-flow.inc lib/nx-match.inc
458 EXTRA_DIST += build-aux/extract-ofp-fields
460 lib/ofp-actions.inc1: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
461 $(AM_V_GEN)$(run_python) $^ --prototypes > $@.tmp && mv $@.tmp $@
462 lib/ofp-actions.inc2: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
463 $(AM_V_GEN)$(run_python) $^ --definitions > $@.tmp && mv $@.tmp $@
464 lib/ofp-actions.lo: lib/ofp-actions.inc1 lib/ofp-actions.inc2
465 CLEANFILES += lib/ofp-actions.inc1 lib/ofp-actions.inc2
466 EXTRA_DIST += build-aux/extract-ofp-actions
468 $(srcdir)/lib/ofp-errors.inc: \
469 lib/ofp-errors.h include/openflow/openflow-common.h \
470 $(srcdir)/build-aux/extract-ofp-errors
471 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-errors \
472 $(srcdir)/lib/ofp-errors.h \
473 $(srcdir)/include/openflow/openflow-common.h > $@.tmp && \
475 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
476 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
478 $(srcdir)/lib/ofp-msgs.inc: \
479 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
480 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
481 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
482 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
483 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
485 INSTALL_DATA_LOCAL += lib-install-data-local
486 lib-install-data-local:
487 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
488 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
489 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
490 $(MKDIR_P) $(DESTDIR)$(DBDIR)