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