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 = \
46 lib/dynamic-string.c \
47 lib/dynamic-string.h \
66 lib/learning-switch.c \
67 lib/learning-switch.h \
77 lib/netdev-provider.h \
101 lib/ovsdb-idl-provider.h \
137 lib/stream-provider.h \
168 lib/vconn-provider.h \
174 nodist_lib_libopenvswitch_a_SOURCES = \
176 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
178 noinst_LIBRARIES += lib/libsflow.a
179 lib_libsflow_a_SOURCES = \
183 lib/sflow_sampler.c \
186 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
188 lib_libsflow_a_CFLAGS += -Wno-unused
190 if HAVE_WNO_UNUSED_PARAMETER
191 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
195 lib_libopenvswitch_a_SOURCES += \
202 lib/netlink-protocol.h \
203 lib/netlink-socket.c \
204 lib/netlink-socket.h \
207 lib/rtnetlink-link.c \
208 lib/rtnetlink-link.h \
214 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
215 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
216 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
217 (echo '#include "lib/dhparams.h"' && \
218 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
219 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
220 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
221 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
222 mv lib/dhparams.c.tmp lib/dhparams.c
224 lib_libopenvswitch_a_SOURCES += lib/stream-nossl.c
238 lib/leak-checker.man \
239 lib/ssl-bootstrap.man \
240 lib/ssl-bootstrap-syn.man \
241 lib/ssl-peer-ca-cert.man \
244 lib/stress-unixctl.man \
247 lib/unixctl-syn.man \
248 lib/vconn-active.man \
249 lib/vconn-passive.man \
250 lib/vlog-unixctl.man \
254 lib/dirs.c: lib/dirs.c.in Makefile
255 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
256 -e 's,[@]srcdir[@],$(srcdir),g' \
257 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
258 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
259 -e 's,[@]bindir[@],"$(bindir)",g' \
260 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
262 mv lib/dirs.c.tmp lib/dirs.c
264 $(srcdir)/lib/ofp-errors.c: \
265 include/openflow/openflow.h include/openflow/nicira-ext.h \
266 build-aux/extract-ofp-errors
267 cd $(srcdir)/include && \
268 $(PYTHON) ../build-aux/extract-ofp-errors \
269 openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
270 EXTRA_DIST += build-aux/extract-ofp-errors
272 install-data-local: lib-install-data-local
273 lib-install-data-local:
274 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
275 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
276 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
278 if !USE_LINKER_SECTIONS
279 # All distributed sources, with names adjust properly for referencing
282 `for file in $(DIST_SOURCES); do \
283 if test -f $$file; then \
286 echo $(VPATH)/$$file; \
290 lib/coverage.$(OBJEXT): lib/coverage.def
291 lib/coverage.def: $(DIST_SOURCES)
292 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
293 CLEANFILES += lib/coverage.def
295 lib/stress.$(OBJEXT): lib/stress.def
296 lib/stress.def: $(DIST_SOURCES)
297 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
298 CLEANFILES += lib/stress.def
300 lib/vlog.$(OBJEXT): lib/vlog-modules.def
301 lib/vlog-modules.def: $(DIST_SOURCES)
302 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 > $@
303 CLEANFILES += lib/vlog-modules.def