1 # Copyright (C) 2009, 2010, 2011, 2012, 2013 Nicira, 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 lib_LTLIBRARIES += lib/libopenvswitch.la
10 lib_libopenvswitch_la_LIBADD = $(SSL_LIBS)
11 lib_libopenvswitch_la_LDFLAGS = -release $(VERSION)
13 lib_libopenvswitch_la_SOURCES = \
56 lib/dynamic-string.c \
57 lib/dynamic-string.h \
86 lib/learning-switch.c \
87 lib/learning-switch.h \
103 lib/netdev-provider.h \
130 lib/ofp-version-opt.h \
131 lib/ofp-version-opt.c \
134 lib/ovs-atomic-c11.h \
135 lib/ovs-atomic-clang.h \
136 lib/ovs-atomic-flag-gcc4.7+.h \
137 lib/ovs-atomic-gcc4+.c \
138 lib/ovs-atomic-gcc4+.h \
139 lib/ovs-atomic-gcc4.7+.h \
140 lib/ovs-atomic-pthreads.c \
141 lib/ovs-atomic-pthreads.h \
149 lib/ovsdb-idl-provider.h \
193 lib/stream-provider.h \
223 lib/vconn-provider.h \
237 EXTRA_DIST += lib/string.h.in
239 nodist_lib_libopenvswitch_la_SOURCES = \
241 CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
243 lib_LTLIBRARIES += lib/libsflow.la
244 lib_libsflow_la_LDFLAGS = -release $(VERSION)
245 lib_libsflow_la_SOURCES = \
249 lib/sflow_sampler.c \
252 lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
253 lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
255 lib_libsflow_la_CFLAGS += -Wno-unused
257 if HAVE_WNO_UNUSED_PARAMETER
258 lib_libsflow_la_CFLAGS += -Wno-unused-parameter
262 lib_libopenvswitch_la_SOURCES += \
267 lib/netlink-notifier.c \
268 lib/netlink-notifier.h \
269 lib/netlink-protocol.h \
270 lib/netlink-socket.c \
271 lib/netlink-socket.h \
272 lib/rtnetlink-link.c \
273 lib/rtnetlink-link.h \
279 lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
281 lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
285 lib_libopenvswitch_la_SOURCES += \
286 lib/route-table-stub.c
290 lib_libopenvswitch_la_SOURCES += \
294 lib/route-table-bsd.c
298 lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
299 nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
300 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
301 (echo '#include "lib/dhparams.h"' && \
302 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
303 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
304 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
305 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
306 mv lib/dhparams.c.tmp lib/dhparams.c
308 lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
320 lib/coverage-unixctl.man \
323 lib/memory-unixctl.man \
324 lib/ofp-version.man \
326 lib/ssl-bootstrap.man \
327 lib/ssl-bootstrap-syn.man \
328 lib/ssl-peer-ca-cert.man \
333 lib/unixctl-syn.man \
334 lib/vconn-active.man \
335 lib/vconn-passive.man \
336 lib/vlog-unixctl.man \
342 $(srcdir)/lib/vswitch-idl.c \
343 $(srcdir)/lib/vswitch-idl.h \
344 $(srcdir)/lib/vswitch-idl.ovsidl \
345 $(srcdir)/lib/vtep-idl.c \
346 $(srcdir)/lib/vtep-idl.h \
347 $(srcdir)/lib/vtep-idl.ovsidl
349 EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
350 VSWITCH_IDL_FILES = \
351 $(srcdir)/vswitchd/vswitch.ovsschema \
352 $(srcdir)/lib/vswitch-idl.ann
353 $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
354 $(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
357 EXTRA_DIST += $(srcdir)/lib/vtep-idl.ann
359 $(srcdir)/vtep/vtep.ovsschema \
360 $(srcdir)/lib/vtep-idl.ann
361 $(srcdir)/lib/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
362 $(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp
365 lib/dirs.c: lib/dirs.c.in Makefile
366 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
367 -e 's,[@]srcdir[@],$(srcdir),g' \
368 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
369 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
370 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
371 -e 's,[@]bindir[@],"$(bindir)",g' \
372 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
373 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
375 mv lib/dirs.c.tmp lib/dirs.c
377 $(srcdir)/lib/ofp-errors.inc: \
378 lib/ofp-errors.h include/openflow/openflow-common.h \
379 $(srcdir)/build-aux/extract-ofp-errors
380 $(run_python) $(srcdir)/build-aux/extract-ofp-errors \
381 $(srcdir)/lib/ofp-errors.h \
382 $(srcdir)/include/openflow/openflow-common.h > $@.tmp
384 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
385 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
387 $(srcdir)/lib/ofp-msgs.inc: \
388 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
389 $(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
390 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
391 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
392 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
394 INSTALL_DATA_LOCAL += lib-install-data-local
395 lib-install-data-local:
396 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
397 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
398 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
399 $(MKDIR_P) $(DESTDIR)$(DBDIR)