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 \
133 lib/stream-provider.h \
164 lib/vconn-provider.h \
170 nodist_lib_libopenvswitch_a_SOURCES = \
172 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
174 noinst_LIBRARIES += lib/libsflow.a
175 lib_libsflow_a_SOURCES = \
179 lib/sflow_sampler.c \
182 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
184 lib_libsflow_a_CFLAGS += -Wno-unused
186 if HAVE_WNO_UNUSED_PARAMETER
187 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
191 lib_libopenvswitch_a_SOURCES += \
197 lib/netlink-protocol.h \
198 lib/netlink-socket.c \
199 lib/netlink-socket.h \
202 lib/rtnetlink-link.c \
203 lib/rtnetlink-link.h \
209 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
210 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
211 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
212 (echo '#include "lib/dhparams.h"' && \
213 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
214 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
215 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
216 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
217 mv lib/dhparams.c.tmp lib/dhparams.c
231 lib/leak-checker.man \
232 lib/ssl-bootstrap.man \
233 lib/ssl-bootstrap-syn.man \
234 lib/ssl-peer-ca-cert.man \
237 lib/stress-unixctl.man \
240 lib/unixctl-syn.man \
241 lib/vconn-active.man \
242 lib/vconn-passive.man \
243 lib/vlog-unixctl.man \
247 lib/dirs.c: lib/dirs.c.in Makefile
248 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
249 -e 's,[@]srcdir[@],$(srcdir),g' \
250 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
251 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
252 -e 's,[@]bindir[@],"$(bindir)",g' \
253 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
255 mv lib/dirs.c.tmp lib/dirs.c
257 $(srcdir)/lib/ofp-errors.c: \
258 include/openflow/openflow.h include/openflow/nicira-ext.h \
259 build-aux/extract-ofp-errors
260 cd $(srcdir)/include && \
261 $(PYTHON) ../build-aux/extract-ofp-errors \
262 openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
263 EXTRA_DIST += build-aux/extract-ofp-errors
265 install-data-local: lib-install-data-local
266 lib-install-data-local:
267 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
268 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
269 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
271 if !USE_LINKER_SECTIONS
272 # All distributed sources, with names adjust properly for referencing
275 `for file in $(DIST_SOURCES); do \
276 if test -f $$file; then \
279 echo $(VPATH)/$$file; \
283 lib/coverage.$(OBJEXT): lib/coverage.def
284 lib/coverage.def: $(DIST_SOURCES)
285 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
286 CLEANFILES += lib/coverage.def
288 lib/stress.$(OBJEXT): lib/stress.def
289 lib/stress.def: $(DIST_SOURCES)
290 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
291 CLEANFILES += lib/stress.def
293 lib/vlog.$(OBJEXT): lib/vlog-modules.def
294 lib/vlog-modules.def: $(DIST_SOURCES)
295 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 > $@
296 CLEANFILES += lib/vlog-modules.def