1 # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 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)
13 lib_libopenvswitch_la_LIBADD += ${PTHREAD_LIBS}
16 lib_libopenvswitch_la_LDFLAGS = -release $(VERSION)
18 lib_libopenvswitch_la_SOURCES = \
60 lib/dynamic-string.c \
61 lib/dynamic-string.h \
91 lib/learning-switch.c \
92 lib/learning-switch.h \
108 lib/netdev-provider.h \
135 lib/ofp-version-opt.h \
136 lib/ofp-version-opt.c \
139 lib/ovs-atomic-c11.h \
140 lib/ovs-atomic-clang.h \
141 lib/ovs-atomic-flag-gcc4.7+.h \
142 lib/ovs-atomic-gcc4+.c \
143 lib/ovs-atomic-gcc4+.h \
144 lib/ovs-atomic-gcc4.7+.h \
145 lib/ovs-atomic-pthreads.c \
146 lib/ovs-atomic-pthreads.h \
154 lib/ovsdb-idl-provider.h \
195 lib/stream-provider.h \
225 lib/vconn-provider.h \
241 lib_libopenvswitch_la_SOURCES += \
242 lib/daemon-windows.c \
244 lib/getrusage-windows.c \
245 lib/latch-windows.c \
246 lib/stream-fd-windows.c
248 lib_libopenvswitch_la_SOURCES += \
253 lib/stream-fd-unix.c \
261 nodist_lib_libopenvswitch_la_SOURCES = \
263 CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
265 lib_LTLIBRARIES += lib/libsflow.la
266 lib_libsflow_la_LDFLAGS = -release $(VERSION)
267 lib_libsflow_la_SOURCES = \
271 lib/sflow_sampler.c \
274 lib_libsflow_la_CPPFLAGS = $(AM_CPPFLAGS)
275 lib_libsflow_la_CFLAGS = $(AM_CFLAGS)
277 lib_libsflow_la_CFLAGS += -Wno-unused
279 if HAVE_WNO_UNUSED_PARAMETER
280 lib_libsflow_la_CFLAGS += -Wno-unused-parameter
284 lib_libopenvswitch_la_SOURCES += \
289 lib/netlink-notifier.c \
290 lib/netlink-notifier.h \
291 lib/netlink-protocol.h \
292 lib/netlink-socket.c \
293 lib/netlink-socket.h \
294 lib/rtnetlink-link.c \
295 lib/rtnetlink-link.h \
301 lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c
303 lib_libopenvswitch_la_SOURCES += lib/async-append-null.c
307 lib_libopenvswitch_la_SOURCES += \
308 lib/route-table-stub.c
312 lib_libopenvswitch_la_SOURCES += \
316 lib/route-table-bsd.c
320 lib_libopenvswitch_la_SOURCES += lib/stream-ssl.c
321 nodist_lib_libopenvswitch_la_SOURCES += lib/dhparams.c
322 lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
323 (echo '#include "lib/dhparams.h"' && \
324 openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
325 openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
326 openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
327 | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
328 mv lib/dhparams.c.tmp lib/dhparams.c
330 lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
342 lib/coverage-unixctl.man \
345 lib/memory-unixctl.man \
346 lib/ofp-version.man \
349 lib/service-syn.man \
350 lib/ssl-bootstrap.man \
351 lib/ssl-bootstrap-syn.man \
352 lib/ssl-peer-ca-cert.man \
357 lib/unixctl-syn.man \
358 lib/vconn-active.man \
359 lib/vconn-passive.man \
360 lib/vlog-unixctl.man \
366 $(srcdir)/lib/vswitch-idl.c \
367 $(srcdir)/lib/vswitch-idl.h \
368 $(srcdir)/lib/vswitch-idl.ovsidl \
369 $(srcdir)/lib/vtep-idl.c \
370 $(srcdir)/lib/vtep-idl.h \
371 $(srcdir)/lib/vtep-idl.ovsidl
373 EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
374 VSWITCH_IDL_FILES = \
375 $(srcdir)/vswitchd/vswitch.ovsschema \
376 $(srcdir)/lib/vswitch-idl.ann
377 $(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
378 $(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
381 EXTRA_DIST += $(srcdir)/lib/vtep-idl.ann
383 $(srcdir)/vtep/vtep.ovsschema \
384 $(srcdir)/lib/vtep-idl.ann
385 $(srcdir)/lib/vtep-idl.ovsidl: $(VTEP_IDL_FILES)
386 $(OVSDB_IDLC) annotate $(VTEP_IDL_FILES) > $@.tmp
389 lib/dirs.c: lib/dirs.c.in Makefile
390 ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
391 -e 's,[@]srcdir[@],$(srcdir),g' \
392 -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
393 -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
394 -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
395 -e 's,[@]bindir[@],"$(bindir)",g' \
396 -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
397 -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
399 mv lib/dirs.c.tmp lib/dirs.c
401 $(srcdir)/lib/ofp-errors.inc: \
402 lib/ofp-errors.h include/openflow/openflow-common.h \
403 $(srcdir)/build-aux/extract-ofp-errors
404 $(run_python) $(srcdir)/build-aux/extract-ofp-errors \
405 $(srcdir)/lib/ofp-errors.h \
406 $(srcdir)/include/openflow/openflow-common.h > $@.tmp
408 $(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
409 EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
411 $(srcdir)/lib/ofp-msgs.inc: \
412 lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
413 $(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
414 $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
415 $(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
416 EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
418 INSTALL_DATA_LOCAL += lib-install-data-local
419 lib-install-data-local:
420 $(MKDIR_P) $(DESTDIR)$(RUNDIR)
421 $(MKDIR_P) $(DESTDIR)$(PKIDIR)
422 $(MKDIR_P) $(DESTDIR)$(LOGDIR)
423 $(MKDIR_P) $(DESTDIR)$(DBDIR)