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 \
100 lib/netdev-provider.h \
127 lib/ofp-version-opt.h \
128 lib/ofp-version-opt.c \
131 lib/ovs-atomic-c11.h \
132 lib/ovs-atomic-clang.h \
133 lib/ovs-atomic-flag-gcc4.7+.h \
134 lib/ovs-atomic-gcc4+.c \
135 lib/ovs-atomic-gcc4+.h \
136 lib/ovs-atomic-gcc4.7+.h \
137 lib/ovs-atomic-pthreads.c \
138 lib/ovs-atomic-pthreads.h \
146 lib/ovsdb-idl-provider.h \
190 lib/stream-provider.h \
223 lib/vconn-provider.h \
238 nodist_lib_libopenvswitch_a_SOURCES = \
240 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
242 noinst_LIBRARIES += lib/libsflow.a
243 lib_libsflow_a_SOURCES = \
247 lib/sflow_sampler.c \
250 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
252 lib_libsflow_a_CFLAGS += -Wno-unused
254 if HAVE_WNO_UNUSED_PARAMETER
255 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
259 lib_libopenvswitch_a_SOURCES += \
264 lib/netlink-notifier.c \
265 lib/netlink-notifier.h \
266 lib/netlink-protocol.h \
267 lib/netlink-socket.c \
268 lib/netlink-socket.h \
269 lib/rtnetlink-link.c \
270 lib/rtnetlink-link.h \
276 lib_libopenvswitch_a_SOURCES += lib/async-append-aio.c
278 lib_libopenvswitch_a_SOURCES += lib/async-append-null.c
282 lib_libopenvswitch_a_SOURCES += \
283 lib/route-table-stub.c
287 lib_libopenvswitch_a_SOURCES += \
291 lib/route-table-bsd.c
295 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
296 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
297 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
298 (echo '#include "lib/dhparams.h"' && \
299 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
300 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
301 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
302 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
303 mv lib/dhparams.c.tmp lib/dhparams.c
305 lib_libopenvswitch_a_SOURCES += lib/stream-nossl.c
317 lib/coverage-unixctl.man \
320 lib/memory-unixctl.man \
321 lib/ofp-version.man \
323 lib/ssl-bootstrap.man \
324 lib/ssl-bootstrap-syn.man \
325 lib/ssl-peer-ca-cert.man \
330 lib/unixctl-syn.man \
331 lib/vconn-active.man \
332 lib/vconn-passive.man \
333 lib/vlog-unixctl.man \
339 $(srcdir)/lib/vswitch-idl.c \
340 $(srcdir)/lib/vswitch-idl.h \
341 $(srcdir)/lib/vswitch-idl.ovsidl \
342 $(srcdir)/lib/vtep-idl.c \
343 $(srcdir)/lib/vtep-idl.h \
344 $(srcdir)/lib/vtep-idl.ovsidl
346 EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
347 VSWITCH_IDL_FILES = \
348 $(srcdir)/vswitchd/vswitch.ovsschema \
349 $(srcdir)/lib/vswitch-idl.ann
350 $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
351 $(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
354 EXTRA_DIST += $(srcdir)/lib/vtep-idl.ann
356 $(srcdir)/vtep/vtep.ovsschema \
357 $(srcdir)/lib/vtep-idl.ann
358 $(srcdir)/lib/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
359 $(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp
362 lib/dirs.c: lib/dirs.c.in Makefile
363 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
364 -e 's,[@]srcdir[@],$(srcdir),g' \
365 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
366 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
367 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
368 -e 's,[@]bindir[@],"$(bindir)",g' \
369 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
370 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
372 mv lib/dirs.c.tmp lib/dirs.c
374 $(srcdir)/lib/ofp-errors.inc: \
375 lib/ofp-errors.h include/openflow/openflow-common.h \
376 $(srcdir)/build-aux/extract-ofp-errors
377 $(run_python) $(srcdir)/build-aux/extract-ofp-errors \
378 $(srcdir)/lib/ofp-errors.h \
379 $(srcdir)/include/openflow/openflow-common.h > $@.tmp
381 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
382 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
384 $(srcdir)/lib/ofp-msgs.inc: \
385 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
386 $(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
387 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
388 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
389 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
391 INSTALL_DATA_LOCAL += lib-install-data-local
392 lib-install-data-local:
393 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
394 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
395 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
396 $(MKDIR_P) $(DESTDIR)$(DBDIR)
398 if !USE_LINKER_SECTIONS
399 # All distributed sources, with names adjust properly for referencing
402 `for file in $(DIST_SOURCES); do \
403 if test -f $$file; then \
406 echo $(VPATH)/$$file; \
410 lib/coverage.$(OBJEXT): lib/coverage.def
411 lib/coverage.def: $(DIST_SOURCES)
412 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
413 CLEANFILES += lib/coverage.def
415 lib/vlog.$(OBJEXT): lib/vlog-modules.def
416 lib/vlog-modules.def: $(DIST_SOURCES)
417 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 > $@
418 CLEANFILES += lib/vlog-modules.def