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 \
176 nodist_lib_libopenvswitch_a_SOURCES = \
178 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
180 noinst_LIBRARIES += lib/libsflow.a
181 lib_libsflow_a_SOURCES = \
185 lib/sflow_sampler.c \
188 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
190 lib_libsflow_a_CFLAGS += -Wno-unused
192 if HAVE_WNO_UNUSED_PARAMETER
193 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
197 lib_libopenvswitch_a_SOURCES += \
203 lib/netlink-protocol.h \
204 lib/netlink-socket.c \
205 lib/netlink-socket.h \
208 lib/rtnetlink-link.c \
209 lib/rtnetlink-link.h \
215 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
216 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
217 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
218 (echo '#include "lib/dhparams.h"' && \
219 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
220 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
221 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
222 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
223 mv lib/dhparams.c.tmp lib/dhparams.c
237 lib/leak-checker.man \
238 lib/ssl-bootstrap.man \
239 lib/ssl-bootstrap-syn.man \
240 lib/ssl-peer-ca-cert.man \
243 lib/stress-unixctl.man \
246 lib/unixctl-syn.man \
247 lib/vconn-active.man \
248 lib/vconn-passive.man \
249 lib/vlog-unixctl.man \
253 lib/dirs.c: lib/dirs.c.in Makefile
254 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
255 -e 's,[@]srcdir[@],$(srcdir),g' \
256 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
257 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
258 -e 's,[@]bindir[@],"$(bindir)",g' \
259 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
261 mv lib/dirs.c.tmp lib/dirs.c
263 $(srcdir)/lib/ofp-errors.c: \
264 include/openflow/openflow.h include/openflow/nicira-ext.h \
265 build-aux/extract-ofp-errors
266 cd $(srcdir)/include && \
267 $(PYTHON) ../build-aux/extract-ofp-errors \
268 openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
269 EXTRA_DIST += build-aux/extract-ofp-errors
271 install-data-local: lib-install-data-local
272 lib-install-data-local:
273 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
274 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
275 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
277 if !USE_LINKER_SECTIONS
278 # All distributed sources, with names adjust properly for referencing
281 `for file in $(DIST_SOURCES); do \
282 if test -f $$file; then \
285 echo $(VPATH)/$$file; \
289 lib/coverage.$(OBJEXT): lib/coverage.def
290 lib/coverage.def: $(DIST_SOURCES)
291 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
292 CLEANFILES += lib/coverage.def
294 lib/stress.$(OBJEXT): lib/stress.def
295 lib/stress.def: $(DIST_SOURCES)
296 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
297 CLEANFILES += lib/stress.def
299 lib/vlog.$(OBJEXT): lib/vlog-modules.def
300 lib/vlog-modules.def: $(DIST_SOURCES)
301 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 > $@
302 CLEANFILES += lib/vlog-modules.def