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