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 = \
26 lib/coverage-counters.h \
41 lib/dynamic-string.c \
42 lib/dynamic-string.h \
57 lib/learning-switch.c \
58 lib/learning-switch.h \
65 lib/netdev-provider.h \
80 lib/ovsdb-idl-provider.h \
120 lib/stream-provider.h \
144 lib/vconn-provider.h \
148 lib/vlog-modules.def \
152 nodist_lib_libopenvswitch_a_SOURCES = \
153 lib/coverage-counters.c \
155 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
157 noinst_LIBRARIES += lib/libsflow.a
158 lib_libsflow_a_SOURCES = \
162 lib/sflow_sampler.c \
165 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
167 lib_libsflow_a_CFLAGS += -Wno-unused
171 lib_libopenvswitch_a_SOURCES += \
178 lib/netlink-protocol.h \
186 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
187 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
188 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
189 (echo '#include "lib/dhparams.h"' && \
190 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
191 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
192 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
193 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
194 mv lib/dhparams.c.tmp lib/dhparams.c
209 lib/leak-checker.man \
210 lib/ssl-bootstrap.man \
211 lib/ssl-bootstrap-syn.man \
212 lib/ssl-peer-ca-cert.man \
216 lib/unixctl-syn.man \
217 lib/vconn-active.man \
218 lib/vconn-passive.man \
219 lib/vlog-unixctl.man \
226 echo 'const char ovs_pkgdatadir[] = "$(pkgdatadir)";' && \
227 echo 'const char ovs_rundir[] = "@RUNDIR@";' && \
228 echo 'const char ovs_logdir[] = "@LOGDIR@";' && \
229 echo 'const char ovs_bindir[] = "$(bindir)";') > lib/dirs.c.tmp
230 mv lib/dirs.c.tmp lib/dirs.c
233 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
234 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
235 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
237 # All the source files that have coverage counters.
260 vswitchd/ovs-brcompatd.c
261 lib/coverage-counters.c: $(COVERAGE_FILES) lib/coverage-scan.pl
262 (cd $(srcdir) && $(PERL) lib/coverage-scan.pl $(COVERAGE_FILES)) > $@.tmp
264 EXTRA_DIST += lib/coverage-scan.pl
267 # Make sure that every vlog module listed in vlog-modules.def is
268 # actually used somewhere.
269 ALL_LOCAL += check-for-unused-vlog-modules
270 check-for-unused-vlog-modules:
271 if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \
273 decl_vlog=`sed -n 's/^VLOG_MODULE(\([_a-z0-9]\{1,\}\)).*$$/\1/p' \
274 lib/vlog-modules.def | \
277 used_vlog=`git grep VLM_ | \
278 sed -n 's/.*VLM_\([a-z_0-9]\{1,\}\).*/\1/p' | \
282 for decl in $$decl_vlog; do \
283 case " $$used_vlog " in \
285 *) echo "vlog module $$decl is declared in lib/vlog-modules.def \
286 but not used by any source file"; \
292 .PHONY: check-for-unused-vlog-modules