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 = \
44 lib/dynamic-string.c \
45 lib/dynamic-string.h \
64 lib/learning-switch.c \
65 lib/learning-switch.h \
75 lib/netdev-provider.h \
99 lib/ovsdb-idl-provider.h \
135 lib/stream-provider.h \
166 lib/vconn-provider.h \
172 nodist_lib_libopenvswitch_a_SOURCES = \
174 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
176 noinst_LIBRARIES += lib/libsflow.a
177 lib_libsflow_a_SOURCES = \
181 lib/sflow_sampler.c \
184 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
186 lib_libsflow_a_CFLAGS += -Wno-unused
188 if HAVE_WNO_UNUSED_PARAMETER
189 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
193 lib_libopenvswitch_a_SOURCES += \
199 lib/netlink-protocol.h \
200 lib/netlink-socket.c \
201 lib/netlink-socket.h \
204 lib/rtnetlink-link.c \
205 lib/rtnetlink-link.h \
211 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
212 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
213 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
214 (echo '#include "lib/dhparams.h"' && \
215 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
216 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
217 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
218 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
219 mv lib/dhparams.c.tmp lib/dhparams.c
233 lib/leak-checker.man \
234 lib/ssl-bootstrap.man \
235 lib/ssl-bootstrap-syn.man \
236 lib/ssl-peer-ca-cert.man \
239 lib/stress-unixctl.man \
242 lib/unixctl-syn.man \
243 lib/vconn-active.man \
244 lib/vconn-passive.man \
245 lib/vlog-unixctl.man \
249 lib/dirs.c: lib/dirs.c.in Makefile
250 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
251 -e 's,[@]srcdir[@],$(srcdir),g' \
252 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
253 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
254 -e 's,[@]bindir[@],"$(bindir)",g' \
255 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
257 mv lib/dirs.c.tmp lib/dirs.c
259 $(srcdir)/lib/ofp-errors.c: \
260 include/openflow/openflow.h include/openflow/nicira-ext.h \
261 build-aux/extract-ofp-errors
262 cd $(srcdir)/include && \
263 $(PYTHON) ../build-aux/extract-ofp-errors \
264 openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
265 EXTRA_DIST += build-aux/extract-ofp-errors
267 install-data-local: lib-install-data-local
268 lib-install-data-local:
269 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
270 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
271 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
273 if !USE_LINKER_SECTIONS
274 # All distributed sources, with names adjust properly for referencing
277 `for file in $(DIST_SOURCES); do \
278 if test -f $$file; then \
281 echo $(VPATH)/$$file; \
285 lib/coverage.$(OBJEXT): lib/coverage.def
286 lib/coverage.def: $(DIST_SOURCES)
287 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
288 CLEANFILES += lib/coverage.def
290 lib/stress.$(OBJEXT): lib/stress.def
291 lib/stress.def: $(DIST_SOURCES)
292 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
293 CLEANFILES += lib/stress.def
295 lib/vlog.$(OBJEXT): lib/vlog-modules.def
296 lib/vlog-modules.def: $(DIST_SOURCES)
297 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 > $@
298 CLEANFILES += lib/vlog-modules.def