Mercurial > dwindows
comparison makefile.vc @ 2778:1660b4ecb92f
Win/OS2: Remove the lib and dll folders and their placeholders.
Update the Windows makefile to create plaform folders automatically.
Package both x86 and x64 platforms into the zip.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 28 Jun 2022 00:53:47 +0000 |
parents | 4de830d3bf9e |
children | 939fbceec13f |
comparison
equal
deleted
inserted
replaced
2777:7d7eac751f7d | 2778:1660b4ecb92f |
---|---|
3 # | 3 # |
4 !include Version | 4 !include Version |
5 VER = $(DW_MAJOR_VERSION)$(DW_MINOR_VERSION) | 5 VER = $(DW_MAJOR_VERSION)$(DW_MINOR_VERSION) |
6 VERDOT = $(DW_MAJOR_VERSION).$(DW_MINOR_VERSION) | 6 VERDOT = $(DW_MAJOR_VERSION).$(DW_MINOR_VERSION) |
7 VERREV = 0 | 7 VERREV = 0 |
8 | |
9 # | |
10 # Setup the source and destination directories | |
11 # | |
12 !if "$(DWINDOWS_SRCDIR)" == "" | |
13 SRCDIR=. | |
14 !else | |
15 SRCDIR=$(DWINDOWS_SRCDIR) | |
16 !endif | |
17 | |
18 !if "$(DWLIBDIR)" == "" | |
19 DWLIBDIR=.\lib | |
20 !endif | |
21 | |
22 !if "$(DWDLLDIR)" == "" | |
23 DWDLLDIR=.\dll | |
24 !endif | |
25 | 8 |
26 # Configure alternate compiler based on Clang/LLVM | 9 # Configure alternate compiler based on Clang/LLVM |
27 !if "$(CLANG)" == "Y" | 10 !if "$(CLANG)" == "Y" |
28 WLIB=llvm-lib.exe | 11 WLIB=llvm-lib.exe |
29 CC=clang-cl.exe | 12 CC=clang-cl.exe |
48 !else | 31 !else |
49 TARGET_CPU=$(VSCMD_ARG_TGT_ARCH) | 32 TARGET_CPU=$(VSCMD_ARG_TGT_ARCH) |
50 !endif | 33 !endif |
51 !endif | 34 !endif |
52 | 35 |
36 # | |
37 # Setup the source and destination directories | |
38 # | |
39 !if "$(DWINDOWS_SRCDIR)" == "" | |
40 SRCDIR=. | |
41 !else | |
42 SRCDIR=$(DWINDOWS_SRCDIR) | |
43 !endif | |
44 | |
45 !if "$(DWLIBDIR)" == "" | |
46 DWLIBDIR=$(SRCDIR) | |
47 !endif | |
48 | |
53 !if "$(TARGET_CPU)" == "x86" | 49 !if "$(TARGET_CPU)" == "x86" |
54 PLATFORM_DEF = -DWIN32 | 50 PLATFORM_DEF = -DWIN32 |
55 PLATFORM_NAME = win32 | 51 PLATFORM_NAME = win32 |
56 !else | 52 !else |
57 PLATFORM_DEF = -DWIN64 | 53 PLATFORM_DEF = -DWIN64 |
73 !if ![subwcrev . win\__SVN__.REV SVN.REV > NUL] | 69 !if ![subwcrev . win\__SVN__.REV SVN.REV > NUL] |
74 !include SVN.REV | 70 !include SVN.REV |
75 !message Revision is [$(VERREV)] | 71 !message Revision is [$(VERREV)] |
76 SVNVERSION=-DVER_REV=$(VERREV) | 72 SVNVERSION=-DVER_REV=$(VERREV) |
77 !else | 73 !else |
78 | |
79 # Check the Mercurial revision number if possible | 74 # Check the Mercurial revision number if possible |
80 !if ![hg log -r . --template="VER_REV={rev}" > HG.REV] | 75 !if ![hg log -r . --template="VER_REV={rev}" > HG.REV] |
81 !include HG.REV | 76 !include HG.REV |
82 !message Revision is [$(VER_REV)] | 77 !message Revision is [$(VER_REV)] |
83 SVNVERSION=-DVER_REV=$(VER_REV) | 78 SVNVERSION=-DVER_REV=$(VER_REV) |
84 !endif | 79 !endif |
85 | |
86 !endif | 80 !endif |
87 | 81 |
88 # | 82 # |
89 # Settings for supporting embedded Edge (Chromium) WebView2 | 83 # Settings for supporting embedded Edge (Chromium) WebView2 |
90 # | 84 # |
131 | 125 |
132 OBJS2 = dwcompat.obj dirent.obj | 126 OBJS2 = dwcompat.obj dirent.obj |
133 | 127 |
134 all: dw dwcompat dwtest | 128 all: dw dwcompat dwtest |
135 | 129 |
136 | |
137 | |
138 clean: | 130 clean: |
139 -erase *.dll | 131 -erase *.dll |
140 -erase *.exe | 132 -erase *.exe |
141 -erase *.opt | 133 -erase *.opt |
142 -erase *.lib | 134 -erase *.lib |
143 -erase *.obj | 135 -erase *.obj |
136 -erase *.o | |
144 -erase *.map | 137 -erase *.map |
145 -erase *.pdb | 138 -erase *.pdb |
146 -erase *.ilk | 139 -erase *.ilk |
147 -erase *.exp | 140 -erase *.exp |
148 -erase *.REV | 141 -erase *.REV |
149 -erase *~ | 142 -erase *~ |
150 | 143 |
144 distclean: clean | |
145 -rd /s /q $(DWLIBDIR)\x86 | |
146 -rd /s /q $(DWLIBDIR)\x64 | |
147 -erase readme-win.txt | |
148 | |
151 dw: dw.dll | 149 dw: dw.dll |
152 | 150 |
153 dw.dll: $(OBJS) $(DEFFILE) | 151 dw.dll: $(OBJS) $(DEFFILE) |
154 -md $(DWLIBDIR) | |
155 -md $(DWDLLDIR) | |
156 $(LINK) @<< | 152 $(LINK) @<< |
157 -out:$(@) -def:$(DEFFILE) | 153 -out:$(@) -def:$(DEFFILE) |
158 $(LINKFLAGS) $(DLLLINKFLAGS) | 154 $(LINKFLAGS) $(DLLLINKFLAGS) |
159 $(OBJS) $(RES) | 155 $(OBJS) $(RES) |
160 $(LIBS) | 156 $(LIBS) |
161 << | 157 << |
162 $(WLIB) -def:$(DEFFILE) -machine:$(TARGET_CPU) -out:dw.lib | 158 $(WLIB) -def:$(DEFFILE) -machine:$(TARGET_CPU) -out:dw.lib |
163 mt.exe -manifest dw.dll.manifest $(SRCDIR)\win\dw.dll.$(TARGET_CPU).manifest -outputresource:dw.dll;2 | 159 mt.exe -manifest dw.dll.manifest $(SRCDIR)\win\dw.dll.$(TARGET_CPU).manifest -outputresource:dw.dll;2 |
164 -erase dw.dll.manifest | 160 -erase dw.dll.manifest |
165 copy dw.lib $(DWLIBDIR)\dw.lib | 161 -md $(DWLIBDIR)\$(TARGET_CPU) |
166 copy dw.dll $(DWDLLDIR)\dw.dll | 162 copy dw.lib $(DWLIBDIR)\$(TARGET_CPU)\dw.lib |
163 copy dw.dll $(DWLIBDIR)\$(TARGET_CPU)\dw.dll | |
164 !if exists($(WEBVIEW2LOADER)) | |
165 copy $(WEBVIEW2LOADER) $(DWLIBDIR)\$(TARGET_CPU)\WebView2Loader.dll | |
166 !endif | |
167 | 167 |
168 dwcompat: dwcompat.dll | 168 dwcompat: dwcompat.dll |
169 | 169 |
170 dwcompat.dll: $(OBJS2) $(DEFFILE2) | 170 dwcompat.dll: $(OBJS2) $(DEFFILE2) |
171 $(LINK) @<< | 171 $(LINK) @<< |
175 $(LIBS) | 175 $(LIBS) |
176 << | 176 << |
177 $(WLIB) -def:$(DEFFILE2) -machine:$(TARGET_CPU) -out:dwcompat.lib | 177 $(WLIB) -def:$(DEFFILE2) -machine:$(TARGET_CPU) -out:dwcompat.lib |
178 mt.exe -manifest dwcompat.dll.manifest -outputresource:dwcompat.dll;2 | 178 mt.exe -manifest dwcompat.dll.manifest -outputresource:dwcompat.dll;2 |
179 -erase dwcompat.dll.manifest | 179 -erase dwcompat.dll.manifest |
180 copy dwcompat.lib $(DWLIBDIR)\dwcompat.lib | 180 -md $(DWLIBDIR)\$(TARGET_CPU) |
181 copy dwcompat.dll $(DWDLLDIR)\dwcompat.dll | 181 copy dwcompat.lib $(DWLIBDIR)\$(TARGET_CPU)\dwcompat.lib |
182 !if exists($(WEBVIEW2LOADER)) | 182 copy dwcompat.dll $(DWLIBDIR)\$(TARGET_CPU)\dwcompat.dll |
183 copy $(WEBVIEW2LOADER) $(DWDLLDIR)\WebView2Loader.dll | |
184 !endif | |
185 | 183 |
186 dw.obj: $(SRCDIR)\win\dw.c | 184 dw.obj: $(SRCDIR)\win\dw.c |
187 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCDIR)\win\dw.c | 185 $(CC) $(CFLAGS) $(CFLAGS_DEBUG) $(SRCDIR)\win\dw.c |
188 | 186 |
189 browser.obj: $(SRCDIR)\win\browser.c | 187 browser.obj: $(SRCDIR)\win\browser.c |
217 mt.exe /manifest dwtest.exe.manifest $(SRCDIR)\win\dwtest.exe.$(TARGET_CPU).manifest /outputresource:dwtest.exe;1 | 215 mt.exe /manifest dwtest.exe.manifest $(SRCDIR)\win\dwtest.exe.$(TARGET_CPU).manifest /outputresource:dwtest.exe;1 |
218 -erase dwtest.exe.manifest | 216 -erase dwtest.exe.manifest |
219 | 217 |
220 zip: dw.dll | 218 zip: dw.dll |
221 copy win\readme-win.txt . | 219 copy win\readme-win.txt . |
222 zip dwindows-$(PLATFORM_NAME)-$(VERDOT).zip readme-win.txt readme.txt dw.dll dwcompat.dll dw.lib dwcompat.lib dw.h dwcompat.h | 220 zip dwindows-win-$(VERDOT).zip readme-win.txt readme.txt x64\dw.dll x64\dwcompat.dll x64\dw.lib x64\dwcompat.lib x86\dw.dll x86\dwcompat.dll x86\dw.lib x86\dwcompat.lib dw.h dwcompat.h |