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 \
79 lib/learning-switch.c \
80 lib/learning-switch.h \
96 lib/netdev-provider.h \
123 lib/ofp-version-opt.h \
124 lib/ofp-version-opt.c \
127 lib/ovs-atomic-c11.h \
128 lib/ovs-atomic-gcc4+.c \
129 lib/ovs-atomic-gcc4+.h \
130 lib/ovs-atomic-gcc4.7+.h \
131 lib/ovs-atomic-pthreads.c \
132 lib/ovs-atomic-pthreads.h \
140 lib/ovsdb-idl-provider.h \
182 lib/stream-provider.h \
211 lib/vconn-provider.h \
224 nodist_lib_libopenvswitch_a_SOURCES = \
226 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
228 noinst_LIBRARIES += lib/libsflow.a
229 lib_libsflow_a_SOURCES = \
233 lib/sflow_sampler.c \
236 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
238 lib_libsflow_a_CFLAGS += -Wno-unused
240 if HAVE_WNO_UNUSED_PARAMETER
241 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
245 lib_libopenvswitch_a_SOURCES += \
250 lib/netlink-notifier.c \
251 lib/netlink-notifier.h \
252 lib/netlink-protocol.h \
253 lib/netlink-socket.c \
254 lib/netlink-socket.h \
255 lib/rtnetlink-link.c \
256 lib/rtnetlink-link.h \
262 lib_libopenvswitch_a_SOURCES += lib/async-append-aio.c
264 lib_libopenvswitch_a_SOURCES += lib/async-append-null.c
268 lib_libopenvswitch_a_SOURCES += \
269 lib/route-table-stub.c
273 lib_libopenvswitch_a_SOURCES += \
277 lib/route-table-bsd.c
281 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
282 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
283 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
284 (echo '#include "lib/dhparams.h"' && \
285 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
286 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
287 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
288 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
289 mv lib/dhparams.c.tmp lib/dhparams.c
291 lib_libopenvswitch_a_SOURCES += lib/stream-nossl.c
303 lib/coverage-unixctl.man \
306 lib/memory-unixctl.man \
307 lib/ofp-version.man \
309 lib/ssl-bootstrap.man \
310 lib/ssl-bootstrap-syn.man \
311 lib/ssl-peer-ca-cert.man \
316 lib/unixctl-syn.man \
317 lib/vconn-active.man \
318 lib/vconn-passive.man \
319 lib/vlog-unixctl.man \
325 $(srcdir)/lib/vswitch-idl.c \
326 $(srcdir)/lib/vswitch-idl.h \
327 $(srcdir)/lib/vswitch-idl.ovsidl
329 EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
330 VSWITCH_IDL_FILES = \
331 $(srcdir)/vswitchd/vswitch.ovsschema \
332 $(srcdir)/lib/vswitch-idl.ann
333 $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
334 $(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
337 lib/dirs.c: lib/dirs.c.in Makefile
338 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
339 -e 's,[@]srcdir[@],$(srcdir),g' \
340 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
341 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
342 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
343 -e 's,[@]bindir[@],"$(bindir)",g' \
344 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
345 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
347 mv lib/dirs.c.tmp lib/dirs.c
349 $(srcdir)/lib/ofp-errors.inc: \
350 lib/ofp-errors.h include/openflow/openflow-common.h \
351 $(srcdir)/build-aux/extract-ofp-errors
352 $(run_python) $(srcdir)/build-aux/extract-ofp-errors \
353 $(srcdir)/lib/ofp-errors.h \
354 $(srcdir)/include/openflow/openflow-common.h > $@.tmp
356 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
357 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
359 $(srcdir)/lib/ofp-msgs.inc: \
360 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
361 $(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
362 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
363 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
364 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
366 INSTALL_DATA_LOCAL += lib-install-data-local
367 lib-install-data-local:
368 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
369 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
370 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
371 $(MKDIR_P) $(DESTDIR)$(DBDIR)
373 if !USE_LINKER_SECTIONS
374 # All distributed sources, with names adjust properly for referencing
377 `for file in $(DIST_SOURCES); do \
378 if test -f $$file; then \
381 echo $(VPATH)/$$file; \
385 lib/coverage.$(OBJEXT): lib/coverage.def
386 lib/coverage.def: $(DIST_SOURCES)
387 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
388 CLEANFILES += lib/coverage.def
390 lib/vlog.$(OBJEXT): lib/vlog-modules.def
391 lib/vlog-modules.def: $(DIST_SOURCES)
392 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 > $@
393 CLEANFILES += lib/vlog-modules.def