Mercurial > dwindows
annotate makefile.vc @ 758:842bc671eaa7
Added manifest files that will import the common controls library that allows for XP/Vista/7 themes to be used.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 17 Mar 2011 17:34:58 +0000 |
parents | ef17c8079f1d |
children | b28ec71cfc88 |
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" |
643
9ab89d89e6b4
Add dw_listview_insert()
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
640
diff
changeset
|
42 CFLAGS_DEBUG = -DDEBUG -Z7 -Od # 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 |
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
631
diff
changeset
|
45 CFLAGS_DEBUG = -Ox |
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) |
647
f09977bc9b5c
Fixed building with Visual Studio 2008.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
643
diff
changeset
|
51 CFLAGS_COMPILE = -MTd # was -MD |
584
420c6c94abc7
Added dw_html_* functionality for embedding HTML pages in Dynamic Windows
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
381
diff
changeset
|
52 LIBS = wsock32.lib kernel32.lib user32.lib comctl32.lib gdi32.lib advapi32.lib shell32.lib comdlg32.lib ole32.lib oleaut32.lib |
598
78a8c4123818
Specify library output filenames.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
584
diff
changeset
|
53 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
|
54 LINKFLAGS = -machine:$(TARGET_CPU) -manifest $(LINK_DEBUG) |
3 | 55 DLLLINKFLAGS = -dll |
56 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
|
57 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
|
58 DEFFILE2 = $(SRCDIR)\dwcompatw.def |
3 | 59 |
631
fa6c46796883
Use better directory browser widget.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
598
diff
changeset
|
60 OBJS = dw.obj browser.obj XBrowseForFolder.obj |
3 | 61 |
62 OBJS2 = compat.obj dirent.obj | |
63 | |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
64 all: dw dwcompat dwtest |
3 | 65 |
66 clean: | |
67 -erase *.dll | |
68 -erase *.exe | |
69 -erase *.opt | |
70 -erase *.lib | |
71 -erase *.obj | |
72 -erase *.map | |
73 -erase *.pdb | |
74 -erase *.ilk | |
75 -erase *.exp | |
76 -erase *~ | |
598
78a8c4123818
Specify library output filenames.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
584
diff
changeset
|
77 |
3 | 78 dw: dw.dll |
79 | |
80 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
|
81 -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
|
82 -mkdir $(DWDLLDIR) |
3 | 83 $(LINK) @<< |
84 -out:$(@) -def:$(DEFFILE) | |
85 $(LINKFLAGS) $(DLLLINKFLAGS) | |
86 $(OBJS) $(RES) | |
87 $(LIBS) | |
88 << | |
598
78a8c4123818
Specify library output filenames.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
584
diff
changeset
|
89 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
|
90 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
|
91 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
|
92 copy dw.dll $(DWDLLDIR)\dw.dll |
3 | 93 |
94 dwcompat: dwcompat.dll | |
95 | |
96 dwcompat.dll: $(OBJS2) $(DEFFILE2) | |
97 $(LINK) @<< | |
98 -out:$(@) -def:$(DEFFILE2) | |
99 $(LINKFLAGS) $(DLLLINKFLAGS) | |
100 $(OBJS2) $(RES) | |
101 $(LIBS) | |
102 << | |
598
78a8c4123818
Specify library output filenames.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
584
diff
changeset
|
103 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
|
104 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
|
105 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
|
106 copy dwcompat.dll $(DWDLLDIR)\dwcompat.dll |
3 | 107 |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
108 dw.obj: $(SRCDIR)\win\dw.c |
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
109 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(CFLAGS_COMPILE) $(SRCDIR)\win\dw.c |
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
110 |
584
420c6c94abc7
Added dw_html_* functionality for embedding HTML pages in Dynamic Windows
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
381
diff
changeset
|
111 browser.obj: $(SRCDIR)\win\browser.c |
420c6c94abc7
Added dw_html_* functionality for embedding HTML pages in Dynamic Windows
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
381
diff
changeset
|
112 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(CFLAGS_COMPILE) $(SRCDIR)\win\browser.c |
420c6c94abc7
Added dw_html_* functionality for embedding HTML pages in Dynamic Windows
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
381
diff
changeset
|
113 |
631
fa6c46796883
Use better directory browser widget.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
598
diff
changeset
|
114 XBrowseForFolder.obj: $(SRCDIR)\win\XBrowseForFolder.cpp |
fa6c46796883
Use better directory browser widget.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
598
diff
changeset
|
115 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(CFLAGS_COMPILE) $(SRCDIR)\win\XBrowseForFolder.cpp |
fa6c46796883
Use better directory browser widget.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
598
diff
changeset
|
116 |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
117 dirent.obj: $(SRCDIR)\win\dirent.c |
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
118 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(CFLAGS_COMPILE) $(SRCDIR)\win\dirent.c |
3 | 119 |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
120 compat.obj: $(SRCDIR)\compat.c |
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
121 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(CFLAGS_COMPILE) $(SRCDIR)\compat.c |
3 | 122 |
381
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
123 dwtest.obj: $(SRCDIR)\dwtest.c |
0df4ad2ac083
Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
286
diff
changeset
|
124 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(CFLAGS_COMPILE) $(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
|
125 |
286
e9270ff04ced
Simple add dwtest as a target, dependent on dwtest.exe.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
191
diff
changeset
|
126 dwtest: dwtest.exe |
e9270ff04ced
Simple add dwtest as a target, dependent on dwtest.exe.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
191
diff
changeset
|
127 |
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
|
128 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
|
129 $(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
|
130 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
|
131 |
cd1f9f0bd7e1
Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
634
diff
changeset
|
132 zip: dw.dll |
cd1f9f0bd7e1
Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
634
diff
changeset
|
133 copy win\readme-win.txt . |
cd1f9f0bd7e1
Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
634
diff
changeset
|
134 zip dwindows-win32-$(VERDOT).zip readme-win.txt dw.dll dwcompat.dll dw.lib dwcompat.lib dw.h |