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 = \
42 lib/dynamic-string.c \
43 lib/dynamic-string.h \
62 lib/learning-switch.c \
63 lib/learning-switch.h \
73 lib/netdev-provider.h \
97 lib/ovsdb-idl-provider.h \
131 lib/stream-provider.h \
160 lib/vconn-provider.h \
166 nodist_lib_libopenvswitch_a_SOURCES = \
168 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
170 noinst_LIBRARIES += lib/libsflow.a
171 lib_libsflow_a_SOURCES = \
175 lib/sflow_sampler.c \
178 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
180 lib_libsflow_a_CFLAGS += -Wno-unused
182 if HAVE_WNO_UNUSED_PARAMETER
183 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
187 lib_libopenvswitch_a_SOURCES += \
193 lib/netlink-protocol.h \
194 lib/netlink-socket.c \
195 lib/netlink-socket.h \
198 lib/rtnetlink-link.c \
199 lib/rtnetlink-link.h \
205 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
206 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
207 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
208 (echo '#include "lib/dhparams.h"' && \
209 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
210 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
211 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
212 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
213 mv lib/dhparams.c.tmp lib/dhparams.c
227 lib/leak-checker.man \
228 lib/ssl-bootstrap.man \
229 lib/ssl-bootstrap-syn.man \
230 lib/ssl-peer-ca-cert.man \
233 lib/stress-unixctl.man \
236 lib/unixctl-syn.man \
237 lib/vconn-active.man \
238 lib/vconn-passive.man \
239 lib/vlog-unixctl.man \
243 lib/dirs.c: lib/dirs.c.in Makefile
244 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
245 -e 's,[@]srcdir[@],$(srcdir),g' \
246 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
247 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
248 -e 's,[@]bindir[@],"$(bindir)",g' \
249 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
251 mv lib/dirs.c.tmp lib/dirs.c
253 $(srcdir)/lib/ofp-errors.c: \
254 include/openflow/openflow.h include/openflow/nicira-ext.h \
255 build-aux/extract-ofp-errors
256 cd $(srcdir)/include && \
257 $(PYTHON) ../build-aux/extract-ofp-errors \
258 openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
259 EXTRA_DIST += build-aux/extract-ofp-errors
261 install-data-local: lib-install-data-local
262 lib-install-data-local:
263 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
264 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
265 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
267 if !USE_LINKER_SECTIONS
268 # All distributed sources, with names adjust properly for referencing
271 `for file in $(DIST_SOURCES); do \
272 if test -f $$file; then \
275 echo $(VPATH)/$$file; \
279 lib/coverage.$(OBJEXT): lib/coverage.def
280 lib/coverage.def: $(DIST_SOURCES)
281 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
282 CLEANFILES += lib/coverage.def
284 lib/stress.$(OBJEXT): lib/stress.def
285 lib/stress.def: $(DIST_SOURCES)
286 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
287 CLEANFILES += lib/stress.def
289 lib/vlog.$(OBJEXT): lib/vlog-modules.def
290 lib/vlog-modules.def: $(DIST_SOURCES)
291 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 > $@
292 CLEANFILES += lib/vlog-modules.def