!ENDIF
!IF "$(WIN64)" == ""
+# When we are running from a 32bit cmd.exe on AMD64 then
+# PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
+# is set to AMD64
!IF "$(PROCESSOR_ARCHITEW6432)" != ""
PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
WIN64 = define
!ELSE
-!IF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
+!IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
WIN64 = define
!ELSE
WIN64 = undef
!ENDIF
!ENDIF
-!IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64"
-PROCESSOR_ARCHITECTURE = x86_64
+ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
+!IF "$(ARCHITECTURE)" == "AMD64"
+ARCHITECTURE = x64
!ENDIF
-!IF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
-PROCESSOR_ARCHITECTURE = ia64
+!IF "$(ARCHITECTURE)" == "IA64"
+ARCHITECTURE = ia64
!ENDIF
!IF "$(USE_MULTI)" == "define"
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
+ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
!ELSE
!IF "$(USE_PERLIO)" == "define"
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
+ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
!ELSE
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
+ARCHNAME = MSWin32-$(ARCHITECTURE)
!ENDIF
!ENDIF
PROCESSOR_ARCHITECTURE *= x86
.IF "$(WIN64)" == ""
+# When we are running from a 32bit cmd.exe on AMD64 then
+# PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
+# is set to AMD64
.IF "$(PROCESSOR_ARCHITEW6432)" != ""
PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432)
WIN64 = define
-.ELIF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
+.ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" == "IA64"
WIN64 = define
.ELSE
WIN64 = undef
.ENDIF
.ENDIF
-.IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64"
-PROCESSOR_ARCHITECTURE = x86_64
+ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
+.IF "$(ARCHITECTURE)" == "AMD64"
+ARCHITECTURE = x64
.ENDIF
-.IF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
-PROCESSOR_ARCHITECTURE = ia64
+.IF "$(ARCHITECTURE)" == "IA64"
+ARCHITECTURE = ia64
.ENDIF
.IF "$(USE_MULTI)" == "define"
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
+ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
.ELSE
.IF "$(USE_PERLIO)" == "define"
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
+ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
.ELSE
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
+ARCHNAME = MSWin32-$(ARCHITECTURE)
.ENDIF
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
.ENDIF
.IF "$(USE_ITHREADS)" == "define"