summaryrefslogtreecommitdiff
path: root/src/Make_mvc.mak
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-12-11 19:38:44 +0100
committerBram Moolenaar <Bram@vim.org>2015-12-11 19:38:44 +0100
commit6b90351786eb0915336b576cc930300bf5c9ac63 (patch)
treea83703869c46c0ab8bad69055615cfc649f267c5 /src/Make_mvc.mak
parent49222bee65228c7b5994b33c1568394c3cbf4583 (diff)
downloadvim-git-6b90351786eb0915336b576cc930300bf5c9ac63.tar.gz
patch 7.4.967v7.4.967
Problem: Cross compilation on MS-windows doesn't work well. Solution: Tidy up cross compilation across architectures with Visual Studio. (Mike Williams)
Diffstat (limited to 'src/Make_mvc.mak')
-rw-r--r--src/Make_mvc.mak20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak
index c7b28d59c..5583ef2d9 100644
--- a/src/Make_mvc.mak
+++ b/src/Make_mvc.mak
@@ -211,20 +211,24 @@ OBJDIR = $(OBJDIR)d
! ifdef CPU
ASSEMBLY_ARCHITECTURE=$(CPU)
# Using I386 for $ASSEMBLY_ARCHITECTURE doesn't work for VC7.
-! if ("$(ASSEMBLY_ARCHITECTURE)" == "i386") || ("$(ASSEMBLY_ARCHITECTURE)" == "I386")
-ASSEMBLY_ARCHITECTURE = x86
-! endif
-! else
-CPU = $(PROCESSOR_ARCHITECTURE)
-ASSEMBLY_ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
-! if ("$(CPU)" == "x86") || ("$(CPU)" == "X86")
+! if "$(CPU)" == "I386"
CPU = i386
! endif
+! else # !CPU
+CPU = i386
+! ifdef PLATFORM
+! if ("$(PLATFORM)" == "x64") || ("$(PLATFORM)" == "X64")
+CPU = AMD64
+! elseif ("$(PLATFORM)" != "x86") && ("$(PLATFORM)" != "X86")
+! error *** ERROR Unknown target platform "$(PLATFORM)". Make aborted.
+! endif
+! endif # !PLATFORM
! endif
!else # !PROCESSOR_ARCHITECTURE
# We're on Windows 95
CPU = i386
!endif # !PROCESSOR_ARCHITECTURE
+ASSEMBLY_ARCHITECTURE=$(CPU)
OBJDIR = $(OBJDIR)$(CPU)
# Build a retail version by default
@@ -415,7 +419,7 @@ CPUARG =
!endif
!else
# VC8/9/10 only allows specifying SSE architecture but only for 32bit
-!if "$(ASSEMBLY_ARCHITECTURE)" == "x86" && "$(CPUNR)" == "pentium4"
+!if "$(ASSEMBLY_ARCHITECTURE)" == "i386" && "$(CPUNR)" == "pentium4"
CPUARG = /arch:SSE2
!endif
!endif