annotate makefile.mingw @ 1663:a76fb5f1a6c8

Fixes for building in Unicode mode with MinGW on Windows. Also fix incorrect calling conventions on signal handlers with MinGW. AEROGLASS is still not supported with MinGW due to some missing items in the uxtheme.h header.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 20 Apr 2012 19:44:16 +0000
parents 6baf177f335c
children 22225eb286e5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
570
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
1
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
2 # Dynamic Windows MINGW Makefile
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
3
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
4 # make -C MingW32-gcc-3.4.0-DEBUG -f ../makefile.mingw DEBUG=Y > MingW32-gcc-3.4.0-DEBUG/make-out.log 2>&1
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
5 # make -C MingW32-gcc-3.4.0-RELEASE -f ../makefile.mingw > MingW32-gcc-3.4.0-RELEASE/make-out.log 2>&1
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
6
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
7 CC = gcc
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
8
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
9 DEFS =
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
10 LIBS =
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
11
1663
a76fb5f1a6c8 Fixes for building in Unicode mode with MinGW on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1594
diff changeset
12 CFLAGS = -O -g -DMSVC -DWIN32 -D__WIN32__ -DGDIPLUS -DUNICODE -D_UNICODE -DISOLATION_AWARE_ENABLED=1 -I./win -I. -I./platform -Wall -mthreads -o $(@)
1362
412af8059331 Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
13 LDFLAGS = -shared -mwindows -mthreads -lcomctl32 -lole32 -loleaut32 -luserenv -lmsimg32 -lgdiplus
570
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
14
1594
6baf177f335c Rename compat.c/h dwcompat.c/h and configure option to --with-dwcompat.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1532
diff changeset
15 COMPATOBJECTS = dwcompat.o dirent.o
1362
412af8059331 Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
16 OBJECTS = dw.o XBrowseForFolder.o
570
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
17
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
18 VPATH=../ ../win
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
19
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
20 all: dw.dll dwcompat.dll dwtest.exe
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
21
1362
412af8059331 Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
22 dw.dll: $(OBJECTS) win/dw-mingw.def
412af8059331 Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
23 $(CC) $(CFLAGS) $(DEFS) -o dw.dll $(OBJECTS) $(LDFLAGS) \
412af8059331 Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
24 -Wl,--out-implib,dw.a -Wl,-Map,dw.dll.map -Wl,--cref -Wl,--enable-stdcall-fixup win/dw-mingw.def
570
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
25
1362
412af8059331 Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
26 dwcompat.dll: $(COMPATOBJECTS) win/dwcompat-mingw.def
570
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
27 $(CC) $(CFLAGS) $(DEFS) -o dwcompat.dll $(COMPATOBJECTS) $(LDFLAGS) -lwsock32 \
1362
412af8059331 Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
28 -Wl,--out-implib,dwcompat.a -Wl,-Map,dwcompat.dll.map -Wl,--cref -Wl,--enable-stdcall-fixup win/dwcompat-mingw.def
570
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
29
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
30 dwtest.exe: dwtest.o dw.a dwcompat.a
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
31 $(CC) $(CFLAGS) -o dwtest.exe dwtest.o dw.a dwcompat.a
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
32
1362
412af8059331 Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
33 dw.o: win/dw.c
1663
a76fb5f1a6c8 Fixes for building in Unicode mode with MinGW on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1594
diff changeset
34 $(CC) $(CFLAGS) -DBUILD_DLL -c $<
1362
412af8059331 Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
35
412af8059331 Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
36 XBrowseForFolder.o: win/XBrowseForFolder.cpp
1663
a76fb5f1a6c8 Fixes for building in Unicode mode with MinGW on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1594
diff changeset
37 $(CC) $(CFLAGS) -DBUILD_DLL -c $<
570
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
38
1594
6baf177f335c Rename compat.c/h dwcompat.c/h and configure option to --with-dwcompat.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1532
diff changeset
39 dwcompat.o: dwcompat.c
1663
a76fb5f1a6c8 Fixes for building in Unicode mode with MinGW on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1594
diff changeset
40 $(CC) $(CFLAGS) -DBUILD_DLL -c $<
570
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
41
1362
412af8059331 Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
42 dirent.o: win/dirent.c
1663
a76fb5f1a6c8 Fixes for building in Unicode mode with MinGW on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1594
diff changeset
43 $(CC) $(CFLAGS) -DBUILD_DLL -c $<
570
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
44
1362
412af8059331 Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
45 dwtest.o: dwtest.c
570
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
46 $(CC) $(CFLAGS) -c $<
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
47
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
48 DEPS := $(wildcard *.d)
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
49 ifneq ($(DEPS),)
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
50 include $(DEPS)
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
51 endif
052e9e4a59bd MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
52