winbuild: Use machine type of development environment
authorMarc Hoersken <info@marc-hoersken.de>
Thu, 1 Nov 2012 21:23:05 +0000 (22:23 +0100)
committerMarc Hoersken <info@marc-hoersken.de>
Thu, 1 Nov 2012 21:23:05 +0000 (22:23 +0100)
This patch restores the original behavior instead of always
falling back to x86 if no MACHINE-type was specified.

winbuild/Makefile.vc

index d81c6ff..222576e 100644 (file)
@@ -32,7 +32,7 @@ CFGSET=true
 !MESSAGE   ENABLE_WINSSL=<yes or no>    - Enable native Windows SSL support, defaults to yes\r
 !MESSAGE   GEN_PDB=<yes or no>          - Generate Program Database (debug symbols for release build)\r
 !MESSAGE   DEBUG=<yes or no>            - Debug builds\r
-!MESSAGE   MACHINE=<x86 or x64>         - Target architecture (default x86)
+!MESSAGE   MACHINE=<x86 or x64>         - Target architecture (default x64 on AMD64, x86 on others)
 !ERROR please choose a valid mode\r
 \r
 !ENDIF\r
@@ -55,8 +55,12 @@ ENABLE_SSPI = $(USE_SSPI)
 !ENDIF\r
 \r
 # default options\r
-!IFNDEF MACHINE
-MACHINE = x86
+!IFNDEF MACHINE\r
+!IF "$(PROCESSOR_ARCHITECTURE)"=="AMD64"\r
+MACHINE = x64\r
+!ELSE
+MACHINE = x86\r
+!ENDIF
 !ENDIF
 
 !IFNDEF ENABLE_IDN\r