1 # Copyright (C) 2009, 2010 Nicira Networks, 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 = \
29 lib/coverage-counters.h \
46 lib/dynamic-string.c \
47 lib/dynamic-string.h \
64 lib/learning-switch.c \
65 lib/learning-switch.h \
73 lib/netdev-provider.h \
93 lib/ovsdb-idl-provider.h \
131 lib/stream-provider.h \
155 lib/vconn-provider.h \
161 nodist_lib_libopenvswitch_a_SOURCES = \
162 lib/coverage-counters.c \
164 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
166 noinst_LIBRARIES += lib/libsflow.a
167 lib_libsflow_a_SOURCES = \
171 lib/sflow_sampler.c \
174 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
176 lib_libsflow_a_CFLAGS += -Wno-unused
178 if HAVE_WNO_UNUSED_PARAMETER
179 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
183 lib_libopenvswitch_a_SOURCES += \
188 lib/netlink-protocol.h \
196 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
197 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
198 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
199 (echo '#include "lib/dhparams.h"' && \
200 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
201 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
202 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
203 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
204 mv lib/dhparams.c.tmp lib/dhparams.c
219 lib/leak-checker.man \
220 lib/ssl-bootstrap.man \
221 lib/ssl-bootstrap-syn.man \
222 lib/ssl-peer-ca-cert.man \
226 lib/unixctl-syn.man \
227 lib/vconn-active.man \
228 lib/vconn-passive.man \
229 lib/vlog-unixctl.man \
233 lib/dirs.c: lib/dirs.c.in Makefile
234 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
235 -e 's,[@]srcdir[@],$(srcdir),g' \
236 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
237 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
238 -e 's,[@]bindir[@],"$(bindir)",g' \
239 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
241 mv lib/dirs.c.tmp lib/dirs.c
243 install-data-local: lib-install-data-local
244 lib-install-data-local:
245 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
246 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
247 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
249 # All distributed sources, with names adjust properly for referencing
252 `for file in $(DIST_SOURCES); do \
253 if test -f $$file; then \
256 echo $(VPATH)/$$file; \
260 # All the source files that have coverage counters.
284 vswitchd/ovs-brcompatd.c
285 lib/coverage-counters.c: $(COVERAGE_FILES) lib/coverage-scan.pl
286 (cd $(srcdir) && $(PERL) lib/coverage-scan.pl $(COVERAGE_FILES)) > $@.tmp
288 EXTRA_DIST += lib/coverage-scan.pl
290 if !USE_LINKER_SECTIONS
291 lib/vlog.$(OBJEXT): lib/vlog-modules.def
292 lib/vlog-modules.def: $(DIST_SOURCES)
293 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 > $@
294 CLEANFILES += lib/vlog-modules.def