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 \
74 lib/netdev-provider.h \
96 lib/ovsdb-idl-provider.h \
130 lib/stream-provider.h \
156 lib/vconn-provider.h \
162 nodist_lib_libopenvswitch_a_SOURCES = \
164 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
166 noinst_LIBRARIES += lib/libsflow.a
167 lib_libsflow_a_SOURCES = \
171 lib/sflow_sampler.c \
174 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
176 lib_libsflow_a_CFLAGS += -Wno-unused
178 if HAVE_WNO_UNUSED_PARAMETER
179 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
183 lib_libopenvswitch_a_SOURCES += \
188 lib/netlink-protocol.h \
189 lib/netlink-socket.c \
190 lib/netlink-socket.h \
193 lib/rtnetlink-link.c \
194 lib/rtnetlink-link.h \
195 lib/rtnetlink-route.c \
196 lib/rtnetlink-route.h
200 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
201 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
202 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
203 (echo '#include "lib/dhparams.h"' && \
204 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
205 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
206 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
207 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
208 mv lib/dhparams.c.tmp lib/dhparams.c
223 lib/leak-checker.man \
224 lib/ssl-bootstrap.man \
225 lib/ssl-bootstrap-syn.man \
226 lib/ssl-peer-ca-cert.man \
229 lib/stress-unixctl.man \
231 lib/unixctl-syn.man \
232 lib/vconn-active.man \
233 lib/vconn-passive.man \
234 lib/vlog-unixctl.man \
238 lib/dirs.c: lib/dirs.c.in Makefile
239 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
240 -e 's,[@]srcdir[@],$(srcdir),g' \
241 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
242 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
243 -e 's,[@]bindir[@],"$(bindir)",g' \
244 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
246 mv lib/dirs.c.tmp lib/dirs.c
248 install-data-local: lib-install-data-local
249 lib-install-data-local:
250 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
251 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
252 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
254 if !USE_LINKER_SECTIONS
255 # All distributed sources, with names adjust properly for referencing
258 `for file in $(DIST_SOURCES); do \
259 if test -f $$file; then \
262 echo $(VPATH)/$$file; \
266 lib/coverage.$(OBJEXT): lib/coverage.def
267 lib/coverage.def: $(DIST_SOURCES)
268 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
269 CLEANFILES += lib/coverage.def
271 lib/stress.$(OBJEXT): lib/stress.def
272 lib/stress.def: $(DIST_SOURCES)
273 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
274 CLEANFILES += lib/stress.def
276 lib/vlog.$(OBJEXT): lib/vlog-modules.def
277 lib/vlog-modules.def: $(DIST_SOURCES)
278 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 > $@
279 CLEANFILES += lib/vlog-modules.def