]>
Commit | Line | Data |
---|---|---|
227869da | 1 | # |
af111fc3 | 2 | # File: makevc.env |
227869da JS |
3 | # Author: Ulrich Leodolter |
4 | # Created: Wed May 17 08:36:42 1995 | |
5 | # Updated: | |
6 | # | |
7 | # MSVC++ 32-bit makefile include file | |
8 | # | |
9 | !include <ntwin32.mak> | |
10 | ||
0580ae4b GT |
11 | !if "$(RM)" == "" |
12 | RM= erase | |
13 | !endif | |
14 | ||
ff064200 | 15 | WXVERSION=233 |
227869da JS |
16 | WIN95=1 |
17 | ||
18 | !if "$(WIN95)" == "0" | |
19 | # With 3.50, Win95 will use your existing icons to show smaller ones. | |
20 | # With 4.0, you'll have to follow Win95 procedures for icons or you'll get the | |
21 | # default Windows icon. | |
22 | APPVER=3.50 | |
23 | WINVERSION=-DWINVER=0x0350 # Generic WIN32 | |
24 | !else | |
25 | APPVER=3.50 # 4.0 | |
26 | # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0). | |
27 | WINVERSION=-DWINVER=0x0400 /D__WIN95__ | |
28 | !endif | |
29 | ||
30 | # On Alpha machines, change to CPU=ALPHA | |
31 | CPU=i386 | |
32 | ||
33 | # Suffixes | |
34 | OBJSUFF=obj | |
35 | SRCSUFF=cpp | |
36 | ||
e12f91dc RD |
37 | WAITFLAG=/w |
38 | ||
227869da | 39 | # If you set wxUSE_IOSTREAMH to 0, remove -Dtry=__try -Dexcept=__except -Dleave=__leave -Dfinally=__finally |
4de85398 GT |
40 | #WINFLAGS=-c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 -DWIN32 -D__WIN32__ $(WINVERSION) -DSTRICT |
41 | WINFLAGS=-c -W3 -nologo -DWIN32 -D__WIN32__ -D_WINDOWS $(WINVERSION) -DSTRICT | |
227869da | 42 | WINLINKFLAGS=/INCREMENTAL:NO /NOLOGO -machine:$(CPU) -subsystem:windows,$(APPVER) |
0548ca8d | 43 | BASELINKFLAGS=/INCREMENTAL:NO /NOLOGO -machine:$(CPU) -subsystem:console,$(APPVER) |
227869da | 44 | WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib oldnames.lib\ |
7921cf2b | 45 | comctl32.lib ctl3d32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib # libci.lib # libci.lib required for VC++ 4.2 |
227869da | 46 | |
b4d1ebf0 RD |
47 | # Set a WXWIN environment variable be the path to your WXWIN directory |
48 | WXDIR=$(WXWIN) | |
227869da JS |
49 | |
50 | WXSRC=$(WXDIR)\src\msw | |
51 | WXINC=$(WXDIR)\include | |
52 | WXBASESRC=$(WXDIR)\src\common | |
53 | ||
54 | ##################################################################### | |
55 | # These are the possible DLL/non-DLL usages: | |
56 | # | |
57 | # Type _DLL/_WINDLL WXUSINGDLL WXMAKINGDLL Library | |
58 | #-------------------------------------------------------------------- | |
59 | # Normal application - - - wx.lib | |
60 | # | |
cb1b6606 | 61 | # wxWin as DLL Defined - Defined wx$(WXVERSION).lib |
227869da | 62 | # |
cb1b6606 | 63 | # App using wxWin DLL - Defined - wx$(WXVERSION).lib |
227869da JS |
64 | # |
65 | # App built as one DLL Defined - - wx.lib | |
66 | # | |
67 | ###################################################################### | |
68 | # | |
69 | # Compiling your app: | |
70 | #-------------------- | |
71 | # when compiling an app to use the DLL version of wxWindows | |
72 | # (but not to be a DLL itself), set WXUSINGDLL to 1 in your | |
73 | # makefile just before including ntwxwin.mak. | |
74 | # To compile wxWin _and_ app itself as a DLL, set DLL to 1 | |
75 | # in ntwxwin.mak, and do not set WXUSINGDLL. | |
76 | # | |
77 | # Compiling wxWindows: | |
78 | #--------------------- | |
79 | # Use the dll target to compile wxWindows as DLL; then make 'pch' | |
80 | # to generate a precompiled header for your apps to use. BUG: must compile without | |
81 | # wxExpr (USE_WX_RESOURCES = 0) for this to link properly. Don't know why yet. | |
82 | # Use the dllapp target to compile wxWindows for making a DLL app (not implemented yet) | |
83 | ||
84 | #DLL=0 | |
85 | ||
227869da JS |
86 | !if "$(WXUSINGDLL)" == "1" |
87 | EXTRADLLFLAGS=/DWXUSINGDLL=1 | |
88 | !endif | |
89 | ||
90 | !if "$(WXMAKINGDLL)" == "1" | |
91 | EXTRADLLFLAGS=/DWXMAKINGDLL=1 | |
92 | !endif | |
93 | ||
94 | !if "$(WXMAKINGDLL)" == "0" && "$(DLL)" == "1" | |
95 | EXTRADLLFLAGS= | |
96 | !endif | |
97 | ||
98 | !if "$(NOMAIN)" == "1" | |
99 | EXTRADLLFLAGS=$(EXTRADLLFLAGS) /DNOMAIN | |
100 | !endif | |
101 | ||
b3bd664a MB |
102 | !ifndef UNICODE |
103 | UNICODE=0 | |
104 | !endif | |
105 | ||
2417bf69 RD |
106 | !ifndef MSLU |
107 | MSLU=0 | |
108 | !endif | |
109 | ||
227869da JS |
110 | !ifndef FINAL |
111 | FINAL=0 | |
112 | DEBUG=1 | |
113 | !endif | |
114 | ||
115 | !ifndef DLL | |
116 | DLL=0 | |
117 | !endif | |
118 | ||
119 | # Set this to 1 if you don't want to use precompiled headers | |
120 | !ifndef NOPCH | |
121 | NOPCH=0 | |
122 | !endif | |
123 | ||
ca5c8b2d | 124 | # This sets 'D' to a suitable directory name |
5fa399c9 JS |
125 | # for this kind of build, and WXLIBNAME to one of wx (static release), wxd (static debug), |
126 | # wx$(WXVERSION) (DLL release), wx$(WXVERSION)d (DLL debug) | |
ca5c8b2d JS |
127 | |
128 | !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1" | |
b3bd664a | 129 | WXLIBNAME=wxmsw$(WXVERSION) |
ca5c8b2d | 130 | !else |
b3bd664a | 131 | WXLIBNAME=wxmsw |
ca5c8b2d JS |
132 | !endif |
133 | ||
a4fe6524 RD |
134 | !if "$(NEW_WXLIBNAME)" != "" |
135 | WXLIBNAME=$(NEW_WXLIBNAME) | |
136 | !endif | |
137 | ||
b3bd664a MB |
138 | !if "$(UNICODE)" == "1" |
139 | UNIEXT=u | |
140 | WXLIBNAME=$(WXLIBNAME)$(UNIEXT) | |
141 | !endif | |
142 | ||
ca5c8b2d JS |
143 | !if "$(FINAL)" == "1" |
144 | D=Release | |
f641dada RD |
145 | !else if "$(FINAL)" == "hybrid" |
146 | D=Hybrid | |
147 | LIBEXT=h | |
148 | WXLIBNAME=$(WXLIBNAME)$(LIBEXT) | |
ca5c8b2d | 149 | !else |
f6bcfd97 | 150 | guilibsdll= oldnames.lib kernel32.lib \ |
fbdcff4a JS |
151 | ws2_32.lib mswsock.lib advapi32.lib user32.lib \ |
152 | gdi32.lib comdlg32.lib winspool.lib | |
ca5c8b2d | 153 | D=Debug |
5fa399c9 | 154 | LIBEXT=d |
cb1b6606 | 155 | WXLIBNAME=$(WXLIBNAME)$(LIBEXT) |
ca5c8b2d JS |
156 | !endif |
157 | ||
0548ca8d GT |
158 | !if "$(wxUSE_GUI)" == "0" |
159 | WXLIBNAME=wxBase | |
160 | D=Base$(D) | |
b3bd664a MB |
161 | WXLIBNAME=$(WXLIBNAME)$(UNIEXT)$(LIBEXT) |
162 | !endif | |
163 | ||
164 | !if "$(UNICODE)" == "1" | |
165 | D=$(D)Unicode | |
0548ca8d GT |
166 | !endif |
167 | ||
b3bd664a MB |
168 | INCEXT=$(UNIEXT)$(LIBEXT) |
169 | ||
ca5c8b2d JS |
170 | !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1" |
171 | D=$(D)DLL | |
b3bd664a | 172 | INCEXT=dll$(INCEXT) |
ca5c8b2d JS |
173 | !endif |
174 | ||
2417bf69 RD |
175 | #---------------------------------------------------------------------- |
176 | # MSLU == Microsoft Layer for Unicode | |
177 | # See MSDN or the Platform SDK docs for details | |
178 | !if "$(MSLU)" == "1" | |
179 | MSLU_FLAGS=/nod:kernel32.lib /nod:advapi32.lib /nod:user32.lib /nod:gdi32.lib /nod:shell32.lib /nod:comdlg32.lib /nod:version.lib /nod:mpr.lib /nod:rasapi32.lib /nod:winmm.lib /nod:winspool.lib /nod:vfw32.lib /nod:secur32.lib /nod:oleacc.lib /nod:oledlg.lib /nod:sensapi.lib | |
180 | MSLU_LIBS=$(MSLU_FLAGS) unicows.lib | |
181 | !endif | |
182 | ||
ca5c8b2d JS |
183 | WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib |
184 | ||
b311dc08 GT |
185 | !if "$(wxUSE_GUI)" == "0" |
186 | INCTEMP=$(EXTRAINC) -I$(WXDIR)/lib/base$(INCEXT) | |
187 | !else | |
188 | INCTEMP=$(EXTRAINC) -I$(WXDIR)/lib/msw$(INCEXT) | |
189 | !endif | |
190 | ||
191 | INC=$(INCTEMP) -I$(WXINC) -I$(WXDIR)/contrib/include -I$(WXDIR)/src/regex -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/tiff | |
4567f2b2 | 192 | |
0548ca8d | 193 | !if "$(WXUSINGDLL)" == "1" || "$(wxUSE_GUI)" == "0" |
2417bf69 | 194 | LIBS = $(MSLU_LIBS) $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\regex$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib |
4567f2b2 | 195 | !else |
2417bf69 | 196 | LIBS = $(MSLU_LIBS) $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\regex$(LIBEXT).lib $(WXDIR)\lib\png$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib $(WXDIR)\lib\jpeg$(LIBEXT).lib $(WXDIR)\lib\tiff$(LIBEXT).lib |
4567f2b2 | 197 | !endif |
ca5c8b2d | 198 | |
227869da JS |
199 | MAKEPRECOMP=/YcWX/WXPREC.H |
200 | OPTIONS= | |
201 | ||
202 | !if "$(FINAL)" == "0" | |
203 | OPT = /Od /Gy | |
204 | # ***N.B.*** to save space/time, comment out /FR to avoid browse info (.sbr files) being generated | |
205 | DEBUG_FLAGS= /Zi /D__WXDEBUG__ # /DDEBUG=1 # /FR | |
206 | LINK_DEBUG_FLAGS=-debug:full -debugtype:cv # /PDB:NONE | |
7bf54362 | 207 | _CRTFLAG=/MDd |
f641dada RD |
208 | |
209 | !else if "$(FINAL)" == "hybrid" | |
210 | OPT = /Od /Gy | |
211 | DEBUG_FLAGS= /Zi /D__WXDEBUG__ /D__NO_VC_CRTDBG__ | |
212 | LINK_DEBUG_FLAGS=-debug:full -debugtype:cv | |
213 | _CRTFLAG=/MD | |
214 | ||
227869da JS |
215 | !else |
216 | # /O1 - smallest code | |
217 | # /O2 - fastest code | |
218 | OPT = /O1 # /O2 # /Od | |
219 | DEBUG_FLAGS= | |
220 | LINK_DEBUG_FLAGS=/RELEASE | |
7bf54362 RD |
221 | _CRTFLAG=/MD |
222 | !endif | |
223 | ||
f641dada | 224 | |
7bf54362 RD |
225 | !if "$(CRTFLAG)" == "" |
226 | CRTFLAG=$(_CRTFLAG) | |
227869da JS |
227 | !endif |
228 | ||
229 | !if "$(DLL)" == "0" | |
230 | ||
231 | !if "$(NOPCH)" == "1" | |
232 | PCH= | |
233 | PRECOMP= | |
234 | MAKEPRECOMP= | |
235 | !else | |
014e19de | 236 | |
0548ca8d GT |
237 | !if "$(wxUSE_GUI)" == "0" |
238 | PCH=wxBase.pch | |
239 | !else | |
3a7bfa06 | 240 | PCH=wxWindows.pch |
0548ca8d | 241 | !endif |
014e19de | 242 | |
3a7bfa06 | 243 | PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\$D\$(PCH) /Fd$(WXDIR)\$D\vc60.pdb |
227869da JS |
244 | MAKEPRECOMP=/YcWX/WXPREC.H |
245 | !endif | |
246 | ||
014e19de | 247 | |
0548ca8d | 248 | |
3a7bfa06 | 249 | CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX- $(OVERRIDEFLAGS) |
227869da | 250 | # If you don't include wxprec.h, use CPPFLAGS2 |
3a7bfa06 | 251 | CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX- $(OVERRIDEFLAGS) |
0548ca8d GT |
252 | !if "$(wxUSE_GUI)" == "0" |
253 | LINKFLAGS=$(LINK_DEBUG_FLAGS) $(BASELINKFLAGS) | |
254 | !else | |
227869da | 255 | LINKFLAGS=$(LINK_DEBUG_FLAGS) $(WINLINKFLAGS) -entry:WinMainCRTStartup |
0548ca8d | 256 | !endif |
227869da JS |
257 | DUMMY=dummy |
258 | ||
259 | !else | |
260 | ||
261 | !if "$(WXMAKINGDLL)" == "1" | |
3a7bfa06 | 262 | PCH=wxWindows.pch |
227869da JS |
263 | DUMMY=dummydll |
264 | !else | |
3a7bfa06 | 265 | PCH=wxWindows.pch |
227869da JS |
266 | DUMMY=dummy |
267 | !endif | |
268 | ||
3a7bfa06 | 269 | PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\$D\$(PCH) /Fd$(WXDIR)\lib\$(WXLIBNAME).pdb |
227869da JS |
270 | CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL |
271 | CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL | |
272 | LINKFLAGS=$(LINK_DEBUG_FLAGS) -machine:i386 -subsystem:windows,$(APPVER) -dll # -entry:_DllMainCRTStartup$(DLLENTRY) | |
273 | !endif | |
274 | ||
3a7bfa06 | 275 | DUMMYOBJ=$(WXDIR)\$D\$(DUMMY).obj |
227869da | 276 | |
e9c4b1a2 JS |
277 | .c.obj: |
278 | cl @<< | |
279 | $(CPPFLAGS2) /Fo$@ /c $< | |
280 | << | |
281 | ||
282 | .cpp.obj: | |
283 | cl @<< | |
284 | $(CPPFLAGS2) /Fo$@ /c $< | |
285 | << | |
286 | ||
0580ae4b GT |
287 | #use CPPFLAGS2 so as not to use precompiled headers |
288 | {}.c{$D}.obj: | |
289 | cl @<< | |
290 | $(CPPFLAGS2) /Fo$@ /c $< | |
291 | << | |
292 | ||
df801fc6 JS |
293 | {}.cpp{$D}.obj: |
294 | cl @<< | |
295 | $(CPPFLAGS) /Fo$@ /c /Tp $< | |
296 | << | |
297 |