]> git.saurik.com Git - wxWidgets.git/blob - src/makevc.env
Fixed compilation error.
[wxWidgets.git] / src / makevc.env
1 #
2 # File: makevc.env
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
11 !if "$(RM)" == ""
12 RM= erase
13 !endif
14
15 WXVERSION=233
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
37 WAITFLAG=/w
38
39 # If you set wxUSE_IOSTREAMH to 0, remove -Dtry=__try -Dexcept=__except -Dleave=__leave -Dfinally=__finally
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
42 WINLINKFLAGS=/INCREMENTAL:NO /NOLOGO -machine:$(CPU) -subsystem:windows,$(APPVER)
43 BASELINKFLAGS=/INCREMENTAL:NO /NOLOGO -machine:$(CPU) -subsystem:console,$(APPVER)
44 WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib oldnames.lib\
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
46
47 # Set a WXWIN environment variable be the path to your WXWIN directory
48 WXDIR=$(WXWIN)
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 #
61 # wxWin as DLL Defined - Defined wx$(WXVERSION).lib
62 #
63 # App using wxWin DLL - Defined - wx$(WXVERSION).lib
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
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
102 !ifndef UNICODE
103 UNICODE=0
104 !endif
105
106 !ifndef FINAL
107 FINAL=0
108 DEBUG=1
109 !endif
110
111 !ifndef DLL
112 DLL=0
113 !endif
114
115 # Set this to 1 if you don't want to use precompiled headers
116 !ifndef NOPCH
117 NOPCH=0
118 !endif
119
120 # This sets 'D' to a suitable directory name
121 # for this kind of build, and WXLIBNAME to one of wx (static release), wxd (static debug),
122 # wx$(WXVERSION) (DLL release), wx$(WXVERSION)d (DLL debug)
123
124 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
125 WXLIBNAME=wxmsw$(WXVERSION)
126 !else
127 WXLIBNAME=wxmsw
128 !endif
129
130 !if "$(NEW_WXLIBNAME)" != ""
131 WXLIBNAME=$(NEW_WXLIBNAME)
132 !endif
133
134 !if "$(UNICODE)" == "1"
135 UNIEXT=u
136 WXLIBNAME=$(WXLIBNAME)$(UNIEXT)
137 !endif
138
139 !if "$(FINAL)" == "1"
140 D=Release
141 !else if "$(FINAL)" == "hybrid"
142 D=Hybrid
143 LIBEXT=h
144 WXLIBNAME=$(WXLIBNAME)$(LIBEXT)
145 !else
146 guilibsdll= oldnames.lib kernel32.lib \
147 ws2_32.lib mswsock.lib advapi32.lib user32.lib \
148 gdi32.lib comdlg32.lib winspool.lib
149 D=Debug
150 LIBEXT=d
151 WXLIBNAME=$(WXLIBNAME)$(LIBEXT)
152 !endif
153
154 !if "$(wxUSE_GUI)" == "0"
155 WXLIBNAME=wxBase
156 D=Base$(D)
157 WXLIBNAME=$(WXLIBNAME)$(UNIEXT)$(LIBEXT)
158 !endif
159
160 !if "$(UNICODE)" == "1"
161 D=$(D)Unicode
162 !endif
163
164 INCEXT=$(UNIEXT)$(LIBEXT)
165
166 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
167 D=$(D)DLL
168 INCEXT=dll$(INCEXT)
169 !endif
170
171 WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib
172
173 !if "$(wxUSE_GUI)" == "0"
174 INCTEMP=$(EXTRAINC) -I$(WXDIR)/lib/base$(INCEXT)
175 !else
176 INCTEMP=$(EXTRAINC) -I$(WXDIR)/lib/msw$(INCEXT)
177 !endif
178
179 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
180
181 !if "$(WXUSINGDLL)" == "1" || "$(wxUSE_GUI)" == "0"
182 LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\regex$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib
183 !else
184 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
185 !endif
186
187 MAKEPRECOMP=/YcWX/WXPREC.H
188 OPTIONS=
189
190 !if "$(FINAL)" == "0"
191 OPT = /Od /Gy
192 # ***N.B.*** to save space/time, comment out /FR to avoid browse info (.sbr files) being generated
193 DEBUG_FLAGS= /Zi /D__WXDEBUG__ # /DDEBUG=1 # /FR
194 LINK_DEBUG_FLAGS=-debug:full -debugtype:cv # /PDB:NONE
195 _CRTFLAG=/MDd
196
197 !else if "$(FINAL)" == "hybrid"
198 OPT = /Od /Gy
199 DEBUG_FLAGS= /Zi /D__WXDEBUG__ /D__NO_VC_CRTDBG__
200 LINK_DEBUG_FLAGS=-debug:full -debugtype:cv
201 _CRTFLAG=/MD
202
203 !else
204 # /O1 - smallest code
205 # /O2 - fastest code
206 OPT = /O1 # /O2 # /Od
207 DEBUG_FLAGS=
208 LINK_DEBUG_FLAGS=/RELEASE
209 _CRTFLAG=/MD
210 !endif
211
212
213 !if "$(CRTFLAG)" == ""
214 CRTFLAG=$(_CRTFLAG)
215 !endif
216
217 !if "$(DLL)" == "0"
218
219 !if "$(NOPCH)" == "1"
220 PCH=
221 PRECOMP=
222 MAKEPRECOMP=
223 !else
224
225 !if "$(wxUSE_GUI)" == "0"
226 PCH=wxBase.pch
227 !else
228 PCH=wxWindows.pch
229 !endif
230
231 PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\$D\$(PCH) /Fd$(WXDIR)\$D\vc60.pdb
232 MAKEPRECOMP=/YcWX/WXPREC.H
233 !endif
234
235
236
237 CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX- $(OVERRIDEFLAGS)
238 # If you don't include wxprec.h, use CPPFLAGS2
239 CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX- $(OVERRIDEFLAGS)
240 !if "$(wxUSE_GUI)" == "0"
241 LINKFLAGS=$(LINK_DEBUG_FLAGS) $(BASELINKFLAGS)
242 !else
243 LINKFLAGS=$(LINK_DEBUG_FLAGS) $(WINLINKFLAGS) -entry:WinMainCRTStartup
244 !endif
245 DUMMY=dummy
246
247 !else
248
249 !if "$(WXMAKINGDLL)" == "1"
250 PCH=wxWindows.pch
251 DUMMY=dummydll
252 !else
253 PCH=wxWindows.pch
254 DUMMY=dummy
255 !endif
256
257 PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\$D\$(PCH) /Fd$(WXDIR)\lib\$(WXLIBNAME).pdb
258 CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL
259 CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL
260 LINKFLAGS=$(LINK_DEBUG_FLAGS) -machine:i386 -subsystem:windows,$(APPVER) -dll # -entry:_DllMainCRTStartup$(DLLENTRY)
261 !endif
262
263 DUMMYOBJ=$(WXDIR)\$D\$(DUMMY).obj
264
265 .c.obj:
266 cl @<<
267 $(CPPFLAGS2) /Fo$@ /c $<
268 <<
269
270 .cpp.obj:
271 cl @<<
272 $(CPPFLAGS2) /Fo$@ /c $<
273 <<
274
275 #use CPPFLAGS2 so as not to use precompiled headers
276 {}.c{$D}.obj:
277 cl @<<
278 $(CPPFLAGS2) /Fo$@ /c $<
279 <<
280
281 {}.cpp{$D}.obj:
282 cl @<<
283 $(CPPFLAGS) /Fo$@ /c /Tp $<
284 <<
285