Add build of ovsext.sln using MSBuild
[cascardo/ovs.git] / Makefile.am
index b5d33ac..3c2ae89 100644 (file)
@@ -14,16 +14,18 @@ AM_LDFLAGS = $(SSL_LDFLAGS)
 
 if WIN32
 AM_CPPFLAGS += -I $(top_srcdir)/include/windows
+AM_CPPFLAGS += -I $(top_srcdir)/datapath-windows/include
 AM_CPPFLAGS += $(PTHREAD_INCLUDES)
 AM_LDFLAGS += $(PTHREAD_LDFLAGS)
 endif
 
-AM_CPPFLAGS += $(SSL_INCLUDES)
-
 AM_CPPFLAGS += -I $(top_srcdir)/include
+AM_CPPFLAGS += -I $(top_builddir)/include
 AM_CPPFLAGS += -I $(top_srcdir)/lib
 AM_CPPFLAGS += -I $(top_builddir)/lib
 
+AM_CPPFLAGS += $(SSL_INCLUDES)
+
 AM_CFLAGS = -Wstrict-prototypes
 AM_CFLAGS += $(WARNING_FLAGS)
 
@@ -57,12 +59,13 @@ CLEAN_LOCAL =
 DISTCLEANFILES =
 PYCOV_CLEAN_FILES = build-aux/check-structs,cover
 EXTRA_DIST = \
-       BUILD.Windows \
+       CONTRIBUTING \
        CodingStyle \
        DESIGN \
        FAQ \
        INSTALL \
        INSTALL.Debian \
+        INSTALL.DPDK \
        INSTALL.Fedora \
        INSTALL.KVM \
        INSTALL.Libvirt \
@@ -71,13 +74,17 @@ EXTRA_DIST = \
        INSTALL.SSL \
        INSTALL.XenServer \
        INSTALL.userspace \
+       INSTALL.Windows \
        IntegrationGuide \
        NOTICE \
        OPENFLOW-1.1+ \
        PORTING \
        README-lisp \
        REPORTING-BUGS \
-       SubmittingPatches \
+       TODO \
+       .travis.yml \
+       .travis/build.sh \
+       .travis/prepare.sh \
        WHY-OVS \
        boot.sh \
        build-aux/cccl \
@@ -195,7 +202,7 @@ config-h-check:
        @cd $(srcdir); \
        if test -e .git && (git --version) >/dev/null 2>&1 && \
           git --no-pager grep -L '#include <config\.h>' `git ls-files | grep '\.c$$' | \
-               grep -vE '^datapath|^lib/sflow|^third-party'`; \
+               grep -vE '^datapath|^lib/sflow|^third-party|^datapath-windows'`; \
        then \
            echo "See above for list of violations of the rule that"; \
            echo "every C source file must #include <config.h>."; \
@@ -206,8 +213,10 @@ config-h-check:
 # Check for printf() type modifiers that MSVC doesn't support.
 ALL_LOCAL += printf-check
 printf-check:
-       @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \
-          git --no-pager grep -n -E -e '%[-+ #0-9.*]*([ztj]|hh)' --and --not -e 'ovs_scan' `git ls-files $(srcdir) | grep '\.[ch]$$'`; \
+       @cd $(srcdir); \
+       if test -e .git && (git --version) >/dev/null 2>&1 && \
+          git --no-pager grep -n -E -e '%[-+ #0-9.*]*([ztj]|hh)' --and --not -e 'ovs_scan' `git ls-files | grep '\.[ch]$$' | \
+               grep -vE '^datapath|^lib/sflow|^third-party'`; \
        then \
            echo "See above for list of violations of the rule that"; \
            echo "'z', 't', 'j', 'hh' printf() type modifiers are"; \
@@ -243,10 +252,11 @@ check-assert-h-usage:
 
 ALL_LOCAL += thread-safety-check
 thread-safety-check:
-       @if test -e '$(srcdir)'/.git && (git --version) >/dev/null 2>&1 && \
-          grep -n -f '$(srcdir)'/build-aux/thread-safety-blacklist \
-              `git ls-files '$(srcdir)' | grep '\.[ch]$$' \
-                | $(EGREP) -v '^datapath|^lib/sflow|^third-party'` \
+       @cd $(srcdir); \
+       if test -e .git && (git --version) >/dev/null 2>&1 && \
+          grep -n -f build-aux/thread-safety-blacklist \
+              `git ls-files | grep '\.[ch]$$' \
+                | $(EGREP) -v '^datapath|^lib/sflow|^third-party'` /dev/null \
               | $(EGREP) -v ':[        ]*/?\*'; \
        then \
            echo "See above for list of calls to functions that are"; \
@@ -280,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)
@@ -308,3 +328,5 @@ include python/automake.mk
 include python/compat/automake.mk
 include tutorial/automake.mk
 include vtep/automake.mk
+include datapath-windows/automake.mk
+include datapath-windows/include/automake.mk