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 \
98 lib/learning-switch.c \
99 lib/learning-switch.h \
108 lib/mcast-snooping.c \
109 lib/mcast-snooping.h \
117 lib/netdev-provider.h \
143 lib/ofp-version-opt.h \
144 lib/ofp-version-opt.c \
147 lib/ovs-atomic-c11.h \
148 lib/ovs-atomic-clang.h \
149 lib/ovs-atomic-flag-gcc4.7+.h \
150 lib/ovs-atomic-gcc4+.h \
151 lib/ovs-atomic-gcc4.7+.h \
152 lib/ovs-atomic-i586.h \
153 lib/ovs-atomic-locked.c \
154 lib/ovs-atomic-locked.h \
155 lib/ovs-atomic-msvc.h \
156 lib/ovs-atomic-pthreads.h \
157 lib/ovs-atomic-x86_64.h \
167 lib/ovsdb-idl-provider.h \
195 lib/rstp-state-machines.c \
196 lib/rstp-state-machines.h \
218 lib/stream-provider.h \
248 lib/vconn-provider.h \
264 lib_libopenvswitch_la_SOURCES += \
265 lib/daemon-windows.c \
267 lib/getrusage-windows.c \
268 lib/latch-windows.c \
269 lib/route-table-stub.c \
272 lib_libopenvswitch_la_SOURCES += \
277 lib/socket-util-unix.c \
285 nodist_lib_libopenvswitch_la_SOURCES = \
287 CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
289 lib_LTLIBRARIES += lib/libsflow.la
290 lib_libsflow_la_LDFLAGS = -release $(VERSION)
291 lib_libsflow_la_SOURCES = \
295 lib/sflow_sampler.c \
298 lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
299 lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
301 lib_libsflow_la_CFLAGS += -Wno-unused
303 if HAVE_WNO_UNUSED_PARAMETER
304 lib_libsflow_la_CFLAGS += -Wno-unused-parameter
308 lib_libopenvswitch_la_SOURCES += \
313 lib/netlink-notifier.c \
314 lib/netlink-notifier.h \
315 lib/netlink-protocol.h \
316 lib/netlink-socket.c \
317 lib/netlink-socket.h \
320 lib/rtnetlink-link.c \
321 lib/rtnetlink-link.h \
327 lib_libopenvswitch_la_SOURCES += \
333 lib_libopenvswitch_la_SOURCES += \
336 lib/netdev-windows.c \
337 lib/netlink-notifier.c \
338 lib/netlink-notifier.h \
339 lib/netlink-protocol.h \
340 lib/netlink-socket.c \
345 lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
347 lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
351 lib_libopenvswitch_la_SOURCES += \
352 lib/route-table-stub.c
356 lib_libopenvswitch_la_SOURCES += \
360 lib/route-table-bsd.c
364 lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
365 nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
366 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
367 $(AM_V_GEN)(echo '#include "lib/dhparams.h"' && \
368 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
369 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
370 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
371 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp && \
372 mv lib/dhparams.c.tmp lib/dhparams.c
374 lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
386 lib/coverage-unixctl.man \
390 lib/memory-unixctl.man \
391 lib/ofp-version.man \
394 lib/service-syn.man \
395 lib/ssl-bootstrap.man \
396 lib/ssl-bootstrap-syn.man \
397 lib/ssl-peer-ca-cert.man \
402 lib/unixctl-syn.man \
403 lib/vconn-active.man \
404 lib/vconn-passive.man \
405 lib/vlog-unixctl.man \
411 $(srcdir)/lib/vswitch-idl.c \
412 $(srcdir)/lib/vswitch-idl.h \
413 $(srcdir)/lib/vswitch-idl.ovsidl \
414 $(srcdir)/lib/vtep-idl.c \
415 $(srcdir)/lib/vtep-idl.h \
416 $(srcdir)/lib/vtep-idl.ovsidl
418 EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
419 VSWITCH_IDL_FILES = \
420 $(srcdir)/vswitchd/vswitch.ovsschema \
421 $(srcdir)/lib/vswitch-idl.ann
422 $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
423 $(AM_V_GEN)$(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp && \
426 EXTRA_DIST += $(srcdir)/lib/vtep-idl.ann
428 $(srcdir)/vtep/vtep.ovsschema \
429 $(srcdir)/lib/vtep-idl.ann
430 $(srcdir)/lib/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
431 $(AM_V_GEN)$(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp && \
434 lib/dirs.c: lib/dirs.c.in Makefile
435 $(AM_V_GEN)($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
436 -e 's,[@]srcdir[@],$(srcdir),g' \
437 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
438 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
439 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
440 -e 's,[@]bindir[@],"$(bindir)",g' \
441 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
442 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
443 > lib/dirs.c.tmp && \
444 mv lib/dirs.c.tmp lib/dirs.c
446 lib/meta-flow.inc: $(srcdir)/build-aux/extract-ofp-fields lib/meta-flow.h
447 $(AM_V_GEN)$(run_python) $^ --meta-flow > $@.tmp && mv $@.tmp $@
448 lib/meta-flow.lo: lib/meta-flow.inc
449 lib/nx-match.inc: $(srcdir)/build-aux/extract-ofp-fields lib/meta-flow.h
450 $(AM_V_GEN)$(run_python) $^ --nx-match > $@.tmp && mv $@.tmp $@
451 lib/nx-match.lo: lib/nx-match.inc
452 CLEANFILES += lib/meta-flow.inc lib/nx-match.inc
453 EXTRA_DIST += build-aux/extract-ofp-fields
455 lib/ofp-actions.inc1: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
456 $(AM_V_GEN)$(run_python) $^ --prototypes > $@.tmp && mv $@.tmp $@
457 lib/ofp-actions.inc2: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
458 $(AM_V_GEN)$(run_python) $^ --definitions > $@.tmp && mv $@.tmp $@
459 lib/ofp-actions.lo: lib/ofp-actions.inc1 lib/ofp-actions.inc2
460 CLEANFILES += lib/ofp-actions.inc1 lib/ofp-actions.inc2
461 EXTRA_DIST += build-aux/extract-ofp-actions
463 $(srcdir)/lib/ofp-errors.inc: \
464 lib/ofp-errors.h include/openflow/openflow-common.h \
465 $(srcdir)/build-aux/extract-ofp-errors
466 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-errors \
467 $(srcdir)/lib/ofp-errors.h \
468 $(srcdir)/include/openflow/openflow-common.h > $@.tmp && \
470 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
471 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
473 $(srcdir)/lib/ofp-msgs.inc: \
474 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
475 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
476 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
477 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
478 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
480 INSTALL_DATA_LOCAL += lib-install-data-local
481 lib-install-data-local:
482 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
483 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
484 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
485 $(MKDIR_P) $(DESTDIR)$(DBDIR)