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 \
88 lib/learning-switch.c \
89 lib/learning-switch.h \
105 lib/netdev-provider.h \
132 lib/ofp-version-opt.h \
133 lib/ofp-version-opt.c \
136 lib/ovs-atomic-c11.h \
137 lib/ovs-atomic-clang.h \
138 lib/ovs-atomic-flag-gcc4.7+.h \
139 lib/ovs-atomic-gcc4+.c \
140 lib/ovs-atomic-gcc4+.h \
141 lib/ovs-atomic-gcc4.7+.h \
142 lib/ovs-atomic-pthreads.c \
143 lib/ovs-atomic-pthreads.h \
151 lib/ovsdb-idl-provider.h \
195 lib/stream-provider.h \
226 lib/vconn-provider.h \
244 nodist_lib_libopenvswitch_la_SOURCES = \
246 CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
248 lib_LTLIBRARIES += lib/libsflow.la
249 lib_libsflow_la_LDFLAGS = -release $(VERSION)
250 lib_libsflow_la_SOURCES = \
254 lib/sflow_sampler.c \
257 lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
258 lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
260 lib_libsflow_la_CFLAGS += -Wno-unused
262 if HAVE_WNO_UNUSED_PARAMETER
263 lib_libsflow_la_CFLAGS += -Wno-unused-parameter
267 lib_libopenvswitch_la_SOURCES += \
272 lib/netlink-notifier.c \
273 lib/netlink-notifier.h \
274 lib/netlink-protocol.h \
275 lib/netlink-socket.c \
276 lib/netlink-socket.h \
277 lib/rtnetlink-link.c \
278 lib/rtnetlink-link.h \
284 lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
286 lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
290 lib_libopenvswitch_la_SOURCES += \
291 lib/route-table-stub.c
295 lib_libopenvswitch_la_SOURCES += \
299 lib/route-table-bsd.c
303 lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
304 nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
305 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
306 (echo '#include "lib/dhparams.h"' && \
307 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
308 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
309 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
310 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
311 mv lib/dhparams.c.tmp lib/dhparams.c
313 lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
325 lib/coverage-unixctl.man \
328 lib/memory-unixctl.man \
329 lib/ofp-version.man \
331 lib/ssl-bootstrap.man \
332 lib/ssl-bootstrap-syn.man \
333 lib/ssl-peer-ca-cert.man \
338 lib/unixctl-syn.man \
339 lib/vconn-active.man \
340 lib/vconn-passive.man \
341 lib/vlog-unixctl.man \
347 $(srcdir)/lib/vswitch-idl.c \
348 $(srcdir)/lib/vswitch-idl.h \
349 $(srcdir)/lib/vswitch-idl.ovsidl \
350 $(srcdir)/lib/vtep-idl.c \
351 $(srcdir)/lib/vtep-idl.h \
352 $(srcdir)/lib/vtep-idl.ovsidl
354 EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
355 VSWITCH_IDL_FILES = \
356 $(srcdir)/vswitchd/vswitch.ovsschema \
357 $(srcdir)/lib/vswitch-idl.ann
358 $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
359 $(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
362 EXTRA_DIST += $(srcdir)/lib/vtep-idl.ann
364 $(srcdir)/vtep/vtep.ovsschema \
365 $(srcdir)/lib/vtep-idl.ann
366 $(srcdir)/lib/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
367 $(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp
370 lib/dirs.c: lib/dirs.c.in Makefile
371 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
372 -e 's,[@]srcdir[@],$(srcdir),g' \
373 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
374 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
375 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
376 -e 's,[@]bindir[@],"$(bindir)",g' \
377 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
378 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
380 mv lib/dirs.c.tmp lib/dirs.c
382 $(srcdir)/lib/ofp-errors.inc: \
383 lib/ofp-errors.h include/openflow/openflow-common.h \
384 $(srcdir)/build-aux/extract-ofp-errors
385 $(run_python) $(srcdir)/build-aux/extract-ofp-errors \
386 $(srcdir)/lib/ofp-errors.h \
387 $(srcdir)/include/openflow/openflow-common.h > $@.tmp
389 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
390 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
392 $(srcdir)/lib/ofp-msgs.inc: \
393 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
394 $(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
395 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
396 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
397 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
399 INSTALL_DATA_LOCAL += lib-install-data-local
400 lib-install-data-local:
401 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
402 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
403 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
404 $(MKDIR_P) $(DESTDIR)$(DBDIR)