summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShashank Ram <rams@vmware.com>2018-02-27 11:57:37 -0800
committerAlin Gabriel Serdean <aserdean@ovn.org>2018-03-02 01:02:55 +0200
commitb1db9dd6747cf8962ebcca4fc15dd084728b0f79 (patch)
treea23327559a0b5ed71baea1d0c683549ab37d711d
parent34825d5e83a2941d652ec96da6ceec8382eead24 (diff)
downloadopenvswitch-b1db9dd6747cf8962ebcca4fc15dd084728b0f79.tar.gz
datapath-windows: Support to selectively compile targets
Adds support to selectively compile kernel driver for target versions. This is useful when environments to compile for all targets might not be available on the user's machine, or if the user wants to only compile some targets selectively. Also once appveyor has support to build Win10 targets, we will not pass the "--with-vstudiotargetver" to the configure script. Signed-off-by: Shashank Ram <rams@vmware.com> Acked-by: Anand Kumar <kumaranand@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@ovn.org> Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
-rw-r--r--Documentation/intro/install/windows.rst5
-rw-r--r--Makefile.am15
-rw-r--r--appveyor.yml4
-rw-r--r--m4/openvswitch.m428
4 files changed, 48 insertions, 4 deletions
diff --git a/Documentation/intro/install/windows.rst b/Documentation/intro/install/windows.rst
index 2be4eb599..4c1cd0ef4 100644
--- a/Documentation/intro/install/windows.rst
+++ b/Documentation/intro/install/windows.rst
@@ -190,9 +190,12 @@ Finally, to the kernel module also:
--sysconfdir="C:/openvswitch/etc" \
--with-pthread="C:/pthread" \
--enable-ssl --with-openssl="C:/OpenSSL-Win32" \
- --with-vstudiotarget="<target type>"
+ --with-vstudiotarget="<target type>" \
+ --with-vstudiotargetver="<target versions>"
Possible values for ``<target type>`` are: ``Debug`` and ``Release``
+Possible values for ``<target versions>`` is a comma separated list
+of target versions to compile among: ``Win8,Win8.1,Win10``
.. note::
diff --git a/Makefile.am b/Makefile.am
index 80a043531..52a6c5a11 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -414,14 +414,29 @@ if VSTUDIO_DDK
ALL_LOCAL += ovsext
ARCH = x64
ovsext: datapath-windows/ovsext.sln $(srcdir)/datapath-windows/include/OvsDpInterface.h
+if VSTUDIO_WIN8
MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8$(VSTUDIO_CONFIG)" /property:Version="$(PACKAGE_VERSION)" //p:Platform=$(ARCH)
+endif
+if VSTUDIO_WIN8_1
MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8.1$(VSTUDIO_CONFIG)" /property:Version="$(PACKAGE_VERSION)" //p:Platform=$(ARCH)
+endif
+if VSTUDIO_WIN10
+ MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win10$(VSTUDIO_CONFIG)" /property:Version="$(PACKAGE_VERSION)" //p:Platform=$(ARCH)
+endif
+
CLEAN_LOCAL += ovsext_clean
ovsext_clean: datapath-windows/ovsext.sln
+if VSTUDIO_WIN8
MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Clean /property:Configuration="Win8$(VSTUDIO_CONFIG)" /property:Version="$(PACKAGE_VERSION)" //p:Platform=$(ARCH)
+endif
+if VSTUDIO_WIN8_1
MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Clean /property:Configuration="Win8.1$(VSTUDIO_CONFIG)" /property:Version="$(PACKAGE_VERSION)" //p:Platform=$(ARCH)
endif
+if VSTUDIO_WIN10
+ MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Clean /property:Configuration="Win10$(VSTUDIO_CONFIG)" /property:Version="$(PACKAGE_VERSION)" //p:Platform=$(ARCH)
+endif
+endif
.PHONY: ovsext
clang-analyze: clean
diff --git a/appveyor.yml b/appveyor.yml
index 0881e05cc..da31764c1 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,6 +1,6 @@
version: 1.0.{build}
branches:
- only:
+ only:
- master
clone_folder: C:\openvswitch
init:
@@ -41,6 +41,6 @@ build_script:
- C:\MinGW\msys\1.0\bin\bash -lc "cp /c/pthreads-win32/Pre-built.2/dll/x86/*.dll /c/openvswitch/."
- C:\MinGW\msys\1.0\bin\bash -lc "mv /bin/link.exe /bin/link_copy.exe"
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && ./boot.sh"
-- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && ./configure CC=build-aux/cccl LD=\"`which link`\" LIBS=\"-lws2_32 -liphlpapi -lwbemuuid -lole32 -loleaut32\" --with-pthread=C:/pthreads-win32/Pre-built.2 --with-openssl=C:/OpenSSL-Win32 --with-vstudiotarget=\"Debug\""
+- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && ./configure CC=build-aux/cccl LD=\"`which link`\" LIBS=\"-lws2_32 -liphlpapi -lwbemuuid -lole32 -loleaut32\" --with-pthread=C:/pthreads-win32/Pre-built.2 --with-openssl=C:/OpenSSL-Win32 --with-vstudiotarget=\"Debug\" --with-vstudiotargetver=\"Win8,Win8.1\""
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && make"
- C:\MinGW\msys\1.0\bin\bash -lc "cd /c/openvswitch && make datapath_windows_analyze"
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
index de4d66ccb..78082d4e0 100644
--- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4
@@ -173,6 +173,32 @@ AC_ARG_WITH([vstudiotarget],
)
AC_SUBST([VSTUDIO_CONFIG])
+
+AC_ARG_WITH([vstudiotargetver],
+ [AS_HELP_STRING([--with-vstudiotargetver=target_ver1,target_ver2],
+ [Target versions: Win8,Win8.1,Win10])],
+ [
+ targetver=`echo "$withval" | tr -s , ' ' `
+ for ver in $targetver; do
+ case "$ver" in
+ "Win8") VSTUDIO_WIN8=true ;;
+ "Win8.1") VSTUDIO_WIN8_1=true ;;
+ "Win10") VSTUDIO_WIN10=true ;;
+ *) AC_MSG_ERROR([No valid Visual Studio target version found]) ;;
+ esac
+ done
+
+ ], [
+ VSTUDIO_WIN8=true
+ VSTUDIO_WIN8_1=true
+ VSTUDIO_WIN10=true
+ ]
+ )
+
+ AM_CONDITIONAL([VSTUDIO_WIN8], [test -n "$VSTUDIO_WIN8"])
+ AM_CONDITIONAL([VSTUDIO_WIN8_1], [test -n "$VSTUDIO_WIN8_1"])
+ AM_CONDITIONAL([VSTUDIO_WIN10], [test -n "$VSTUDIO_WIN10"])
+
AC_DEFINE([VSTUDIO_DDK], [1], [System uses the Visual Studio build target.])
AM_CONDITIONAL([VSTUDIO_DDK], [test -n "$VSTUDIO_CONFIG"])
])
@@ -573,7 +599,7 @@ TEST_ATOMIC_TYPE(unsigned long long int);
dnl OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(SIZE)
dnl
dnl Checks __atomic_always_lock_free(SIZE, 0)
-AC_DEFUN([OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE],
+AC_DEFUN([OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE],
[AC_CACHE_CHECK(
[value of __atomic_always_lock_free($1)],
[ovs_cv_atomic_always_lock_free_$1],