1 # Copyright (C) 2009, 2010, 2011 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 = \
48 lib/dynamic-string.c \
49 lib/dynamic-string.h \
70 lib/learning-switch.c \
71 lib/learning-switch.h \
81 lib/netdev-provider.h \
106 lib/ovsdb-idl-provider.h \
142 lib/stream-provider.h \
173 lib/vconn-provider.h \
181 nodist_lib_libopenvswitch_a_SOURCES = \
183 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
185 noinst_LIBRARIES += lib/libsflow.a
186 lib_libsflow_a_SOURCES = \
190 lib/sflow_sampler.c \
193 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
195 lib_libsflow_a_CFLAGS += -Wno-unused
197 if HAVE_WNO_UNUSED_PARAMETER
198 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
202 lib_libopenvswitch_a_SOURCES += \
209 lib/netlink-notifier.c \
210 lib/netlink-notifier.h \
211 lib/netlink-protocol.h \
212 lib/netlink-socket.c \
213 lib/netlink-socket.h \
214 lib/rtnetlink-link.c \
215 lib/rtnetlink-link.h \
221 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
222 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
223 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
224 (echo '#include "lib/dhparams.h"' && \
225 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
226 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
227 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
228 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
229 mv lib/dhparams.c.tmp lib/dhparams.c
231 lib_libopenvswitch_a_SOURCES += lib/stream-nossl.c
245 lib/leak-checker.man \
246 lib/ssl-bootstrap.man \
247 lib/ssl-bootstrap-syn.man \
248 lib/ssl-peer-ca-cert.man \
251 lib/stress-unixctl.man \
254 lib/unixctl-syn.man \
255 lib/vconn-active.man \
256 lib/vconn-passive.man \
257 lib/vlog-unixctl.man \
261 lib/dirs.c: lib/dirs.c.in Makefile
262 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
263 -e 's,[@]srcdir[@],$(srcdir),g' \
264 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
265 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
266 -e 's,[@]bindir[@],"$(bindir)",g' \
267 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
268 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
270 mv lib/dirs.c.tmp lib/dirs.c
272 $(srcdir)/lib/ofp-errors.c: \
273 include/openflow/openflow.h include/openflow/nicira-ext.h \
274 build-aux/extract-ofp-errors
275 cd $(srcdir)/include && \
276 $(PYTHON) ../build-aux/extract-ofp-errors \
277 openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
278 EXTRA_DIST += build-aux/extract-ofp-errors
280 INSTALL_DATA_LOCAL += lib-install-data-local
281 lib-install-data-local:
282 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
283 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
284 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
286 if !USE_LINKER_SECTIONS
287 # All distributed sources, with names adjust properly for referencing
290 `for file in $(DIST_SOURCES); do \
291 if test -f $$file; then \
294 echo $(VPATH)/$$file; \
298 lib/coverage.$(OBJEXT): lib/coverage.def
299 lib/coverage.def: $(DIST_SOURCES)
300 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
301 CLEANFILES += lib/coverage.def
303 lib/stress.$(OBJEXT): lib/stress.def
304 lib/stress.def: $(DIST_SOURCES)
305 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
306 CLEANFILES += lib/stress.def
308 lib/vlog.$(OBJEXT): lib/vlog-modules.def
309 lib/vlog-modules.def: $(DIST_SOURCES)
310 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 > $@
311 CLEANFILES += lib/vlog-modules.def