comparison makefile.mingw @ 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 417176df4755
children 87d574dda8f5
comparison
equal deleted inserted replaced
1864:3816d76835e9 1865:43c6ecfc598a
16 PLATFORM_CFLAGS=-m32 16 PLATFORM_CFLAGS=-m32
17 PLATFORM_TARGET=pe-i386 17 PLATFORM_TARGET=pe-i386
18 else 18 else
19 PLATFORM_DEF=-DWIN64 19 PLATFORM_DEF=-DWIN64
20 PLATFORM_CFLAGS=-m64 20 PLATFORM_CFLAGS=-m64
21 PLATFORM_TARGET=pe-x86-64 21 PLATFORM_TARGET=pe-x86-64 -DDW64
22 endif 22 endif
23 23
24 # Had to disable -Wunused-value due to every Win32 macro generating this warning... 24 # Had to disable -Wunused-value due to every Win32 macro generating this warning...
25 # GCC has marked this as WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24900 25 # GCC has marked this as WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24900
26 CFLAGS = -O -g -DMSVC $(PLATFORM_DEF) $(PLATFORM_CFLAGS) -D__WIN32__ -DBUILD_DLL -DGDIPLUS -DTOOLBAR -DUNICODE -D_UNICODE -DISOLATION_AWARE_ENABLED=1 -I./win -I. -I./platform -Wall -Wno-unused-value -mthreads -o $(@) 26 CFLAGS = -O -g -DMSVC $(PLATFORM_DEF) $(PLATFORM_CFLAGS) -D__WIN32__ -DBUILD_DLL -DGDIPLUS -DTOOLBAR -DUNICODE -D_UNICODE -DISOLATION_AWARE_ENABLED=1 -I./win -I. -I./platform -Wall -Wno-unused-value -mthreads -o $(@)
32 VPATH=../ ../win 32 VPATH=../ ../win
33 33
34 all: dw.dll dwcompat.dll dwtest.exe 34 all: dw.dll dwcompat.dll dwtest.exe
35 35
36 dw.res: win/dw.rc 36 dw.res: win/dw.rc
37 windres $(PLATFORM_DEF) --target=$(PLATFORM_TARGET) --input win/dw.rc --output dw.res --output-format=coff 37 windres --target=$(PLATFORM_TARGET) --input win/dw.rc --output dw.res --output-format=coff
38 38
39 dw.dll: $(OBJECTS) win/dw-mingw.def dw.res 39 dw.dll: $(OBJECTS) win/dw-mingw.def dw.res
40 $(CC) $(CFLAGS) $(DEFS) -o dw.dll dw.res $(OBJECTS) $(LDFLAGS) \ 40 $(CC) $(CFLAGS) $(DEFS) -o dw.dll dw.res $(OBJECTS) $(LDFLAGS) \
41 -Wl,--out-implib,dw.a -Wl,-Map,dw.dll.map -Wl,--cref -Wl,--enable-stdcall-fixup win/dw-mingw.def 41 -Wl,--out-implib,dw.a -Wl,-Map,dw.dll.map -Wl,--cref -Wl,--enable-stdcall-fixup win/dw-mingw.def
42 42
43 dwcompat.dll: $(COMPATOBJECTS) win/dwcompat-mingw.def 43 dwcompat.dll: $(COMPATOBJECTS) win/dwcompat-mingw.def
44 $(CC) $(CFLAGS) $(DEFS) -o dwcompat.dll $(COMPATOBJECTS) $(LDFLAGS) -lwsock32 \ 44 $(CC) $(CFLAGS) $(DEFS) -o dwcompat.dll $(COMPATOBJECTS) $(LDFLAGS) -lwsock32 \
45 -Wl,--out-implib,dwcompat.a -Wl,-Map,dwcompat.dll.map -Wl,--cref -Wl,--enable-stdcall-fixup win/dwcompat-mingw.def 45 -Wl,--out-implib,dwcompat.a -Wl,-Map,dwcompat.dll.map -Wl,--cref -Wl,--enable-stdcall-fixup win/dwcompat-mingw.def
46 46
47 dwtest.res: win/dwtest.rc 47 dwtest.res: win/dwtest.rc
48 windres $(PLATFORM_DEF) --target=$(PLATFORM_TARGET) --input win/dwtest.rc --output dwtest.res --output-format=coff 48 windres --target=$(PLATFORM_TARGET) --input win/dwtest.rc --output dwtest.res --output-format=coff
49 49
50 dwtest.exe: dwtest.o dw.a dwcompat.a dwtest.res 50 dwtest.exe: dwtest.o dw.a dwcompat.a dwtest.res
51 $(CC) $(CFLAGS) -o dwtest.exe dwtest.res dwtest.o dw.a dwcompat.a 51 $(CC) $(CFLAGS) -o dwtest.exe dwtest.res dwtest.o dw.a dwcompat.a
52 52
53 clean: 53 clean: