Mercurial > dwindows
annotate makefile.mingw @ 1842:123d1a900f54
More MINGW cleanups... eliminate a few more warnings and disable the unused-value warning due to unfixable warnings generated by the Win32 macros.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 20 Nov 2012 20:42:06 +0000 |
parents | 22225eb286e5 |
children | 72a75442c51d |
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 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
|
5 RM = del /f |
570
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 DEFS = |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
8 LIBS = |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
9 |
1842
123d1a900f54
More MINGW cleanups... eliminate a few more warnings and disable the unused-value warning due to unfixable warnings generated by the Win32 macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1839
diff
changeset
|
10 # Had to disable -Wunused-value due to every Win32 macro generating this warning... |
123d1a900f54
More MINGW cleanups... eliminate a few more warnings and disable the unused-value warning due to unfixable warnings generated by the Win32 macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1839
diff
changeset
|
11 # GCC has marked this as WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24900 |
123d1a900f54
More MINGW cleanups... eliminate a few more warnings and disable the unused-value warning due to unfixable warnings generated by the Win32 macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1839
diff
changeset
|
12 CFLAGS = -O -g -DMSVC -DWIN32 -D__WIN32__ -DGDIPLUS -DUNICODE -D_UNICODE -DISOLATION_AWARE_ENABLED=1 -I./win -I. -I./platform -Wall -Wno-unused-value -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 |
1839
22225eb286e5
Fixes for building with MINGW64 (specifically http://tdm-gcc.tdragon.net/).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1663
diff
changeset
|
33 clean: |
22225eb286e5
Fixes for building with MINGW64 (specifically http://tdm-gcc.tdragon.net/).
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1663
diff
changeset
|
34 $(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
|
35 |
1362
412af8059331
Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1360
diff
changeset
|
36 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
|
37 $(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
|
38 |
412af8059331
Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1360
diff
changeset
|
39 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
|
40 $(CC) $(CFLAGS) -DBUILD_DLL -c $< |
570
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
41 |
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
|
42 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
|
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 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
|
46 $(CC) $(CFLAGS) -DBUILD_DLL -c $< |
570
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
47 |
1362
412af8059331
Attempt to get it building with Mingw again... builds but crashes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1360
diff
changeset
|
48 dwtest.o: dwtest.c |
570
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
49 $(CC) $(CFLAGS) -c $< |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
50 |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
51 DEPS := $(wildcard *.d) |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
52 ifneq ($(DEPS),) |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
53 include $(DEPS) |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
54 endif |
052e9e4a59bd
MinGW support file
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
55 |