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)
13 lib_libopenvswitch_la_LIBADD += ${PTHREAD_LIBS}
16 lib_libopenvswitch_la_LDFLAGS = \
17 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
18 -Wl,--version-script=$(top_builddir)/lib/libopenvswitch.sym \
21 lib_libopenvswitch_la_SOURCES = \
39 lib/classifier-private.h \
55 lib/daemon-private.h \
74 lib/dynamic-string.c \
75 lib/dynamic-string.h \
107 lib/learning-switch.c \
108 lib/learning-switch.h \
116 lib/mcast-snooping.c \
117 lib/mcast-snooping.h \
125 lib/netdev-provider.h \
151 lib/ofp-version-opt.h \
152 lib/ofp-version-opt.c \
155 lib/ovs-atomic-c11.h \
156 lib/ovs-atomic-clang.h \
157 lib/ovs-atomic-flag-gcc4.7+.h \
158 lib/ovs-atomic-gcc4+.h \
159 lib/ovs-atomic-gcc4.7+.h \
160 lib/ovs-atomic-i586.h \
161 lib/ovs-atomic-locked.c \
162 lib/ovs-atomic-locked.h \
163 lib/ovs-atomic-msvc.h \
164 lib/ovs-atomic-pthreads.h \
165 lib/ovs-atomic-x86_64.h \
179 lib/ovsdb-idl-provider.h \
208 lib/rstp-state-machines.c \
209 lib/rstp-state-machines.h \
231 lib/stream-provider.h \
248 lib/tnl-arp-cache.c \
249 lib/tnl-arp-cache.h \
265 lib/vconn-provider.h \
275 lib/lldp/aa-structs.h \
277 lib/lldp/lldp-const.h \
278 lib/lldp/lldp-tlv.h \
281 lib/lldp/lldpd-structs.c \
282 lib/lldp/lldpd-structs.h
285 lib_libopenvswitch_la_SOURCES += \
286 lib/daemon-windows.c \
288 lib/getrusage-windows.c \
289 lib/latch-windows.c \
290 lib/route-table-stub.c \
293 lib_libopenvswitch_la_SOURCES += \
298 lib/socket-util-unix.c \
306 nodist_lib_libopenvswitch_la_SOURCES = \
308 CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
310 lib_LTLIBRARIES += lib/libsflow.la
311 lib_libsflow_la_LDFLAGS = \
312 -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
313 -Wl,--version-script=$(top_builddir)/lib/libsflow.sym \
315 lib_libsflow_la_SOURCES = \
319 lib/sflow_sampler.c \
322 lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
323 lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
325 lib_libsflow_la_CFLAGS += -Wno-unused
327 if HAVE_WNO_UNUSED_PARAMETER
328 lib_libsflow_la_CFLAGS += -Wno-unused-parameter
332 lib_libopenvswitch_la_SOURCES += \
337 lib/netlink-notifier.c \
338 lib/netlink-notifier.h \
339 lib/netlink-protocol.h \
340 lib/netlink-socket.c \
341 lib/netlink-socket.h \
344 lib/rtnetlink-link.c \
345 lib/rtnetlink-link.h \
351 lib_libopenvswitch_la_SOURCES += \
357 lib_libopenvswitch_la_SOURCES += \
360 lib/netdev-windows.c \
361 lib/netlink-notifier.c \
362 lib/netlink-notifier.h \
363 lib/netlink-protocol.h \
364 lib/netlink-socket.c \
369 lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
371 lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
375 lib_libopenvswitch_la_SOURCES += \
376 lib/route-table-stub.c
380 lib_libopenvswitch_la_SOURCES += \
384 lib/route-table-bsd.c
388 lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
389 nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
390 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
391 $(AM_V_GEN)(echo '#include "lib/dhparams.h"' && \
392 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
393 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
394 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
395 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp && \
396 mv lib/dhparams.c.tmp lib/dhparams.c
398 lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
402 $(srcdir)/lib/libopenvswitch.pc \
403 $(srcdir)/lib/libsflow.pc
414 lib/coverage-unixctl.man \
417 lib/db-ctl-base.man \
419 lib/memory-unixctl.man \
420 lib/ofp-version.man \
423 lib/service-syn.man \
424 lib/ssl-bootstrap.man \
425 lib/ssl-bootstrap-syn.man \
426 lib/ssl-peer-ca-cert.man \
431 lib/unixctl-syn.man \
432 lib/vconn-active.man \
433 lib/vconn-passive.man \
434 lib/vlog-unixctl.man \
439 OVSIDL_BUILT += lib/vswitch-idl.c lib/vswitch-idl.h lib/vswitch-idl.ovsidl
441 EXTRA_DIST += lib/vswitch-idl.ann
442 $(srcdir)/lib/vswitch-idl.ovsidl: vswitchd/vswitch.ovsschema lib/vswitch-idl.ann
443 $(AM_V_GEN)$(OVSDB_IDLC) annotate $(srcdir)/vswitchd/vswitch.ovsschema $(srcdir)/lib/vswitch-idl.ann > $@.tmp && mv $@.tmp $@
445 lib/dirs.c: lib/dirs.c.in Makefile
446 $(AM_V_GEN)($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
447 -e 's,[@]srcdir[@],$(srcdir),g' \
448 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
449 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
450 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
451 -e 's,[@]bindir[@],"$(bindir)",g' \
452 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
453 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
454 > lib/dirs.c.tmp && \
455 mv lib/dirs.c.tmp lib/dirs.c
457 lib/meta-flow.inc: $(srcdir)/build-aux/extract-ofp-fields lib/meta-flow.h
458 $(AM_V_GEN)$(run_python) $^ --meta-flow > $@.tmp && mv $@.tmp $@
459 lib/meta-flow.lo: lib/meta-flow.inc
460 lib/nx-match.inc: $(srcdir)/build-aux/extract-ofp-fields lib/meta-flow.h
461 $(AM_V_GEN)$(run_python) $^ --nx-match > $@.tmp && mv $@.tmp $@
462 lib/nx-match.lo: lib/nx-match.inc
463 CLEANFILES += lib/meta-flow.inc lib/nx-match.inc
464 EXTRA_DIST += build-aux/extract-ofp-fields
466 lib/ofp-actions.inc1: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
467 $(AM_V_GEN)$(run_python) $^ --prototypes > $@.tmp && mv $@.tmp $@
468 lib/ofp-actions.inc2: $(srcdir)/build-aux/extract-ofp-actions lib/ofp-actions.c
469 $(AM_V_GEN)$(run_python) $^ --definitions > $@.tmp && mv $@.tmp $@
470 lib/ofp-actions.lo: lib/ofp-actions.inc1 lib/ofp-actions.inc2
471 CLEANFILES += lib/ofp-actions.inc1 lib/ofp-actions.inc2
472 EXTRA_DIST += build-aux/extract-ofp-actions
474 lib/ofp-errors.inc: lib/ofp-errors.h include/openflow/openflow-common.h \
475 $(srcdir)/build-aux/extract-ofp-errors
476 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-errors \
477 $(srcdir)/lib/ofp-errors.h \
478 $(srcdir)/include/openflow/openflow-common.h > $@.tmp && \
480 lib/ofp-errors.c: lib/ofp-errors.inc
481 EXTRA_DIST += build-aux/extract-ofp-errors
483 lib/ofp-msgs.inc: lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
484 $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
485 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
486 lib/ofp-msgs.c: lib/ofp-msgs.inc
487 EXTRA_DIST += build-aux/extract-ofp-msgs
489 INSTALL_DATA_LOCAL += lib-install-data-local
490 lib-install-data-local:
491 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
492 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
493 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
494 $(MKDIR_P) $(DESTDIR)$(DBDIR)