1 # Copyright (C) 2009, 2010 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 = \
45 lib/dynamic-string.c \
46 lib/dynamic-string.h \
63 lib/learning-switch.c \
64 lib/learning-switch.h \
72 lib/netdev-provider.h \
94 lib/ovsdb-idl-provider.h \
128 lib/stream-provider.h \
154 lib/vconn-provider.h \
160 nodist_lib_libopenvswitch_a_SOURCES = \
162 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
164 noinst_LIBRARIES += lib/libsflow.a
165 lib_libsflow_a_SOURCES = \
169 lib/sflow_sampler.c \
172 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
174 lib_libsflow_a_CFLAGS += -Wno-unused
176 if HAVE_WNO_UNUSED_PARAMETER
177 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
181 lib_libopenvswitch_a_SOURCES += \
186 lib/netlink-protocol.h \
187 lib/netlink-socket.c \
188 lib/netlink-socket.h \
194 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
195 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
196 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
197 (echo '#include "lib/dhparams.h"' && \
198 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
199 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
200 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
201 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
202 mv lib/dhparams.c.tmp lib/dhparams.c
217 lib/leak-checker.man \
218 lib/ssl-bootstrap.man \
219 lib/ssl-bootstrap-syn.man \
220 lib/ssl-peer-ca-cert.man \
223 lib/stress-unixctl.man \
225 lib/unixctl-syn.man \
226 lib/vconn-active.man \
227 lib/vconn-passive.man \
228 lib/vlog-unixctl.man \
232 lib/dirs.c: lib/dirs.c.in Makefile
233 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
234 -e 's,[@]srcdir[@],$(srcdir),g' \
235 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
236 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
237 -e 's,[@]bindir[@],"$(bindir)",g' \
238 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
240 mv lib/dirs.c.tmp lib/dirs.c
242 install-data-local: lib-install-data-local
243 lib-install-data-local:
244 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
245 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
246 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
248 if !USE_LINKER_SECTIONS
249 # All distributed sources, with names adjust properly for referencing
252 `for file in $(DIST_SOURCES); do \
253 if test -f $$file; then \
256 echo $(VPATH)/$$file; \
260 lib/coverage.$(OBJEXT): lib/coverage.def
261 lib/coverage.def: $(DIST_SOURCES)
262 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
263 CLEANFILES += lib/coverage.def
265 lib/stress.$(OBJEXT): lib/stress.def
266 lib/stress.def: $(DIST_SOURCES)
267 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
268 CLEANFILES += lib/stress.def
270 lib/vlog.$(OBJEXT): lib/vlog-modules.def
271 lib/vlog-modules.def: $(DIST_SOURCES)
272 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 > $@
273 CLEANFILES += lib/vlog-modules.def