]> git.sesse.net Git - stockfish/commitdiff
Fix compiling of 32 bit binary on 64-bit Windows
authorbraich <braichuk@tut.by>
Sat, 19 Dec 2015 20:39:41 +0000 (23:39 +0300)
committerJoona Kiiski <joona@zoox.com>
Tue, 22 Dec 2015 19:07:10 +0000 (19:07 +0000)
Two versions of mingw-w64 (targeting Win64 and Win32)
can be installed on Windows too.

No functional change

Resolves #532

src/Makefile

index 4e4d3d918539f73d0df51e41b77dde2b1188bfc1..ee09dc7b63fdb7f19b43fd621b79ee06e4930c00 100644 (file)
@@ -160,22 +160,18 @@ endif
 ifeq ($(COMP),mingw)
        comp=mingw
 
 ifeq ($(COMP),mingw)
        comp=mingw
 
-       ifeq ($(UNAME),Linux)
-               ifeq ($(bits),64)
-                       ifeq ($(shell which x86_64-w64-mingw32-c++-posix),)
-                               CXX=x86_64-w64-mingw32-c++
-                       else
-                               CXX=x86_64-w64-mingw32-c++-posix
-                       endif
+       ifeq ($(bits),64)
+               ifeq ($(shell which x86_64-w64-mingw32-c++-posix),)
+                       CXX=x86_64-w64-mingw32-c++
                else
                else
-                       ifeq ($(shell which i686-w64-mingw32-c++-posix),)
-                               CXX=i686-w64-mingw32-c++
-                       else
-                               CXX=i686-w64-mingw32-c++-posix
-                       endif
+                       CXX=x86_64-w64-mingw32-c++-posix
                endif
        else
                endif
        else
-               CXX=g++
+               ifeq ($(shell which i686-w64-mingw32-c++-posix),)
+                       CXX=i686-w64-mingw32-c++
+               else
+                       CXX=i686-w64-mingw32-c++-posix
+               endif
        endif
 
        CXXFLAGS += -Wextra -Wshadow
        endif
 
        CXXFLAGS += -Wextra -Wshadow