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)
11 lib_libopenvswitch_la_LDFLAGS = -release $(VERSION)
13 lib_libopenvswitch_la_SOURCES = \
56 lib/dynamic-string.c \
57 lib/dynamic-string.h \
87 lib/learning-switch.c \
88 lib/learning-switch.h \
104 lib/netdev-provider.h \
131 lib/ofp-version-opt.h \
132 lib/ofp-version-opt.c \
135 lib/ovs-atomic-c11.h \
136 lib/ovs-atomic-clang.h \
137 lib/ovs-atomic-flag-gcc4.7+.h \
138 lib/ovs-atomic-gcc4+.c \
139 lib/ovs-atomic-gcc4+.h \
140 lib/ovs-atomic-gcc4.7+.h \
141 lib/ovs-atomic-pthreads.c \
142 lib/ovs-atomic-pthreads.h \
150 lib/ovsdb-idl-provider.h \
194 lib/stream-provider.h \
225 lib/vconn-provider.h \
240 lib_libopenvswitch_la_SOURCES += lib/latch-windows.c
242 lib_libopenvswitch_la_SOURCES += lib/latch.c
249 nodist_lib_libopenvswitch_la_SOURCES = \
251 CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
253 lib_LTLIBRARIES += lib/libsflow.la
254 lib_libsflow_la_LDFLAGS = -release $(VERSION)
255 lib_libsflow_la_SOURCES = \
259 lib/sflow_sampler.c \
262 lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
263 lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
265 lib_libsflow_la_CFLAGS += -Wno-unused
267 if HAVE_WNO_UNUSED_PARAMETER
268 lib_libsflow_la_CFLAGS += -Wno-unused-parameter
272 lib_libopenvswitch_la_SOURCES += \
277 lib/netlink-notifier.c \
278 lib/netlink-notifier.h \
279 lib/netlink-protocol.h \
280 lib/netlink-socket.c \
281 lib/netlink-socket.h \
282 lib/rtnetlink-link.c \
283 lib/rtnetlink-link.h \
289 lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
291 lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
295 lib_libopenvswitch_la_SOURCES += \
296 lib/route-table-stub.c
300 lib_libopenvswitch_la_SOURCES += \
304 lib/route-table-bsd.c
308 lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
309 nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
310 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
311 (echo '#include "lib/dhparams.h"' && \
312 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
313 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
314 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
315 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
316 mv lib/dhparams.c.tmp lib/dhparams.c
318 lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
330 lib/coverage-unixctl.man \
333 lib/memory-unixctl.man \
334 lib/ofp-version.man \
336 lib/ssl-bootstrap.man \
337 lib/ssl-bootstrap-syn.man \
338 lib/ssl-peer-ca-cert.man \
343 lib/unixctl-syn.man \
344 lib/vconn-active.man \
345 lib/vconn-passive.man \
346 lib/vlog-unixctl.man \
352 $(srcdir)/lib/vswitch-idl.c \
353 $(srcdir)/lib/vswitch-idl.h \
354 $(srcdir)/lib/vswitch-idl.ovsidl \
355 $(srcdir)/lib/vtep-idl.c \
356 $(srcdir)/lib/vtep-idl.h \
357 $(srcdir)/lib/vtep-idl.ovsidl
359 EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
360 VSWITCH_IDL_FILES = \
361 $(srcdir)/vswitchd/vswitch.ovsschema \
362 $(srcdir)/lib/vswitch-idl.ann
363 $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
364 $(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
367 EXTRA_DIST += $(srcdir)/lib/vtep-idl.ann
369 $(srcdir)/vtep/vtep.ovsschema \
370 $(srcdir)/lib/vtep-idl.ann
371 $(srcdir)/lib/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
372 $(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp
375 lib/dirs.c: lib/dirs.c.in Makefile
376 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
377 -e 's,[@]srcdir[@],$(srcdir),g' \
378 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
379 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
380 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
381 -e 's,[@]bindir[@],"$(bindir)",g' \
382 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
383 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
385 mv lib/dirs.c.tmp lib/dirs.c
387 $(srcdir)/lib/ofp-errors.inc: \
388 lib/ofp-errors.h include/openflow/openflow-common.h \
389 $(srcdir)/build-aux/extract-ofp-errors
390 $(run_python) $(srcdir)/build-aux/extract-ofp-errors \
391 $(srcdir)/lib/ofp-errors.h \
392 $(srcdir)/include/openflow/openflow-common.h > $@.tmp
394 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
395 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
397 $(srcdir)/lib/ofp-msgs.inc: \
398 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
399 $(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
400 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
401 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
402 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
404 INSTALL_DATA_LOCAL += lib-install-data-local
405 lib-install-data-local:
406 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
407 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
408 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
409 $(MKDIR_P) $(DESTDIR)$(DBDIR)