Mercurial > dwindows
annotate makefile.mingw @ 1839:22225eb286e5
Fixes for building with MINGW64 (specifically http://tdm-gcc.tdragon.net/).
Currently a few things are missing, themes and HTML rendering but it builds
in both 32bit and 64bit mode. There are also warnings generated by gcc
every time the source calls a Windows API macro. (unused result warning).
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 19 Nov 2012 19:52:36 +0000 |
parents | a76fb5f1a6c8 |
children | 123d1a900f54 |
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 |
1839
22225eb286e5
Fixes for building with MINGW64 (specifically http://tdm-gcc.tdragon.net/).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1663
diff
changeset
|
8 RM = del /f |
570
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
9 |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
10 DEFS = |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
11 LIBS = |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
12 |
1663
a76fb5f1a6c8
Fixes for building in Unicode mode with MinGW on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1594
diff
changeset
|
13 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
|
14 LDFLAGS = -shared -mwindows -mthreads -lcomctl32 -lole32 -loleaut32 -luserenv -lmsimg32 -lgdiplus |
570
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
15 |
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
|
16 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
|
17 OBJECTS = dw.o XBrowseForFolder.o |
570
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
18 |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
19 VPATH=../ ../win |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
20 |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
21 all: dw.dll dwcompat.dll dwtest.exe |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
22 |
1362
412af8059331
Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1360
diff
changeset
|
23 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
|
24 $(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
|
25 -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
|
26 |
1362
412af8059331
Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1360
diff
changeset
|
27 dwcompat.dll: $(COMPATOBJECTS) win/dwcompat-mingw.def |
570
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
28 $(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
|
29 -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
|
30 |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
31 dwtest.exe: dwtest.o dw.a dwcompat.a |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
32 $(CC) $(CFLAGS) -o dwtest.exe dwtest.o dw.a dwcompat.a |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
33 |
1839
22225eb286e5
Fixes for building with MINGW64 (specifically http://tdm-gcc.tdragon.net/).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1663
diff
changeset
|
34 clean: |
22225eb286e5
Fixes for building with MINGW64 (specifically http://tdm-gcc.tdragon.net/).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1663
diff
changeset
|
35 $(RM) *.obj *.o *.lib *.res *~ dwtest.exe dw.dll dwcompat.dll SVN.REV |
22225eb286e5
Fixes for building with MINGW64 (specifically http://tdm-gcc.tdragon.net/).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1663
diff
changeset
|
36 |
1362
412af8059331
Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1360
diff
changeset
|
37 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
|
38 $(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
|
39 |
412af8059331
Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1360
diff
changeset
|
40 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
|
41 $(CC) $(CFLAGS) -DBUILD_DLL -c $< |
570
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
42 |
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
|
43 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
|
44 $(CC) $(CFLAGS) -DBUILD_DLL -c $< |
570
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
45 |
1362
412af8059331
Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1360
diff
changeset
|
46 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
|
47 $(CC) $(CFLAGS) -DBUILD_DLL -c $< |
570
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
48 |
1362
412af8059331
Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1360
diff
changeset
|
49 dwtest.o: dwtest.c |
570
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
50 $(CC) $(CFLAGS) -c $< |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
51 |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
52 DEPS := $(wildcard *.d) |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
53 ifneq ($(DEPS),) |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
54 include $(DEPS) |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
55 endif |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
56 |