Skip to content

Commit

Permalink
Add build of ovsext.sln using MSBuild
Browse files Browse the repository at this point in the history
This commit adds to the automake build system the full build required
by the forwarding extension solution.

It will help a lot in the future CI to check the full build of the project.

To configure the forwarding extension to be built one could use the following:
./configure CC=./build-aux/cccl LD="`which link`" LIBS="-lws2_32" \
    --prefix="C:/openvswitch/usr" --localstatedir="C:/openvswitch/var" \
    --sysconfdir="C:/openvswitch/etc" --with-pthread="C:/pthread" \
    --with-vstudioddk="Win8.1 Release"

Documentation will be updated in another patch.

Signed-off-by: Alin Gabriel Serdean <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Saurabh Shah <[email protected]>
  • Loading branch information
Alin Serdean authored and blp committed Aug 28, 2014
1 parent 3c5ce2c commit bd9d702
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,16 @@ $(srcdir)/manpages.mk: $(MAN_ROOTS) build-aux/sodepends.pl
fi
CLEANFILES += manpage-dep-check

if VSTUDIO_DDK
ALL_LOCAL += ovsext_make
ovsext_make: datapath-windows/ovsext.sln
MSBuild.exe datapath-windows/ovsext.sln /target:Build /property:Configuration="$(VSTUDIO_CONFIG)"

CLEAN_LOCAL += ovsext_clean
ovsext_clean: datapath-windows/ovsext.sln
MSBuild.exe datapath-windows/ovsext.sln /target:Clean /property:Configuration="$(VSTUDIO_CONFIG)"
endif

dist-hook: $(DIST_HOOKS)
all-local: $(ALL_LOCAL)
clean-local: $(CLEAN_LOCAL)
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ AC_FUNC_STRERROR_R

OVS_CHECK_ESX
OVS_CHECK_WIN32
OVS_CHECK_VISUAL_STUDIO_DDK
OVS_CHECK_COVERAGE
OVS_CHECK_NDEBUG
OVS_CHECK_NETLINK
Expand Down
28 changes: 28 additions & 0 deletions m4/openvswitch.m4
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,40 @@ AC_DEFUN([OVS_CHECK_WIN32],
AC_MSG_ERROR([pthread directory not specified])
]
)
AC_DEFINE([WIN32], [1], [Define to 1 if building on WIN32.])
AH_BOTTOM([#ifdef WIN32
#include "include/windows/windefs.h"
#endif])
fi])

dnl OVS_CHECK_WINDOWS
dnl
dnl Configure Visual Studio solution build
AC_DEFUN([OVS_CHECK_VISUAL_STUDIO_DDK], [
AC_ARG_WITH([vstudioddk],
[AS_HELP_STRING([--with-vstudioddk=version_type],
[Visual Studio DDK version type e.g. Win8.1 Release])],
[
case "$withval" in
"Win8.1 Release") ;;
"Win8.1 Debug") ;;
"Win8 Release") ;;
"Win8 Debug") ;;
*) AC_MSG_ERROR([No good Visual Studio configuration found]) ;;
esac
VSTUDIO_CONFIG=$withval
], [
VSTUDIO_CONFIG=
]
)
AC_SUBST([VSTUDIO_CONFIG])
AC_DEFINE([VSTUDIO_DDK], [1], [System uses the Visual Studio DDK version module.])
AM_CONDITIONAL([VSTUDIO_DDK], [test -n "$VSTUDIO_CONFIG"])
])

dnl Checks for Netlink support.
AC_DEFUN([OVS_CHECK_NETLINK],
[AC_CHECK_HEADER([linux/netlink.h],
Expand Down

0 comments on commit bd9d702

Please sign in to comment.