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 \
78 lib/ovsdb-idl-provider.h \
118 lib/stream-provider.h \
142 lib/vconn-provider.h \
146 lib/vlog-modules.def \
150 nodist_lib_libopenvswitch_a_SOURCES = \
151 lib/coverage-counters.c \
153 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
155 noinst_LIBRARIES += lib/libsflow.a
156 lib_libsflow_a_SOURCES = \
160 lib/sflow_sampler.c \
163 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
165 lib_libsflow_a_CFLAGS += -Wno-unused
169 lib_libopenvswitch_a_SOURCES += \
176 lib/netlink-protocol.h \
184 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
185 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
186 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
187 (echo '#include "lib/dhparams.h"' && \
188 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
189 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
190 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
191 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
192 mv lib/dhparams.c.tmp lib/dhparams.c
207 lib/leak-checker.man \
208 lib/ssl-bootstrap.man \
209 lib/ssl-bootstrap-syn.man \
210 lib/ssl-peer-ca-cert.man \
214 lib/unixctl-syn.man \
215 lib/vconn-active.man \
216 lib/vconn-passive.man \
217 lib/vlog-unixctl.man \
224 echo 'const char ovs_pkgdatadir[] = "$(pkgdatadir)";' && \
225 echo 'const char ovs_rundir[] = "@RUNDIR@";' && \
226 echo 'const char ovs_logdir[] = "@LOGDIR@";' && \
227 echo 'const char ovs_bindir[] = "$(bindir)";') > lib/dirs.c.tmp
228 mv lib/dirs.c.tmp lib/dirs.c
231 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
232 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
233 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
235 # All the source files that have coverage counters.
258 vswitchd/ovs-brcompatd.c
259 lib/coverage-counters.c: $(COVERAGE_FILES) lib/coverage-scan.pl
260 (cd $(srcdir) && $(PERL) lib/coverage-scan.pl $(COVERAGE_FILES)) > $@.tmp
262 EXTRA_DIST += lib/coverage-scan.pl
265 # Make sure that every vlog module listed in vlog-modules.def is
266 # actually used somewhere.
267 ALL_LOCAL += check-for-unused-vlog-modules
268 check-for-unused-vlog-modules:
269 if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \
271 decl_vlog=`sed -n 's/^VLOG_MODULE(\([_a-z0-9]\{1,\}\)).*$$/\1/p' \
272 lib/vlog-modules.def | \
275 used_vlog=`git grep VLM_ | \
276 sed -n 's/.*VLM_\([a-z_0-9]\{1,\}\).*/\1/p' | \
280 for decl in $$decl_vlog; do \
281 case " $$used_vlog " in \
283 *) echo "vlog module $$decl is declared in lib/vlog-modules.def \
284 but not used by any source file"; \
290 .PHONY: check-for-unused-vlog-modules