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 = \
46 lib/dynamic-string.c \
47 lib/dynamic-string.h \
66 lib/learning-switch.c \
67 lib/learning-switch.h \
77 lib/netdev-provider.h \
101 lib/ovsdb-idl-provider.h \
137 lib/stream-provider.h \
168 lib/vconn-provider.h \
174 nodist_lib_libopenvswitch_a_SOURCES = \
176 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
178 noinst_LIBRARIES += lib/libsflow.a
179 lib_libsflow_a_SOURCES = \
183 lib/sflow_sampler.c \
186 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
188 lib_libsflow_a_CFLAGS += -Wno-unused
190 if HAVE_WNO_UNUSED_PARAMETER
191 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
195 lib_libopenvswitch_a_SOURCES += \
202 lib/netlink-protocol.h \
203 lib/netlink-socket.c \
204 lib/netlink-socket.h \
207 lib/rtnetlink-link.c \
208 lib/rtnetlink-link.h \
214 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
215 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
216 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
217 (echo '#include "lib/dhparams.h"' && \
218 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
219 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
220 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
221 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
222 mv lib/dhparams.c.tmp lib/dhparams.c
236 lib/leak-checker.man \
237 lib/ssl-bootstrap.man \
238 lib/ssl-bootstrap-syn.man \
239 lib/ssl-peer-ca-cert.man \
242 lib/stress-unixctl.man \
245 lib/unixctl-syn.man \
246 lib/vconn-active.man \
247 lib/vconn-passive.man \
248 lib/vlog-unixctl.man \
252 lib/dirs.c: lib/dirs.c.in Makefile
253 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
254 -e 's,[@]srcdir[@],$(srcdir),g' \
255 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
256 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
257 -e 's,[@]bindir[@],"$(bindir)",g' \
258 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
260 mv lib/dirs.c.tmp lib/dirs.c
262 $(srcdir)/lib/ofp-errors.c: \
263 include/openflow/openflow.h include/openflow/nicira-ext.h \
264 build-aux/extract-ofp-errors
265 cd $(srcdir)/include && \
266 $(PYTHON) ../build-aux/extract-ofp-errors \
267 openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
268 EXTRA_DIST += build-aux/extract-ofp-errors
270 install-data-local: lib-install-data-local
271 lib-install-data-local:
272 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
273 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
274 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
276 if !USE_LINKER_SECTIONS
277 # All distributed sources, with names adjust properly for referencing
280 `for file in $(DIST_SOURCES); do \
281 if test -f $$file; then \
284 echo $(VPATH)/$$file; \
288 lib/coverage.$(OBJEXT): lib/coverage.def
289 lib/coverage.def: $(DIST_SOURCES)
290 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
291 CLEANFILES += lib/coverage.def
293 lib/stress.$(OBJEXT): lib/stress.def
294 lib/stress.def: $(DIST_SOURCES)
295 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
296 CLEANFILES += lib/stress.def
298 lib/vlog.$(OBJEXT): lib/vlog-modules.def
299 lib/vlog-modules.def: $(DIST_SOURCES)
300 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 > $@
301 CLEANFILES += lib/vlog-modules.def