annotate makefile.vc @ 2132:42f8ad7a89e8

Added DW_POINTER_TO_(U)LONGLONG and DW_(U)LONGLONG_TO_POINTER macros. This allows casting with intermediate (u)intptr_t cast to avoid compiler warnings on different systems. Use these macros where necessary in the code. Might need to check the compiler supports LONG LONG... since some compilers we support might not, like old versions of VisualAge C and Watcom.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 04 Jul 2020 17:51:46 +0000
parents 94ea915bd917
children da33732f182d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
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 #
1350
4333b58d879d Upped the version number to 2.2. Added a Version file to reduce the number of places
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1251
diff changeset
4 !include Version
4333b58d879d Upped the version number to 2.2. Added a Version file to reduce the number of places
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1251
diff changeset
5 VER = $(DW_MAJOR_VERSION)$(DW_MINOR_VERSION)
4333b58d879d Upped the version number to 2.2. Added a Version file to reduce the number of places
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1251
diff changeset
6 VERDOT = $(DW_MAJOR_VERSION).$(DW_MINOR_VERSION)
1163
2991afb3bf71 Added support for including the svn revision number as the sub version with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1113
diff changeset
7 VERREV = 0
640
cd1f9f0bd7e1 Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 634
diff changeset
8
750
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
9 #
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
10 # 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
11 #
381
0df4ad2ac083 Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 286
diff changeset
12 !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
13 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 !else
0df4ad2ac083 Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 286
diff changeset
15 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
16 !endif
0df4ad2ac083 Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 286
diff changeset
17
750
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
18 !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
19 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
20 !endif
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
21
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
22 !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
23 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
24 !endif
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
25
750
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
26 #
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
27 # 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
28 # 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
29 #
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
30 !if "$(TARGET_CPU)" == ""
1928
e07a1e176995 Try to get the target CPU from the Visual Studio environment, so you don't need to set TARGET_CPU.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1726
diff changeset
31 !if "$(VSCMD_ARG_TGT_ARCH)" == ""
2080
8f08d4c9d3fc Win: Visual Studio 2015 sets PLATFORM=x64 in 64bit intel mode so
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2079
diff changeset
32 !if "$(PLATFORM)" == ""
750
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
33 TARGET_CPU=x86
1928
e07a1e176995 Try to get the target CPU from the Visual Studio environment, so you don't need to set TARGET_CPU.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1726
diff changeset
34 !else
2080
8f08d4c9d3fc Win: Visual Studio 2015 sets PLATFORM=x64 in 64bit intel mode so
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2079
diff changeset
35 TARGET_CPU=$(PLATFORM)
8f08d4c9d3fc Win: Visual Studio 2015 sets PLATFORM=x64 in 64bit intel mode so
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2079
diff changeset
36 !endif
8f08d4c9d3fc Win: Visual Studio 2015 sets PLATFORM=x64 in 64bit intel mode so
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2079
diff changeset
37 !else
1928
e07a1e176995 Try to get the target CPU from the Visual Studio environment, so you don't need to set TARGET_CPU.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1726
diff changeset
38 TARGET_CPU=$(VSCMD_ARG_TGT_ARCH)
e07a1e176995 Try to get the target CPU from the Visual Studio environment, so you don't need to set TARGET_CPU.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1726
diff changeset
39 !endif
750
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
40 !endif
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
41
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
42 !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
43 PLATFORM_DEF = -DWIN32
1113
a049f447999c Updated makefiles to 2.1 on Windows and OS/2 for packaging.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1030
diff changeset
44 PLATFORM_NAME = win32
750
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
45 !else
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
46 PLATFORM_DEF = -DWIN64
1113
a049f447999c Updated makefiles to 2.1 on Windows and OS/2 for packaging.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1030
diff changeset
47 PLATFORM_NAME = win64
750
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
48 !endif
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
49
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
50 #
e6a9f1c7b0d7 Changes to be smarter about source and destination directories with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 647
diff changeset
51 # 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
52 #
634
c6a216c8174f Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 631
diff changeset
53 !if "$(DEBUG)" == "Y"
1601
71e0a3ad07f7 Enable level 3 warnings in DEBUG mode with Visual C to show deprecation warnings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1595
diff changeset
54 # -D_CRT_SECURE_NO_WARNINGS disables unsafe string function warnings
71e0a3ad07f7 Enable level 3 warnings in DEBUG mode with Visual C to show deprecation warnings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1595
diff changeset
55 # These can be perfectly safe if used properly but get enabled by -W3
71e0a3ad07f7 Enable level 3 warnings in DEBUG mode with Visual C to show deprecation warnings.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1595
diff changeset
56 CFLAGS_DEBUG = -DDEBUG -Z7 -W3 -Od -MTd -D_CRT_SECURE_NO_WARNINGS # was -Zi
647
f09977bc9b5c Fixed building with Visual Studio 2008.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 643
diff changeset
57 LINK_DEBUG = -debug
634
c6a216c8174f Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 631
diff changeset
58 !else
772
b28ec71cfc88 Add -MT or -MTd switch to DEBUG switches
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 758
diff changeset
59 CFLAGS_DEBUG = -Ox -MT
634
c6a216c8174f Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 631
diff changeset
60 LINK_DEBUG = -release
c6a216c8174f Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 631
diff changeset
61 !endif
c6a216c8174f Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 631
diff changeset
62
1163
2991afb3bf71 Added support for including the svn revision number as the sub version with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1113
diff changeset
63 # Check the SVN revision number if possible
2991afb3bf71 Added support for including the svn revision number as the sub version with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1113
diff changeset
64 !if ![subwcrev . win\__SVN__.REV SVN.REV > NUL]
2991afb3bf71 Added support for including the svn revision number as the sub version with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1113
diff changeset
65 !include SVN.REV
2991afb3bf71 Added support for including the svn revision number as the sub version with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1113
diff changeset
66 !message Revision is [$(VERREV)]
2991afb3bf71 Added support for including the svn revision number as the sub version with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1113
diff changeset
67 SVNVERSION=-DVER_REV=$(VERREV)
1626
fdeeba6c6d09 Add support for mercurial revisions in addition to subversion on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1618
diff changeset
68 !else
fdeeba6c6d09 Add support for mercurial revisions in addition to subversion on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1618
diff changeset
69
fdeeba6c6d09 Add support for mercurial revisions in addition to subversion on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1618
diff changeset
70 # Check the Mercurial revision number if possible
fdeeba6c6d09 Add support for mercurial revisions in addition to subversion on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1618
diff changeset
71 !if ![hg log -r . --template="VER_REV={rev}" > HG.REV]
fdeeba6c6d09 Add support for mercurial revisions in addition to subversion on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1618
diff changeset
72 !include HG.REV
fdeeba6c6d09 Add support for mercurial revisions in addition to subversion on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1618
diff changeset
73 !message Revision is [$(VER_REV)]
fdeeba6c6d09 Add support for mercurial revisions in addition to subversion on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1618
diff changeset
74 SVNVERSION=-DVER_REV=$(VER_REV)
fdeeba6c6d09 Add support for mercurial revisions in addition to subversion on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1618
diff changeset
75 !endif
fdeeba6c6d09 Add support for mercurial revisions in addition to subversion on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1618
diff changeset
76
1163
2991afb3bf71 Added support for including the svn revision number as the sub version with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1113
diff changeset
77 !endif
2991afb3bf71 Added support for including the svn revision number as the sub version with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1113
diff changeset
78
2078
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
79 #
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
80 # Settings for supporting embedded Edge (Chromium) WebView2
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
81 #
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
82 !if "$(WEBVIEW2DIR)" == ""
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
83 WEBVIEW2DIR=$(SRCDIR)\packages\Microsoft.Web.WebView2
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
84 !endif
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
85
2082
3144912829e2 Minor build issues
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2080
diff changeset
86 !if exists($(WEBVIEW2DIR)\build\native\include\WebView2.h)
2078
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
87 WEBVIEW2INC=-DBUILD_EDGE -I$(WEBVIEW2DIR)\build\native\include
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
88 WEBVIEW2LIB=$(WEBVIEW2DIR)\build\native\$(TARGET_CPU)\WebView2Loader.dll.lib
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
89 WEBVIEW2OBJ=edge.obj
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
90 !endif
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
91
2088
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
92 #
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
93 # Settings for supporting WinToast notifications
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
94 #
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
95 !if "$(WINTOASTDIR)" == ""
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
96 WINTOASTDIR=$(SRCDIR)\packages\WinToast
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
97 !endif
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
98
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
99 !if exists($(WINTOASTDIR)\src\wintoastlib.h)
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
100 WINTOASTINC=-DBUILD_TOAST -I$(WINTOASTDIR)\src
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
101 WINTOASTOBJ=wintoast.obj wintoastlib.obj
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
102 !endif
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
103
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
104 CC = cl
2088
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
105 CFLAGS = -c $(PLATFORM_DEF) -D__WIN32__ -DMSVC -DTOOLBAR -DGDIPLUS -DAEROGLASS -D_UNICODE -DUNICODE -DBUILD_DLL -DISOLATION_AWARE_ENABLED=1 -I$(SRCDIR)\platform -I$(SRCDIR) $(WEBVIEW2INC) $(WINTOASTINC) $(SVNVERSION)
2078
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
106 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 gdiplus.lib $(WEBVIEW2LIB)
598
78a8c4123818 Specify library output filenames.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 584
diff changeset
107 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
108 LINKFLAGS = -machine:$(TARGET_CPU) -manifest $(LINK_DEBUG)
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
109 DLLLINKFLAGS = -dll
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
110 LINK = link
1360
32a5be18e187 Source tree cleanup, move import/export definition files to their platform folder.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1350
diff changeset
111 DEFFILE = $(SRCDIR)\win\dw.def
32a5be18e187 Source tree cleanup, move import/export definition files to their platform folder.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1350
diff changeset
112 DEFFILE2 = $(SRCDIR)\win\dwcompat.def
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
113
2088
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
114 OBJS = dw.obj browser.obj XBrowseForFolder.obj $(WEBVIEW2OBJ) $(WINTOASTOBJ)
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
115
1594
6baf177f335c Rename compat.c/h dwcompat.c/h and configure option to --with-dwcompat.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1535
diff changeset
116 OBJS2 = dwcompat.obj dirent.obj
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
117
381
0df4ad2ac083 Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 286
diff changeset
118 all: dw dwcompat dwtest
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
119
1163
2991afb3bf71 Added support for including the svn revision number as the sub version with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1113
diff changeset
120
2991afb3bf71 Added support for including the svn revision number as the sub version with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1113
diff changeset
121
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
122 clean:
2078
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
123 -erase *.dll
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
124 -erase *.exe
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
125 -erase *.opt
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
126 -erase *.lib
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
127 -erase *.obj
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
128 -erase *.map
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
129 -erase *.pdb
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
130 -erase *.ilk
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
131 -erase *.exp
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
132 -erase *.REV
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
133 -erase *~
598
78a8c4123818 Specify library output filenames.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 584
diff changeset
134
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
135 dw: dw.dll
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
136
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
137 dw.dll: $(OBJS) $(DEFFILE)
1163
2991afb3bf71 Added support for including the svn revision number as the sub version with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1113
diff changeset
138 -md $(DWLIBDIR)
2991afb3bf71 Added support for including the svn revision number as the sub version with Visual C.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1113
diff changeset
139 -md $(DWDLLDIR)
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
140 $(LINK) @<<
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
141 -out:$(@) -def:$(DEFFILE)
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
142 $(LINKFLAGS) $(DLLLINKFLAGS)
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
143 $(OBJS) $(RES)
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
144 $(LIBS)
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
145 <<
1932
bf34d9f9dabe Fix some warning while building with Visual C for Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1928
diff changeset
146 lib /def:$(DEFFILE) /machine:$(TARGET_CPU) /out:dw.lib
2082
3144912829e2 Minor build issues
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2080
diff changeset
147 mt.exe /manifest dw.dll.manifest $(SRCDIR)\win\dw.dll.$(TARGET_CPU).manifest /outputresource:dw.dll;2
1447
5417b312801e Add -DISOLATION_AWARE_ENABLED=1 to Visual C compile flags and delete temporary manifest files after build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1431
diff changeset
148 -erase dw.dll.manifest
2078
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
149 copy dw.lib $(DWLIBDIR)\dw.lib
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
150 copy dw.dll $(DWDLLDIR)\dw.dll
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
151
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
152 dwcompat: dwcompat.dll
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
153
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
154 dwcompat.dll: $(OBJS2) $(DEFFILE2)
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
155 $(LINK) @<<
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
156 -out:$(@) -def:$(DEFFILE2)
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
157 $(LINKFLAGS) $(DLLLINKFLAGS)
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
158 $(OBJS2) $(RES)
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
159 $(LIBS)
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
160 <<
1431
0676561865ac Better extra border values for bitmap buttons on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1360
diff changeset
161 lib /def:$(DEFFILE2) /machine:$(TARGET_CPU) /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
162 mt.exe /manifest dwcompat.dll.manifest /outputresource:dwcompat.dll;2
1447
5417b312801e Add -DISOLATION_AWARE_ENABLED=1 to Visual C compile flags and delete temporary manifest files after build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1431
diff changeset
163 -erase dwcompat.dll.manifest
2078
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
164 copy dwcompat.lib $(DWLIBDIR)\dwcompat.lib
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
165 copy dwcompat.dll $(DWDLLDIR)\dwcompat.dll
2082
3144912829e2 Minor build issues
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2080
diff changeset
166 !if exists($(WEBVIEW2DIR)\build\native\$(TARGET_CPU)\WebView2Loader.dll)
2079
f02266370e74 Win: Copy WebView2Loader.dll to the dll\ directory if building Edge support.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2078
diff changeset
167 copy $(WEBVIEW2DIR)\build\native\$(TARGET_CPU)\WebView2Loader.dll $(DWDLLDIR)\WebView2Loader.dll
f02266370e74 Win: Copy WebView2Loader.dll to the dll\ directory if building Edge support.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2078
diff changeset
168 !endif
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
169
381
0df4ad2ac083 Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 286
diff changeset
170 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
171 $(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
172
584
420c6c94abc7 Added dw_html_* functionality for embedding HTML pages in Dynamic Windows
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 381
diff changeset
173 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
174 $(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
175
631
fa6c46796883 Use better directory browser widget.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 598
diff changeset
176 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
177 $(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
178
2078
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
179 edge.obj: $(SRCDIR)\win\edge.cpp
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
180 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCDIR)\win\edge.cpp
2f98abf1e1e5 Win: Added support for building with Edge (Chromium) support via nmake.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1932
diff changeset
181
2088
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
182 wintoast.obj: $(SRCDIR)\win\wintoast.cpp
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
183 $(CC) $(CFLAGS) /EHsc $(CFLAGS_DEBUG) $(SRCDIR)\win\wintoast.cpp
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
184
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
185 wintoastlib.obj: $(WINTOASTDIR)\src\wintoastlib.cpp
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
186 $(CC) $(CFLAGS) /EHsc $(CFLAGS_DEBUG) $(WINTOASTDIR)\src\wintoastlib.cpp
94ea915bd917 Win: Initial implementation of notifications on Windows. Currently using WinToast.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2082
diff changeset
187
381
0df4ad2ac083 Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 286
diff changeset
188 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
189 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCDIR)\win\dirent.c
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
190
1594
6baf177f335c Rename compat.c/h dwcompat.c/h and configure option to --with-dwcompat.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1535
diff changeset
191 dwcompat.obj: $(SRCDIR)\dwcompat.c
6baf177f335c Rename compat.c/h dwcompat.c/h and configure option to --with-dwcompat.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1535
diff changeset
192 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCDIR)\dwcompat.c
3
ktk@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff changeset
193
381
0df4ad2ac083 Enable dwindows to be built from a directory other than where the
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 286
diff changeset
194 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
195 $(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
196
2082
3144912829e2 Minor build issues
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2080
diff changeset
197 winmain.obj: $(SRCDIR)\winmain.c
3144912829e2 Minor build issues
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2080
diff changeset
198 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCDIR)\winmain.c
3144912829e2 Minor build issues
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2080
diff changeset
199
286
e9270ff04ced Simple add dwtest as a target, dependent on dwtest.exe.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 191
diff changeset
200 dwtest: dwtest.exe
e9270ff04ced Simple add dwtest as a target, dependent on dwtest.exe.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 191
diff changeset
201
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
202 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
203 $(LINK) $(LINKFLAGS) /out:dwtest.exe dwtest.obj winmain.obj /subsystem:windows $(DWLIBDIR)\dwcompat.lib $(DWLIBDIR)\dw.lib $(LIBS)
2082
3144912829e2 Minor build issues
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 2080
diff changeset
204 mt.exe /manifest dwtest.exe.manifest $(SRCDIR)\win\dwtest.exe.$(TARGET_CPU).manifest /outputresource:dwtest.exe;1
1447
5417b312801e Add -DISOLATION_AWARE_ENABLED=1 to Visual C compile flags and delete temporary manifest files after build.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1431
diff changeset
205 -erase dwtest.exe.manifest
640
cd1f9f0bd7e1 Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 634
diff changeset
206
cd1f9f0bd7e1 Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 634
diff changeset
207 zip: dw.dll
cd1f9f0bd7e1 Support for building zip file on Win32
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents: 634
diff changeset
208 copy win\readme-win.txt .
1604
7eb2e2d6b0be OS/2 and Windows zip rules need to include dwcompat.h.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents: 1601
diff changeset
209 zip dwindows-$(PLATFORM_NAME)-$(VERDOT).zip readme-win.txt readme.txt dw.dll dwcompat.dll dw.lib dwcompat.lib dw.h dwcompat.h