-# Copyright (C) 2009, 2010, 2011 Nicira Networks, Inc.
+# Copyright (C) 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
+ lib/ovs-atomic-c11.h \
+ lib/ovs-atomic-clang.h \
+ lib/ovs-atomic-flag-gcc4.7+.h \
+ lib/ovs-atomic-gcc4+.c \
+ lib/ovs-atomic-gcc4+.h \
+ lib/ovs-atomic-gcc4.7+.h \
+ lib/ovs-atomic-pthreads.c \
+ lib/ovs-atomic-pthreads.h \
+ lib/ovs-atomic.h \
+ lib/ovs-thread.c \
+ lib/ovs-thread.h \
if HAVE_OPENSSL
lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
if HAVE_OPENSSL
lib_libopenvswitch_a_SOURCES += lib/stream-ssl.c
nodist_lib_libopenvswitch_a_SOURCES += lib/dhparams.c
openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
| sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
mv lib/dhparams.c.tmp lib/dhparams.c
openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
| sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp
mv lib/dhparams.c.tmp lib/dhparams.c
+# vswitch IDL
+OVSIDL_BUILT += \
+ $(srcdir)/lib/vswitch-idl.c \
+ $(srcdir)/lib/vswitch-idl.h \
+ $(srcdir)/lib/vswitch-idl.ovsidl
+
+EXTRA_DIST += $(srcdir)/lib/vswitch-idl.ann
+VSWITCH_IDL_FILES = \
+ $(srcdir)/vswitchd/vswitch.ovsschema \
+ $(srcdir)/lib/vswitch-idl.ann
+$(srcdir)/lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
+ $(OVSDB_IDLC) annotate $(VSWITCH_IDL_FILES) > $@.tmp
+ mv $@.tmp $@
+
lib/dirs.c: lib/dirs.c.in Makefile
($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
-e 's,[@]srcdir[@],$(srcdir),g' \
-e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
-e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
lib/dirs.c: lib/dirs.c.in Makefile
($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
-e 's,[@]srcdir[@],$(srcdir),g' \
-e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
-e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
-e 's,[@]bindir[@],"$(bindir)",g' \
-e 's,[@]bindir[@],"$(bindir)",g' \
-e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
> lib/dirs.c.tmp
mv lib/dirs.c.tmp lib/dirs.c
-e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
> lib/dirs.c.tmp
mv lib/dirs.c.tmp lib/dirs.c
-$(srcdir)/lib/ofp-errors.c: \
- include/openflow/openflow.h include/openflow/nicira-ext.h \
- build-aux/extract-ofp-errors
- cd $(srcdir)/include && \
- $(PYTHON) ../build-aux/extract-ofp-errors \
- openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
-EXTRA_DIST += build-aux/extract-ofp-errors
+$(srcdir)/lib/ofp-errors.inc: \
+ lib/ofp-errors.h include/openflow/openflow-common.h \
+ $(srcdir)/build-aux/extract-ofp-errors
+ $(run_python) $(srcdir)/build-aux/extract-ofp-errors \
+ $(srcdir)/lib/ofp-errors.h \
+ $(srcdir)/include/openflow/openflow-common.h > $@.tmp
+ mv $@.tmp $@
+$(srcdir)/lib/ofp-errors.c: $(srcdir)/lib/ofp-errors.inc
+EXTRA_DIST += build-aux/extract-ofp-errors lib/ofp-errors.inc
-install-data-local: lib-install-data-local
+$(srcdir)/lib/ofp-msgs.inc: \
+ lib/ofp-msgs.h $(srcdir)/build-aux/extract-ofp-msgs
+ $(run_python) $(srcdir)/build-aux/extract-ofp-msgs \
+ $(srcdir)/lib/ofp-msgs.h $@ > $@.tmp && mv $@.tmp $@
+$(srcdir)/lib/ofp-msgs.c: $(srcdir)/lib/ofp-msgs.inc
+EXTRA_DIST += build-aux/extract-ofp-msgs lib/ofp-msgs.inc
+
+INSTALL_DATA_LOCAL += lib-install-data-local
lib-install-data-local:
$(MKDIR_P) $(DESTDIR)$(RUNDIR)
$(MKDIR_P) $(DESTDIR)$(PKIDIR)
$(MKDIR_P) $(DESTDIR)$(LOGDIR)
lib-install-data-local:
$(MKDIR_P) $(DESTDIR)$(RUNDIR)
$(MKDIR_P) $(DESTDIR)$(PKIDIR)
$(MKDIR_P) $(DESTDIR)$(LOGDIR)
sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
CLEANFILES += lib/coverage.def
sed -n 's|^COVERAGE_DEFINE(\([_a-zA-Z0-9]\{1,\}\)).*$$|COVERAGE_COUNTER(\1)|p' $(all_sources) | LC_ALL=C sort -u > $@
CLEANFILES += lib/coverage.def
-lib/stress.$(OBJEXT): lib/stress.def
-lib/stress.def: $(DIST_SOURCES)
- sed -n '/^STRESS_OPTION(/,/);$$/{s/);$$/)/;p}' $(all_sources) > $@
-CLEANFILES += lib/stress.def
-
lib/vlog.$(OBJEXT): lib/vlog-modules.def
lib/vlog-modules.def: $(DIST_SOURCES)
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 > $@
lib/vlog.$(OBJEXT): lib/vlog-modules.def
lib/vlog-modules.def: $(DIST_SOURCES)
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 > $@