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 = \
45 lib/dynamic-string.c \
46 lib/dynamic-string.h \
63 lib/learning-switch.c \
64 lib/learning-switch.h \
72 lib/netdev-provider.h \
92 lib/ovsdb-idl-provider.h \
126 lib/stream-provider.h \
152 lib/vconn-provider.h \
158 nodist_lib_libopenvswitch_a_SOURCES = \
160 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
162 noinst_LIBRARIES += lib/libsflow.a
163 lib_libsflow_a_SOURCES = \
167 lib/sflow_sampler.c \
170 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
172 lib_libsflow_a_CFLAGS += -Wno-unused
174 if HAVE_WNO_UNUSED_PARAMETER
175 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
179 lib_libopenvswitch_a_SOURCES += \
184 lib/netlink-protocol.h \
192 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
193 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
194 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
195 (echo '#include "lib/dhparams.h"' && \
196 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
197 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
198 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
199 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
200 mv lib/dhparams.c.tmp lib/dhparams.c
215 lib/leak-checker.man \
216 lib/ssl-bootstrap.man \
217 lib/ssl-bootstrap-syn.man \
218 lib/ssl-peer-ca-cert.man \
221 lib/stress-unixctl.man \
223 lib/unixctl-syn.man \
224 lib/vconn-active.man \
225 lib/vconn-passive.man \
226 lib/vlog-unixctl.man \
230 lib/dirs.c: lib/dirs.c.in Makefile
231 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
232 -e 's,[@]srcdir[@],$(srcdir),g' \
233 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
234 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
235 -e 's,[@]bindir[@],"$(bindir)",g' \
236 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
238 mv lib/dirs.c.tmp lib/dirs.c
240 install-data-local: lib-install-data-local
241 lib-install-data-local:
242 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
243 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
244 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
246 if !USE_LINKER_SECTIONS
247 # All distributed sources, with names adjust properly for referencing
250 `for file in $(DIST_SOURCES); do \
251 if test -f $$file; then \
254 echo $(VPATH)/$$file; \
258 lib/coverage.$(OBJEXT): lib/coverage.def
259 lib/coverage.def: $(DIST_SOURCES)
260 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
261 CLEANFILES += lib/coverage.def
263 lib/stress.$(OBJEXT): lib/stress.def
264 lib/stress.def: $(DIST_SOURCES)
265 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
266 CLEANFILES += lib/stress.def
268 lib/vlog.$(OBJEXT): lib/vlog-modules.def
269 lib/vlog-modules.def: $(DIST_SOURCES)
270 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 > $@
271 CLEANFILES += lib/vlog-modules.def