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 \
72 lib/learning-switch.c \
73 lib/learning-switch.h \
85 lib/netdev-provider.h \
110 lib/ovsdb-idl-provider.h \
146 lib/stream-provider.h \
177 lib/vconn-provider.h \
185 nodist_lib_libopenvswitch_a_SOURCES = \
187 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
189 noinst_LIBRARIES += lib/libsflow.a
190 lib_libsflow_a_SOURCES = \
194 lib/sflow_sampler.c \
197 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
199 lib_libsflow_a_CFLAGS += -Wno-unused
201 if HAVE_WNO_UNUSED_PARAMETER
202 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
206 lib_libopenvswitch_a_SOURCES += \
213 lib/netlink-notifier.c \
214 lib/netlink-notifier.h \
215 lib/netlink-protocol.h \
216 lib/netlink-socket.c \
217 lib/netlink-socket.h \
218 lib/rtnetlink-link.c \
219 lib/rtnetlink-link.h \
225 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
226 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
227 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
228 (echo '#include "lib/dhparams.h"' && \
229 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
230 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
231 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
232 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
233 mv lib/dhparams.c.tmp lib/dhparams.c
235 lib_libopenvswitch_a_SOURCES += lib/stream-nossl.c
249 lib/leak-checker.man \
250 lib/ssl-bootstrap.man \
251 lib/ssl-bootstrap-syn.man \
252 lib/ssl-peer-ca-cert.man \
255 lib/stress-unixctl.man \
258 lib/unixctl-syn.man \
259 lib/vconn-active.man \
260 lib/vconn-passive.man \
261 lib/vlog-unixctl.man \
265 lib/dirs.c: lib/dirs.c.in Makefile
266 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
267 -e 's,[@]srcdir[@],$(srcdir),g' \
268 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
269 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
270 -e 's,[@]bindir[@],"$(bindir)",g' \
271 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
272 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
274 mv lib/dirs.c.tmp lib/dirs.c
276 $(srcdir)/lib/ofp-errors.c: \
277 include/openflow/openflow.h include/openflow/nicira-ext.h \
278 build-aux/extract-ofp-errors
279 cd $(srcdir)/include && \
280 $(PYTHON) ../build-aux/extract-ofp-errors \
281 openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
282 EXTRA_DIST += build-aux/extract-ofp-errors
284 INSTALL_DATA_LOCAL += lib-install-data-local
285 lib-install-data-local:
286 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
287 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
288 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
290 if !USE_LINKER_SECTIONS
291 # All distributed sources, with names adjust properly for referencing
294 `for file in $(DIST_SOURCES); do \
295 if test -f $$file; then \
298 echo $(VPATH)/$$file; \
302 lib/coverage.$(OBJEXT): lib/coverage.def
303 lib/coverage.def: $(DIST_SOURCES)
304 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
305 CLEANFILES += lib/coverage.def
307 lib/stress.$(OBJEXT): lib/stress.def
308 lib/stress.def: $(DIST_SOURCES)
309 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
310 CLEANFILES += lib/stress.def
312 lib/vlog.$(OBJEXT): lib/vlog-modules.def
313 lib/vlog-modules.def: $(DIST_SOURCES)
314 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 > $@
315 CLEANFILES += lib/vlog-modules.def