Mercurial > dwindows
annotate makefile.vc @ 1001:4ef0e878fe06
Added support for Dynamic Windows style font names for GTK3.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 08 May 2011 06:18:41 +0000 |
parents | 841b66d2d1b9 |
children | facf58c6a4c7 |
rev | line source |
---|---|
3 | 1 # |
750
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
2 # Visual C Makefile for Dynamic Windows |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
3 # |
640
cd1f9f0bd7e1
Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
634
diff
changeset
|
4 VER = 11 |
cd1f9f0bd7e1
Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
634
diff
changeset
|
5 VERDOT = 1.1 |
cd1f9f0bd7e1
Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
634
diff
changeset
|
6 |
750
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
7 # |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
8 # Setup the source and destination directories |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
9 # |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
10 !if "$(DWINDOWS_SRCDIR)" == "" |
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
11 SRCDIR=. |
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
12 !else |
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
13 SRCDIR=$(DWINDOWS_SRCDIR) |
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
14 !endif |
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
15 |
750
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
16 !if "$(DWLIBDIR)" == "" |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
17 DWLIBDIR=.\lib |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
18 !endif |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
19 |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
20 !if "$(DWDLLDIR)" == "" |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
21 DWDLLDIR=.\dll |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
22 !endif |
3 | 23 |
750
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
24 # |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
25 # Configure settings for the target platform |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
26 # Default to x86 if not specified |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
27 # |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
28 !if "$(TARGET_CPU)" == "" |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
29 TARGET_CPU=x86 |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
30 !endif |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
31 |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
32 !if "$(TARGET_CPU)" == "x86" |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
33 PLATFORM_DEF = -DWIN32 |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
34 !else |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
35 PLATFORM_DEF = -DWIN64 |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
36 !endif |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
37 |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
38 # |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
39 # Settings for either debug or release |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
40 # |
634
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
631
diff
changeset
|
41 !if "$(DEBUG)" == "Y" |
772
b28ec71cfc88
Add -MT or -MTd switch to DEBUG switches
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
758
diff
changeset
|
42 CFLAGS_DEBUG = -DDEBUG -Z7 -Od -MTd # was -Zi |
647
f09977bc9b5c
Fixed building with Visual Studio 2008.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
643
diff
changeset
|
43 LINK_DEBUG = -debug |
634
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
631
diff
changeset
|
44 !else |
772
b28ec71cfc88
Add -MT or -MTd switch to DEBUG switches
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
758
diff
changeset
|
45 CFLAGS_DEBUG = -Ox -MT |
634
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
631
diff
changeset
|
46 LINK_DEBUG = -release |
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
631
diff
changeset
|
47 !endif |
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
631
diff
changeset
|
48 |
3 | 49 CC = cl |
756
ef17c8079f1d
Remove the compiler flag setting structure packing to 1 byte. The Windows API expect it to be 8 bytes.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
750
diff
changeset
|
50 CFLAGS = -c $(PLATFORM_DEF) -D__WIN32__ -DMSVC -DBUILD_DLL -I$(SRCDIR)\platform -I$(SRCDIR) |
960
841b66d2d1b9
Added initial support for transparent pixmap/bitmaps on Windows...
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
907
diff
changeset
|
51 LIBS = wsock32.lib kernel32.lib user32.lib comctl32.lib gdi32.lib advapi32.lib shell32.lib comdlg32.lib ole32.lib oleaut32.lib userenv.lib msimg32.lib |
598
78a8c4123818
Specify library output filenames.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
584
diff
changeset
|
52 RES = |
750
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
53 LINKFLAGS = -machine:$(TARGET_CPU) -manifest $(LINK_DEBUG) |
3 | 54 DLLLINKFLAGS = -dll |
55 LINK = link | |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
56 DEFFILE = $(SRCDIR)\dww.def |
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
57 DEFFILE2 = $(SRCDIR)\dwcompatw.def |
3 | 58 |
631
fa6c46796883
Use better directory browser widget.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
598
diff
changeset
|
59 OBJS = dw.obj browser.obj XBrowseForFolder.obj |
3 | 60 |
61 OBJS2 = compat.obj dirent.obj | |
62 | |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
63 all: dw dwcompat dwtest |
3 | 64 |
65 clean: | |
66 -erase *.dll | |
67 -erase *.exe | |
68 -erase *.opt | |
69 -erase *.lib | |
70 -erase *.obj | |
71 -erase *.map | |
72 -erase *.pdb | |
73 -erase *.ilk | |
74 -erase *.exp | |
75 -erase *~ | |
598
78a8c4123818
Specify library output filenames.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
584
diff
changeset
|
76 |
3 | 77 dw: dw.dll |
78 | |
79 dw.dll: $(OBJS) $(DEFFILE) | |
750
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
80 -mkdir $(DWLIBDIR) |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
81 -mkdir $(DWDLLDIR) |
3 | 82 $(LINK) @<< |
83 -out:$(@) -def:$(DEFFILE) | |
84 $(LINKFLAGS) $(DLLLINKFLAGS) | |
85 $(OBJS) $(RES) | |
86 $(LIBS) | |
87 << | |
598
78a8c4123818
Specify library output filenames.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
584
diff
changeset
|
88 lib /def:$(DEFFILE) /out:dw.lib |
758
842bc671eaa7
Added manifest files that will import the common controls library that allows for XP/Vista/7 themes to be used.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
756
diff
changeset
|
89 mt.exe /manifest dw.dll.manifest win\dw.dll.$(TARGET_CPU).manifest /outputresource:dw.dll;2 |
750
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
90 copy dw.lib $(DWLIBDIR)\dw.lib |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
91 copy dw.dll $(DWDLLDIR)\dw.dll |
3 | 92 |
93 dwcompat: dwcompat.dll | |
94 | |
95 dwcompat.dll: $(OBJS2) $(DEFFILE2) | |
96 $(LINK) @<< | |
97 -out:$(@) -def:$(DEFFILE2) | |
98 $(LINKFLAGS) $(DLLLINKFLAGS) | |
99 $(OBJS2) $(RES) | |
100 $(LIBS) | |
101 << | |
598
78a8c4123818
Specify library output filenames.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
584
diff
changeset
|
102 lib /def:$(DEFFILE2) /out:dwcompat.lib |
750
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
103 mt.exe /manifest dwcompat.dll.manifest /outputresource:dwcompat.dll;2 |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
104 copy dwcompat.lib $(DWLIBDIR)\dwcompat.lib |
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
105 copy dwcompat.dll $(DWDLLDIR)\dwcompat.dll |
3 | 106 |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
107 dw.obj: $(SRCDIR)\win\dw.c |
772
b28ec71cfc88
Add -MT or -MTd switch to DEBUG switches
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
758
diff
changeset
|
108 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCDIR)\win\dw.c |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
109 |
584
420c6c94abc7
Added dw_html_* functionality for embedding HTML pages in Dynamic Windows
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
381
diff
changeset
|
110 browser.obj: $(SRCDIR)\win\browser.c |
772
b28ec71cfc88
Add -MT or -MTd switch to DEBUG switches
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
758
diff
changeset
|
111 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCDIR)\win\browser.c |
584
420c6c94abc7
Added dw_html_* functionality for embedding HTML pages in Dynamic Windows
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
381
diff
changeset
|
112 |
631
fa6c46796883
Use better directory browser widget.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
598
diff
changeset
|
113 XBrowseForFolder.obj: $(SRCDIR)\win\XBrowseForFolder.cpp |
772
b28ec71cfc88
Add -MT or -MTd switch to DEBUG switches
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
758
diff
changeset
|
114 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCDIR)\win\XBrowseForFolder.cpp |
631
fa6c46796883
Use better directory browser widget.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
598
diff
changeset
|
115 |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
116 dirent.obj: $(SRCDIR)\win\dirent.c |
772
b28ec71cfc88
Add -MT or -MTd switch to DEBUG switches
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
758
diff
changeset
|
117 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCDIR)\win\dirent.c |
3 | 118 |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
119 compat.obj: $(SRCDIR)\compat.c |
772
b28ec71cfc88
Add -MT or -MTd switch to DEBUG switches
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
758
diff
changeset
|
120 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCDIR)\compat.c |
3 | 121 |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
122 dwtest.obj: $(SRCDIR)\dwtest.c |
772
b28ec71cfc88
Add -MT or -MTd switch to DEBUG switches
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
758
diff
changeset
|
123 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCDIR)\dwtest.c |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
45
diff
changeset
|
124 |
286
e9270ff04ced
Simple add dwtest as a target, dependent on dwtest.exe.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
191
diff
changeset
|
125 dwtest: dwtest.exe |
e9270ff04ced
Simple add dwtest as a target, dependent on dwtest.exe.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
191
diff
changeset
|
126 |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
45
diff
changeset
|
127 dwtest.exe: dwtest.obj winmain.obj |
750
e6a9f1c7b0d7
Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
647
diff
changeset
|
128 $(LINK) $(LINKFLAGS) /out:dwtest.exe dwtest.obj winmain.obj /subsystem:windows $(DWLIBDIR)\dwcompat.lib $(DWLIBDIR)\dw.lib $(LIBS) |
758
842bc671eaa7
Added manifest files that will import the common controls library that allows for XP/Vista/7 themes to be used.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
756
diff
changeset
|
129 mt.exe /manifest dwtest.exe.manifest win\dwtest.exe.$(TARGET_CPU).manifest /outputresource:dwtest.exe;1 |
640
cd1f9f0bd7e1
Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
634
diff
changeset
|
130 |
cd1f9f0bd7e1
Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
634
diff
changeset
|
131 zip: dw.dll |
cd1f9f0bd7e1
Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
634
diff
changeset
|
132 copy win\readme-win.txt . |
cd1f9f0bd7e1
Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
634
diff
changeset
|
133 zip dwindows-win32-$(VERDOT).zip readme-win.txt dw.dll dwcompat.dll dw.lib dwcompat.lib dw.h |