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 \
169 lib/ovsdb-idl-provider.h \
199 lib/rstp-state-machines.c \
200 lib/rstp-state-machines.h \
222 lib/stream-provider.h \
252 lib/vconn-provider.h \
268 lib_libopenvswitch_la_SOURCES += \
269 lib/daemon-windows.c \
271 lib/getrusage-windows.c \
272 lib/latch-windows.c \
273 lib/route-table-stub.c \
276 lib_libopenvswitch_la_SOURCES += \
281 lib/socket-util-unix.c \
289 nodist_lib_libopenvswitch_la_SOURCES = \
291 CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
293 lib_LTLIBRARIES += lib/libsflow.la
294 lib_libsflow_la_LDFLAGS = -release $(VERSION)
295 lib_libsflow_la_SOURCES = \
299 lib/sflow_sampler.c \
302 lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
303 lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
305 lib_libsflow_la_CFLAGS += -Wno-unused
307 if HAVE_WNO_UNUSED_PARAMETER
308 lib_libsflow_la_CFLAGS += -Wno-unused-parameter
312 lib_libopenvswitch_la_SOURCES += \
317 lib/netlink-notifier.c \
318 lib/netlink-notifier.h \
319 lib/netlink-protocol.h \
320 lib/netlink-socket.c \
321 lib/netlink-socket.h \
325 lib/ovs-router-linux.h \
326 lib/rtnetlink-link.c \
327 lib/rtnetlink-link.h \
333 lib_libopenvswitch_la_SOURCES += \
339 lib_libopenvswitch_la_SOURCES += \
342 lib/netdev-windows.c \
343 lib/netlink-notifier.c \
344 lib/netlink-notifier.h \
345 lib/netlink-protocol.h \
346 lib/netlink-socket.c \
351 lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
353 lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
357 lib_libopenvswitch_la_SOURCES += \
358 lib/route-table-stub.c
362 lib_libopenvswitch_la_SOURCES += \
366 lib/route-table-bsd.c
370 lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
371 nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
372 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
373 $(AM_V_GEN)(echo '#include "lib/dhparams.h"' && \
374 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
375 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
376 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
377 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp && \
378 mv lib/dhparams.c.tmp lib/dhparams.c
380 lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
392 lib/coverage-unixctl.man \
396 lib/memory-unixctl.man \
397 lib/ofp-version.man \
400 lib/service-syn.man \
401 lib/ssl-bootstrap.man \
402 lib/ssl-bootstrap-syn.man \
403 lib/ssl-peer-ca-cert.man \
408 lib/unixctl-syn.man \
409 lib/vconn-active.man \
410 lib/vconn-passive.man \
411 lib/vlog-unixctl.man \
417 $(srcdir)/lib/vswitch-idl.c \
418 $(srcdir)/lib/vswitch-idl.h \
419 $(srcdir)/lib/vswitch-idl.ovsidl \
420 $(srcdir)/lib/vtep-idl.c \
421 $(srcdir)/lib/vtep-idl.h \
422 $(srcdir)/lib/vtep-idl.ovsidl
424 EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
425 VSWITCH_IDL_FILES = \
426 $(srcdir)/vswitchd/vswitch.ovsschema \
427 $(srcdir)/lib/vswitch-idl.ann
428 $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
429 $(AM_V_GEN)$(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp && \
432 EXTRA_DIST += $(srcdir)/lib/vtep-idl.ann
434 $(srcdir)/vtep/vtep.ovsschema \
435 $(srcdir)/lib/vtep-idl.ann
436 $(srcdir)/lib/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
437 $(AM_V_GEN)$(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp && \
440 lib/dirs.c: lib/dirs.c.in Makefile
441 $(AM_V_GEN)($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
442 -e 's,[@]srcdir[@],$(srcdir),g' \
443 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
444 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
445 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
446 -e 's,[@]bindir[@],"$(bindir)",g' \
447 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
448 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
449 > lib/dirs.c.tmp && \
450 mv lib/dirs.c.tmp lib/dirs.c
452 lib/meta-flow.inc: $(srcdir)/build-aux/extract-ofp-fields lib/meta-flow.h
453 $(AM_V_GEN)$(run_python) $^ --meta-flow > $@.tmp && mv $@.tmp $@
454 lib/meta-flow.lo: lib/meta-flow.inc
455 lib/nx-match.inc: $(srcdir)/build-aux/extract-ofp-fields lib/meta-flow.h
456 $(AM_V_GEN)$(run_python) $^ --nx-match > $@.tmp && mv $@.tmp $@
457 lib/nx-match.lo: lib/nx-match.inc
458 CLEANFILES += lib/meta-flow.inc lib/nx-match.inc
459 EXTRA_DIST += build-aux/extract-ofp-fields
461 lib/ofp-actions.inc1: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
462 $(AM_V_GEN)$(run_python) $^ --prototypes > $@.tmp && mv $@.tmp $@
463 lib/ofp-actions.inc2: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
464 $(AM_V_GEN)$(run_python) $^ --definitions > $@.tmp && mv $@.tmp $@
465 lib/ofp-actions.lo: lib/ofp-actions.inc1 lib/ofp-actions.inc2
466 CLEANFILES += lib/ofp-actions.inc1 lib/ofp-actions.inc2
467 EXTRA_DIST += build-aux/extract-ofp-actions
469 $(srcdir)/lib/ofp-errors.inc: \
470 lib/ofp-errors.h include/openflow/openflow-common.h \
471 $(srcdir)/build-aux/extract-ofp-errors
472 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-errors \
473 $(srcdir)/lib/ofp-errors.h \
474 $(srcdir)/include/openflow/openflow-common.h > $@.tmp && \
476 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
477 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
479 $(srcdir)/lib/ofp-msgs.inc: \
480 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
481 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
482 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
483 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
484 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
486 INSTALL_DATA_LOCAL += lib-install-data-local
487 lib-install-data-local:
488 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
489 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
490 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
491 $(MKDIR_P) $(DESTDIR)$(DBDIR)