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