1 # Copyright (C) 2009, 2010, 2011, 2012, 2013 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 noinst_LIBRARIES += lib/libopenvswitch.a
10 lib_libopenvswitch_a_SOURCES = \
51 lib/dynamic-string.c \
52 lib/dynamic-string.h \
81 lib/learning-switch.c \
82 lib/learning-switch.h \
98 lib/netdev-provider.h \
125 lib/ofp-version-opt.h \
126 lib/ofp-version-opt.c \
129 lib/ovs-atomic-c11.h \
130 lib/ovs-atomic-clang.h \
131 lib/ovs-atomic-flag-gcc4.7+.h \
132 lib/ovs-atomic-gcc4+.c \
133 lib/ovs-atomic-gcc4+.h \
134 lib/ovs-atomic-gcc4.7+.h \
135 lib/ovs-atomic-pthreads.c \
136 lib/ovs-atomic-pthreads.h \
144 lib/ovsdb-idl-provider.h \
188 lib/stream-provider.h \
219 lib/vconn-provider.h \
234 nodist_lib_libopenvswitch_a_SOURCES = \
236 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
238 noinst_LIBRARIES += lib/libsflow.a
239 lib_libsflow_a_SOURCES = \
243 lib/sflow_sampler.c \
246 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
248 lib_libsflow_a_CFLAGS += -Wno-unused
250 if HAVE_WNO_UNUSED_PARAMETER
251 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
255 lib_libopenvswitch_a_SOURCES += \
260 lib/netlink-notifier.c \
261 lib/netlink-notifier.h \
262 lib/netlink-protocol.h \
263 lib/netlink-socket.c \
264 lib/netlink-socket.h \
265 lib/rtnetlink-link.c \
266 lib/rtnetlink-link.h \
272 lib_libopenvswitch_a_SOURCES += lib/async-append-aio.c
274 lib_libopenvswitch_a_SOURCES += lib/async-append-null.c
278 lib_libopenvswitch_a_SOURCES += \
279 lib/route-table-stub.c
283 lib_libopenvswitch_a_SOURCES += \
287 lib/route-table-bsd.c
291 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
292 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
293 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
294 (echo '#include "lib/dhparams.h"' && \
295 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
296 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
297 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
298 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
299 mv lib/dhparams.c.tmp lib/dhparams.c
301 lib_libopenvswitch_a_SOURCES += lib/stream-nossl.c
313 lib/coverage-unixctl.man \
316 lib/memory-unixctl.man \
317 lib/ofp-version.man \
319 lib/ssl-bootstrap.man \
320 lib/ssl-bootstrap-syn.man \
321 lib/ssl-peer-ca-cert.man \
326 lib/unixctl-syn.man \
327 lib/vconn-active.man \
328 lib/vconn-passive.man \
329 lib/vlog-unixctl.man \
335 $(srcdir)/lib/vswitch-idl.c \
336 $(srcdir)/lib/vswitch-idl.h \
337 $(srcdir)/lib/vswitch-idl.ovsidl \
338 $(srcdir)/lib/vtep-idl.c \
339 $(srcdir)/lib/vtep-idl.h \
340 $(srcdir)/lib/vtep-idl.ovsidl
342 EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
343 VSWITCH_IDL_FILES = \
344 $(srcdir)/vswitchd/vswitch.ovsschema \
345 $(srcdir)/lib/vswitch-idl.ann
346 $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
347 $(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
350 EXTRA_DIST += $(srcdir)/lib/vtep-idl.ann
352 $(srcdir)/vtep/vtep.ovsschema \
353 $(srcdir)/lib/vtep-idl.ann
354 $(srcdir)/lib/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
355 $(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp
358 lib/dirs.c: lib/dirs.c.in Makefile
359 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
360 -e 's,[@]srcdir[@],$(srcdir),g' \
361 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
362 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
363 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
364 -e 's,[@]bindir[@],"$(bindir)",g' \
365 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
366 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
368 mv lib/dirs.c.tmp lib/dirs.c
370 $(srcdir)/lib/ofp-errors.inc: \
371 lib/ofp-errors.h include/openflow/openflow-common.h \
372 $(srcdir)/build-aux/extract-ofp-errors
373 $(run_python) $(srcdir)/build-aux/extract-ofp-errors \
374 $(srcdir)/lib/ofp-errors.h \
375 $(srcdir)/include/openflow/openflow-common.h > $@.tmp
377 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
378 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
380 $(srcdir)/lib/ofp-msgs.inc: \
381 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
382 $(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
383 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
384 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
385 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
387 INSTALL_DATA_LOCAL += lib-install-data-local
388 lib-install-data-local:
389 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
390 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
391 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
392 $(MKDIR_P) $(DESTDIR)$(DBDIR)
394 if !USE_LINKER_SECTIONS
395 # All distributed sources, with names adjust properly for referencing
398 `for file in $(DIST_SOURCES); do \
399 if test -f $$file; then \
402 echo $(VPATH)/$$file; \
406 lib/coverage.$(OBJEXT): lib/coverage.def
407 lib/coverage.def: $(DIST_SOURCES)
408 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
409 CLEANFILES += lib/coverage.def
411 lib/vlog.$(OBJEXT): lib/vlog-modules.def
412 lib/vlog-modules.def: $(DIST_SOURCES)
413 sed -n 's|^VLOG_DEFINE_\(THIS_\)\{0,1\}MODULE(\([_a-zA-Z0-9]\{1,\}\)).*$$|VLOG_MODULE(\2)|p' $(all_sources) | LC_ALL=C sort -u > $@
414 CLEANFILES += lib/vlog-modules.def