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 = \
50 lib/dynamic-string.c \
51 lib/dynamic-string.h \
76 lib/learning-switch.c \
77 lib/learning-switch.h \
93 lib/netdev-provider.h \
120 lib/ofp-version-opt.h \
121 lib/ofp-version-opt.c \
124 lib/ovs-atomic-c11.h \
125 lib/ovs-atomic-gcc4+.c \
126 lib/ovs-atomic-gcc4+.h \
127 lib/ovs-atomic-gcc4.7+.h \
128 lib/ovs-atomic-pthreads.c \
129 lib/ovs-atomic-pthreads.h \
137 lib/ovsdb-idl-provider.h \
179 lib/stream-provider.h \
210 lib/vconn-provider.h \
223 nodist_lib_libopenvswitch_a_SOURCES = \
225 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
227 noinst_LIBRARIES += lib/libsflow.a
228 lib_libsflow_a_SOURCES = \
232 lib/sflow_sampler.c \
235 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
237 lib_libsflow_a_CFLAGS += -Wno-unused
239 if HAVE_WNO_UNUSED_PARAMETER
240 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
244 lib_libopenvswitch_a_SOURCES += \
249 lib/netlink-notifier.c \
250 lib/netlink-notifier.h \
251 lib/netlink-protocol.h \
252 lib/netlink-socket.c \
253 lib/netlink-socket.h \
254 lib/rtnetlink-link.c \
255 lib/rtnetlink-link.h \
261 lib_libopenvswitch_a_SOURCES += \
262 lib/route-table-stub.c
266 lib_libopenvswitch_a_SOURCES += \
270 lib/route-table-bsd.c
274 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
275 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
276 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
277 (echo '#include "lib/dhparams.h"' && \
278 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
279 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
280 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
281 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
282 mv lib/dhparams.c.tmp lib/dhparams.c
284 lib_libopenvswitch_a_SOURCES += lib/stream-nossl.c
296 lib/coverage-unixctl.man \
299 lib/memory-unixctl.man \
300 lib/ofp-version.man \
302 lib/ssl-bootstrap.man \
303 lib/ssl-bootstrap-syn.man \
304 lib/ssl-peer-ca-cert.man \
309 lib/unixctl-syn.man \
310 lib/vconn-active.man \
311 lib/vconn-passive.man \
312 lib/vlog-unixctl.man \
318 $(srcdir)/lib/vswitch-idl.c \
319 $(srcdir)/lib/vswitch-idl.h \
320 $(srcdir)/lib/vswitch-idl.ovsidl
322 EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
323 VSWITCH_IDL_FILES = \
324 $(srcdir)/vswitchd/vswitch.ovsschema \
325 $(srcdir)/lib/vswitch-idl.ann
326 $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
327 $(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
330 lib/dirs.c: lib/dirs.c.in Makefile
331 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
332 -e 's,[@]srcdir[@],$(srcdir),g' \
333 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
334 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
335 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
336 -e 's,[@]bindir[@],"$(bindir)",g' \
337 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
338 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
340 mv lib/dirs.c.tmp lib/dirs.c
342 $(srcdir)/lib/ofp-errors.inc: \
343 lib/ofp-errors.h include/openflow/openflow-common.h \
344 $(srcdir)/build-aux/extract-ofp-errors
345 $(run_python) $(srcdir)/build-aux/extract-ofp-errors \
346 $(srcdir)/lib/ofp-errors.h \
347 $(srcdir)/include/openflow/openflow-common.h > $@.tmp
349 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
350 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
352 $(srcdir)/lib/ofp-msgs.inc: \
353 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
354 $(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
355 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
356 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
357 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
359 INSTALL_DATA_LOCAL += lib-install-data-local
360 lib-install-data-local:
361 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
362 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
363 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
364 $(MKDIR_P) $(DESTDIR)$(DBDIR)
366 if !USE_LINKER_SECTIONS
367 # All distributed sources, with names adjust properly for referencing
370 `for file in $(DIST_SOURCES); do \
371 if test -f $$file; then \
374 echo $(VPATH)/$$file; \
378 lib/coverage.$(OBJEXT): lib/coverage.def
379 lib/coverage.def: $(DIST_SOURCES)
380 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
381 CLEANFILES += lib/coverage.def
383 lib/vlog.$(OBJEXT): lib/vlog-modules.def
384 lib/vlog-modules.def: $(DIST_SOURCES)
385 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 > $@
386 CLEANFILES += lib/vlog-modules.def