changeset 1865:43c6ecfc598a

It seems WIN64 is defined in 32-bit mode using MinGW... so switch to using DW64 as the define to say which mode we are compiling in. This fixes 32-bit MinGW builds not functioning due to using 64-bit manifest instead of the 32-bit one.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 08 Mar 2013 18:03:13 +0000
parents 3816d76835e9
children f3ae396b3585
files makefile.mingw win/dw.rc win/dwtest.rc
diffstat 3 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/makefile.mingw	Thu Mar 07 20:17:24 2013 +0000
+++ b/makefile.mingw	Fri Mar 08 18:03:13 2013 +0000
@@ -18,7 +18,7 @@
 else
 PLATFORM_DEF=-DWIN64
 PLATFORM_CFLAGS=-m64
-PLATFORM_TARGET=pe-x86-64
+PLATFORM_TARGET=pe-x86-64 -DDW64
 endif
 
 # Had to disable -Wunused-value due to every Win32 macro generating this warning...
@@ -34,7 +34,7 @@
 all: dw.dll dwcompat.dll dwtest.exe
 
 dw.res:  win/dw.rc
-	windres $(PLATFORM_DEF) --target=$(PLATFORM_TARGET) --input win/dw.rc --output dw.res --output-format=coff
+	windres --target=$(PLATFORM_TARGET) --input win/dw.rc --output dw.res --output-format=coff
    
 dw.dll:  $(OBJECTS) win/dw-mingw.def dw.res
 	$(CC) $(CFLAGS) $(DEFS) -o dw.dll dw.res $(OBJECTS) $(LDFLAGS) \
@@ -45,7 +45,7 @@
   -Wl,--out-implib,dwcompat.a -Wl,-Map,dwcompat.dll.map -Wl,--cref  -Wl,--enable-stdcall-fixup win/dwcompat-mingw.def 
 
 dwtest.res: win/dwtest.rc
-	windres $(PLATFORM_DEF) --target=$(PLATFORM_TARGET) --input win/dwtest.rc --output dwtest.res --output-format=coff
+	windres --target=$(PLATFORM_TARGET) --input win/dwtest.rc --output dwtest.res --output-format=coff
    
 dwtest.exe: dwtest.o dw.a dwcompat.a dwtest.res
 	$(CC) $(CFLAGS) -o dwtest.exe dwtest.res dwtest.o dw.a dwcompat.a
--- a/win/dw.rc	Thu Mar 07 20:17:24 2013 +0000
+++ b/win/dw.rc	Fri Mar 08 18:03:13 2013 +0000
@@ -1,5 +1,5 @@
 #include "winuser.h"
-#ifdef WIN64
+#ifdef DW64
 2 RT_MANIFEST dw.dll.x64.manifest
 #else
 2 RT_MANIFEST dw.dll.x86.manifest
--- a/win/dwtest.rc	Thu Mar 07 20:17:24 2013 +0000
+++ b/win/dwtest.rc	Fri Mar 08 18:03:13 2013 +0000
@@ -1,5 +1,5 @@
 #include "winuser.h"
-#ifdef WIN64
+#ifdef DW64
 1 RT_MANIFEST dwtest.exe.x64.manifest
 #else
 1 RT_MANIFEST dwtest.exe.x86.manifest