]> git.saurik.com Git - wxWidgets.git/blame - src/makevc.env
1. added range checks in wxGridStringTable
[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
0ad07724 11WXVERSION=21_14
227869da
JS
12WIN95=1
13
14!if "$(WIN95)" == "0"
15# With 3.50, Win95 will use your existing icons to show smaller ones.
16# With 4.0, you'll have to follow Win95 procedures for icons or you'll get the
17# default Windows icon.
18APPVER=3.50
19WINVERSION=-DWINVER=0x0350 # Generic WIN32
20!else
21APPVER=3.50 # 4.0
22# This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0).
23WINVERSION=-DWINVER=0x0400 /D__WIN95__
24!endif
25
26# On Alpha machines, change to CPU=ALPHA
27CPU=i386
28
29# Suffixes
30OBJSUFF=obj
31SRCSUFF=cpp
32
e12f91dc
RD
33WAITFLAG=/w
34
227869da 35# If you set wxUSE_IOSTREAMH to 0, remove -Dtry=__try -Dexcept=__except -Dleave=__leave -Dfinally=__finally
0492c5a0
JS
36#WINFLAGS=-c -W3 -Dtry=__try -Dexcept=__except -Dleave=__leave -Dfinally=__finally -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 -DWIN32 -D__WIN32__ $(WINVERSION)
37WINFLAGS=-c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 -DWIN32 -D__WIN32__ $(WINVERSION)
227869da
JS
38#WINLINKFLAGS=/NODEFAULTLIB /INCREMENTAL:NO /NOLOGO -align:0x1000 -machine:$(CPU) -subsystem:windows,$(APPVER)
39WINLINKFLAGS=/INCREMENTAL:NO /NOLOGO -machine:$(CPU) -subsystem:windows,$(APPVER)
40#WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib libc.lib oldnames.lib\
41# comctl32.lib ctl3d32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib # libci.lib # libci.lib required for VC++ 4.2
0ad07724 42
227869da 43WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib oldnames.lib\
7921cf2b 44 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 45
0ad07724
RD
46##WINLIBS=kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib \
47## comctl32.lib ole32.lib oleaut32.lib rpcrt4.lib winmm.lib
48
49#winspool.lib winmm.lib shell32.lib oldnames.lib\
50# ctl3d32.lib odbc32.lib uuid.lib rpcrt4.lib # libci.lib # libci.lib required for VC++ 4.2
51
52
b4d1ebf0
RD
53# Set a WXWIN environment variable be the path to your WXWIN directory
54WXDIR=$(WXWIN)
227869da
JS
55
56WXSRC=$(WXDIR)\src\msw
57WXINC=$(WXDIR)\include
58WXBASESRC=$(WXDIR)\src\common
59
60#####################################################################
61# These are the possible DLL/non-DLL usages:
62#
63# Type _DLL/_WINDLL WXUSINGDLL WXMAKINGDLL Library
64#--------------------------------------------------------------------
65# Normal application - - - wx.lib
66#
cb1b6606 67# wxWin as DLL Defined - Defined wx$(WXVERSION).lib
227869da 68#
cb1b6606 69# App using wxWin DLL - Defined - wx$(WXVERSION).lib
227869da
JS
70#
71# App built as one DLL Defined - - wx.lib
72#
73######################################################################
74#
75# Compiling your app:
76#--------------------
77# when compiling an app to use the DLL version of wxWindows
78# (but not to be a DLL itself), set WXUSINGDLL to 1 in your
79# makefile just before including ntwxwin.mak.
80# To compile wxWin _and_ app itself as a DLL, set DLL to 1
81# in ntwxwin.mak, and do not set WXUSINGDLL.
82#
83# Compiling wxWindows:
84#---------------------
85# Use the dll target to compile wxWindows as DLL; then make 'pch'
86# to generate a precompiled header for your apps to use. BUG: must compile without
87# wxExpr (USE_WX_RESOURCES = 0) for this to link properly. Don't know why yet.
88# Use the dllapp target to compile wxWindows for making a DLL app (not implemented yet)
89
90#DLL=0
91
227869da
JS
92!if "$(WXUSINGDLL)" == "1"
93EXTRADLLFLAGS=/DWXUSINGDLL=1
94!endif
95
96!if "$(WXMAKINGDLL)" == "1"
97EXTRADLLFLAGS=/DWXMAKINGDLL=1
98!endif
99
100!if "$(WXMAKINGDLL)" == "0" && "$(DLL)" == "1"
101EXTRADLLFLAGS=
102!endif
103
104!if "$(NOMAIN)" == "1"
105EXTRADLLFLAGS=$(EXTRADLLFLAGS) /DNOMAIN
106!endif
107
227869da
JS
108!ifndef FINAL
109FINAL=0
110DEBUG=1
111!endif
112
113!ifndef DLL
114DLL=0
115!endif
116
117# Set this to 1 if you don't want to use precompiled headers
118!ifndef NOPCH
119NOPCH=0
120!endif
121
ca5c8b2d
JS
122# This sets 'D' to a suitable directory name
123# for this kind of build, and WXLIBNAME to one of wx (static release), wx_d (static debug),
cb1b6606 124# wx$(WXVERSION) (DLL release), wx$(WXVERSION)_d (DLL debug)
ca5c8b2d
JS
125
126!if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
cb1b6606 127WXLIBNAME=wx$(WXVERSION)
ca5c8b2d
JS
128!else
129WXLIBNAME=wx
130!endif
131
a4fe6524
RD
132!if "$(NEW_WXLIBNAME)" != ""
133WXLIBNAME=$(NEW_WXLIBNAME)
134!endif
135
ca5c8b2d
JS
136!if "$(FINAL)" == "1"
137D=Release
138!else
139D=Debug
cb1b6606
RD
140LIBEXT=_d
141WXLIBNAME=$(WXLIBNAME)$(LIBEXT)
ca5c8b2d
JS
142!endif
143
144!if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
145D=$(D)DLL
146!endif
147
148WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib
149
b49576e0
RD
150INC=-I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/tiff $(EXTRAINC)
151LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\jpeg.lib $(WXDIR)\lib\tiff.lib $(WXDIR)\lib\xpm.lib
ca5c8b2d 152
227869da
JS
153MAKEPRECOMP=/YcWX/WXPREC.H
154OPTIONS=
155
156!if "$(FINAL)" == "0"
157OPT = /Od /Gy
158# ***N.B.*** to save space/time, comment out /FR to avoid browse info (.sbr files) being generated
159DEBUG_FLAGS= /Zi /D__WXDEBUG__ # /DDEBUG=1 # /FR
160LINK_DEBUG_FLAGS=-debug:full -debugtype:cv # /PDB:NONE
7bf54362 161_CRTFLAG=/MDd
227869da
JS
162!else
163# /O1 - smallest code
164# /O2 - fastest code
165OPT = /O1 # /O2 # /Od
166DEBUG_FLAGS=
167LINK_DEBUG_FLAGS=/RELEASE
7bf54362
RD
168_CRTFLAG=/MD
169!endif
170
171!if "$(CRTFLAG)" == ""
172CRTFLAG=$(_CRTFLAG)
227869da
JS
173!endif
174
175!if "$(DLL)" == "0"
176
177!if "$(NOPCH)" == "1"
178PCH=
179PRECOMP=
180MAKEPRECOMP=
181!else
ca5c8b2d
JS
182PCH=$(WXLIBNAME).pch
183PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\lib\$(WXLIBNAME).pdb
227869da
JS
184MAKEPRECOMP=/YcWX/WXPREC.H
185!endif
186
187CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX /DSTRICT $(OVERRIDEFLAGS)
188# If you don't include wxprec.h, use CPPFLAGS2
189CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX /DSTRICT $(OVERRIDEFLAGS)
190LINKFLAGS=$(LINK_DEBUG_FLAGS) $(WINLINKFLAGS) -entry:WinMainCRTStartup
191DUMMY=dummy
192
193!else
194
195!if "$(WXMAKINGDLL)" == "1"
ca5c8b2d 196PCH=$(WXLIBNAME).pch
227869da
JS
197DUMMY=dummydll
198!else
ca5c8b2d 199PCH=$(WXLIBNAME).pch
227869da
JS
200DUMMY=dummy
201!endif
202
ca5c8b2d 203PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\lib\$(WXLIBNAME).pdb
227869da
JS
204CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL
205CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL
206LINKFLAGS=$(LINK_DEBUG_FLAGS) -machine:i386 -subsystem:windows,$(APPVER) -dll # -entry:_DllMainCRTStartup$(DLLENTRY)
207!endif
208
ca5c8b2d 209DUMMYOBJ=$(WXDIR)\src\msw\$D\$(DUMMY).obj
227869da 210
e9c4b1a2
JS
211.c.obj:
212 cl @<<
213$(CPPFLAGS2) /Fo$@ /c $<
214<<
215
216.cpp.obj:
217 cl @<<
218$(CPPFLAGS2) /Fo$@ /c $<
219<<
220