win32/Makefile changes for Windows 64 bit
Jan Dubois [Mon, 17 Apr 2006 01:48:34 +0000 (18:48 -0700)]
From: "Jan Dubois" <jand@ActiveState.com>
Message-ID: <036401c661fb$bc7a1200$2217a8c0@candy>

and make similar changes to win32/makefile.mk
and delete a spurious extra line from that file

p4raw-id: //depot/perl@27888

win32/Makefile
win32/makefile.mk

index 3257ed3..a8dcdb9 100644 (file)
@@ -308,11 +308,14 @@ PROCESSOR_ARCHITECTURE    = x86
 !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
@@ -320,20 +323,21 @@ 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
 
index f360489..98779d4 100644 (file)
@@ -309,32 +309,35 @@ BUILDOPT  += -DPERL_IMPLICIT_SYS
 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"