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 += \
201 lib/netlink-protocol.h \
202 lib/netlink-socket.c \
203 lib/netlink-socket.h \
206 lib/rtnetlink-link.c \
207 lib/rtnetlink-link.h \
213 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
214 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
215 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
216 (echo '#include "lib/dhparams.h"' && \
217 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
218 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
219 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
220 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
221 mv lib/dhparams.c.tmp lib/dhparams.c
235 lib/leak-checker.man \
236 lib/ssl-bootstrap.man \
237 lib/ssl-bootstrap-syn.man \
238 lib/ssl-peer-ca-cert.man \
241 lib/stress-unixctl.man \
244 lib/unixctl-syn.man \
245 lib/vconn-active.man \
246 lib/vconn-passive.man \
247 lib/vlog-unixctl.man \
251 lib/dirs.c: lib/dirs.c.in Makefile
252 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
253 -e 's,[@]srcdir[@],$(srcdir),g' \
254 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
255 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
256 -e 's,[@]bindir[@],"$(bindir)",g' \
257 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
259 mv lib/dirs.c.tmp lib/dirs.c
261 $(srcdir)/lib/ofp-errors.c: \
262 include/openflow/openflow.h include/openflow/nicira-ext.h \
263 build-aux/extract-ofp-errors
264 cd $(srcdir)/include && \
265 $(PYTHON) ../build-aux/extract-ofp-errors \
266 openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
267 EXTRA_DIST += build-aux/extract-ofp-errors
269 install-data-local: lib-install-data-local
270 lib-install-data-local:
271 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
272 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
273 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
275 if !USE_LINKER_SECTIONS
276 # All distributed sources, with names adjust properly for referencing
279 `for file in $(DIST_SOURCES); do \
280 if test -f $$file; then \
283 echo $(VPATH)/$$file; \
287 lib/coverage.$(OBJEXT): lib/coverage.def
288 lib/coverage.def: $(DIST_SOURCES)
289 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
290 CLEANFILES += lib/coverage.def
292 lib/stress.$(OBJEXT): lib/stress.def
293 lib/stress.def: $(DIST_SOURCES)
294 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
295 CLEANFILES += lib/stress.def
297 lib/vlog.$(OBJEXT): lib/vlog-modules.def
298 lib/vlog-modules.def: $(DIST_SOURCES)
299 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 > $@
300 CLEANFILES += lib/vlog-modules.def