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 \
83 lib/netdev-provider.h \
108 lib/ovsdb-idl-provider.h \
144 lib/stream-provider.h \
175 lib/vconn-provider.h \
183 nodist_lib_libopenvswitch_a_SOURCES = \
185 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
187 noinst_LIBRARIES += lib/libsflow.a
188 lib_libsflow_a_SOURCES = \
192 lib/sflow_sampler.c \
195 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
197 lib_libsflow_a_CFLAGS += -Wno-unused
199 if HAVE_WNO_UNUSED_PARAMETER
200 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
204 lib_libopenvswitch_a_SOURCES += \
211 lib/netlink-notifier.c \
212 lib/netlink-notifier.h \
213 lib/netlink-protocol.h \
214 lib/netlink-socket.c \
215 lib/netlink-socket.h \
216 lib/rtnetlink-link.c \
217 lib/rtnetlink-link.h \
223 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
224 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
225 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
226 (echo '#include "lib/dhparams.h"' && \
227 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
228 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
229 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
230 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
231 mv lib/dhparams.c.tmp lib/dhparams.c
233 lib_libopenvswitch_a_SOURCES += lib/stream-nossl.c
247 lib/leak-checker.man \
248 lib/ssl-bootstrap.man \
249 lib/ssl-bootstrap-syn.man \
250 lib/ssl-peer-ca-cert.man \
253 lib/stress-unixctl.man \
256 lib/unixctl-syn.man \
257 lib/vconn-active.man \
258 lib/vconn-passive.man \
259 lib/vlog-unixctl.man \
263 lib/dirs.c: lib/dirs.c.in Makefile
264 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
265 -e 's,[@]srcdir[@],$(srcdir),g' \
266 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
267 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
268 -e 's,[@]bindir[@],"$(bindir)",g' \
269 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
270 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
272 mv lib/dirs.c.tmp lib/dirs.c
274 $(srcdir)/lib/ofp-errors.c: \
275 include/openflow/openflow.h include/openflow/nicira-ext.h \
276 build-aux/extract-ofp-errors
277 cd $(srcdir)/include && \
278 $(PYTHON) ../build-aux/extract-ofp-errors \
279 openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
280 EXTRA_DIST += build-aux/extract-ofp-errors
282 INSTALL_DATA_LOCAL += lib-install-data-local
283 lib-install-data-local:
284 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
285 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
286 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
288 if !USE_LINKER_SECTIONS
289 # All distributed sources, with names adjust properly for referencing
292 `for file in $(DIST_SOURCES); do \
293 if test -f $$file; then \
296 echo $(VPATH)/$$file; \
300 lib/coverage.$(OBJEXT): lib/coverage.def
301 lib/coverage.def: $(DIST_SOURCES)
302 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
303 CLEANFILES += lib/coverage.def
305 lib/stress.$(OBJEXT): lib/stress.def
306 lib/stress.def: $(DIST_SOURCES)
307 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
308 CLEANFILES += lib/stress.def
310 lib/vlog.$(OBJEXT): lib/vlog-modules.def
311 lib/vlog-modules.def: $(DIST_SOURCES)
312 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 > $@
313 CLEANFILES += lib/vlog-modules.def