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 = \
51 lib/daemon-private.h \
66 lib/dynamic-string.c \
67 lib/dynamic-string.h \
97 lib/learning-switch.c \
98 lib/learning-switch.h \
107 lib/mcast-snooping.c \
108 lib/mcast-snooping.h \
116 lib/netdev-provider.h \
142 lib/ofp-version-opt.h \
143 lib/ofp-version-opt.c \
146 lib/ovs-atomic-c11.h \
147 lib/ovs-atomic-clang.h \
148 lib/ovs-atomic-flag-gcc4.7+.h \
149 lib/ovs-atomic-gcc4+.h \
150 lib/ovs-atomic-gcc4.7+.h \
151 lib/ovs-atomic-i586.h \
152 lib/ovs-atomic-locked.c \
153 lib/ovs-atomic-locked.h \
154 lib/ovs-atomic-msvc.h \
155 lib/ovs-atomic-pthreads.h \
156 lib/ovs-atomic-x86_64.h \
166 lib/ovsdb-idl-provider.h \
194 lib/rstp-state-machines.c \
195 lib/rstp-state-machines.h \
216 lib/stream-provider.h \
246 lib/vconn-provider.h \
262 lib_libopenvswitch_la_SOURCES += \
263 lib/daemon-windows.c \
265 lib/getrusage-windows.c \
266 lib/latch-windows.c \
267 lib/route-table-stub.c \
269 lib/stream-fd-windows.c
271 lib_libopenvswitch_la_SOURCES += \
276 lib/socket-util-unix.c \
277 lib/stream-fd-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/ofp-actions.inc1: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
447 $(AM_V_GEN)$(run_python) $^ --prototypes > $@.tmp && mv $@.tmp $@
448 lib/ofp-actions.inc2: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
449 $(AM_V_GEN)$(run_python) $^ --definitions > $@.tmp && mv $@.tmp $@
450 lib/ofp-actions.lo: lib/ofp-actions.inc1 lib/ofp-actions.inc2
451 CLEANFILES += lib/ofp-actions.inc1 lib/ofp-actions.inc2
452 EXTRA_DIST += build-aux/extract-ofp-actions lib/ofp-errors.inc
454 $(srcdir)/lib/ofp-errors.inc: \
455 lib/ofp-errors.h include/openflow/openflow-common.h \
456 $(srcdir)/build-aux/extract-ofp-errors
457 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-errors \
458 $(srcdir)/lib/ofp-errors.h \
459 $(srcdir)/include/openflow/openflow-common.h > $@.tmp && \
461 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
462 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
464 $(srcdir)/lib/ofp-msgs.inc: \
465 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
466 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
467 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
468 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
469 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
471 INSTALL_DATA_LOCAL += lib-install-data-local
472 lib-install-data-local:
473 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
474 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
475 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
476 $(MKDIR_P) $(DESTDIR)$(DBDIR)