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 = \
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 \
98 lib/ovsdb-idl-provider.h \
132 lib/stream-provider.h \
161 lib/vconn-provider.h \
167 nodist_lib_libopenvswitch_a_SOURCES = \
169 CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)
171 noinst_LIBRARIES += lib/libsflow.a
172 lib_libsflow_a_SOURCES = \
176 lib/sflow_sampler.c \
179 lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
181 lib_libsflow_a_CFLAGS += -Wno-unused
183 if HAVE_WNO_UNUSED_PARAMETER
184 lib_libsflow_a_CFLAGS += -Wno-unused-parameter
188 lib_libopenvswitch_a_SOURCES += \
194 lib/netlink-protocol.h \
195 lib/netlink-socket.c \
196 lib/netlink-socket.h \
199 lib/rtnetlink-link.c \
200 lib/rtnetlink-link.h \
206 lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
207 nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
208 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
209 (echo '#include "lib/dhparams.h"' && \
210 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
211 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
212 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
213 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
214 mv lib/dhparams.c.tmp lib/dhparams.c
228 lib/leak-checker.man \
229 lib/ssl-bootstrap.man \
230 lib/ssl-bootstrap-syn.man \
231 lib/ssl-peer-ca-cert.man \
234 lib/stress-unixctl.man \
237 lib/unixctl-syn.man \
238 lib/vconn-active.man \
239 lib/vconn-passive.man \
240 lib/vlog-unixctl.man \
244 lib/dirs.c: lib/dirs.c.in Makefile
245 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
246 -e 's,[@]srcdir[@],$(srcdir),g' \
247 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
248 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
249 -e 's,[@]bindir[@],"$(bindir)",g' \
250 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
252 mv lib/dirs.c.tmp lib/dirs.c
254 $(srcdir)/lib/ofp-errors.c: \
255 include/openflow/openflow.h include/openflow/nicira-ext.h \
256 build-aux/extract-ofp-errors
257 cd $(srcdir)/include && \
258 $(PYTHON) ../build-aux/extract-ofp-errors \
259 openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
260 EXTRA_DIST += build-aux/extract-ofp-errors
262 install-data-local: lib-install-data-local
263 lib-install-data-local:
264 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
265 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
266 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
268 if !USE_LINKER_SECTIONS
269 # All distributed sources, with names adjust properly for referencing
272 `for file in $(DIST_SOURCES); do \
273 if test -f $$file; then \
276 echo $(VPATH)/$$file; \
280 lib/coverage.$(OBJEXT): lib/coverage.def
281 lib/coverage.def: $(DIST_SOURCES)
282 sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
283 CLEANFILES += lib/coverage.def
285 lib/stress.$(OBJEXT): lib/stress.def
286 lib/stress.def: $(DIST_SOURCES)
287 sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
288 CLEANFILES += lib/stress.def
290 lib/vlog.$(OBJEXT): lib/vlog-modules.def
291 lib/vlog-modules.def: $(DIST_SOURCES)
292 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 > $@
293 CLEANFILES += lib/vlog-modules.def