3 # Author: Ulrich Leodolter
4 # Created: Wed May 17 08:36:42 1995
7 # MSVC++ 32-bit makefile include file
11 # read version numbers
12 !include "version.mak"
13 WXVERSION=$(wxMAJOR_VERSION)$(wxMINOR_VERSION)$(wxRELEASE_NUMBER_IFUNSTABLE)
19 # WIN95 means "all systems newer than Win95", i.e. Win9x and NT 4+
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.
27 WINVERSION=-DWINVER=0x0350 # Generic WIN32
30 # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0).
31 WINVERSION=-DWINVER=0x0400 /D__WIN95__
34 # On Alpha machines, change to CPU=ALPHA
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
45 WINFLAGS=-c -W3 -nologo -DWIN32 -D__WIN32__ -D_WINDOWS $(WINVERSION) -DSTRICT
46 WINLINKFLAGS=/INCREMENTAL:NO /NOLOGO -machine:$(CPU) -subsystem:windows,$(APPVER)
47 BASELINKFLAGS=/INCREMENTAL:NO /NOLOGO -machine:$(CPU) -subsystem:console,$(APPVER)
48 WINLIBS=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
51 # Set a WXWIN environment variable be the path to your WXWIN directory
54 WXSRC=$(WXDIR)\src\msw
55 WXINC=$(WXDIR)\include
56 WXBASESRC=$(WXDIR)\src\common
58 #####################################################################
59 # These are the possible DLL/non-DLL usages:
61 # Type _DLL/_WINDLL WXUSINGDLL WXMAKINGDLL Library
62 #--------------------------------------------------------------------
63 # Normal application - - - wx.lib
65 # wxWin as DLL Defined - Defined wx$(WXVERSION).lib
67 # App using wxWin DLL - Defined - wx$(WXVERSION).lib
69 # App built as one DLL Defined - - wx.lib
71 ######################################################################
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.
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)
90 !if "$(WXUSINGDLL)" == "1"
91 EXTRADLLFLAGS=/DWXUSINGDLL=1
94 !if "$(WXMAKINGDLL)" == "1"
95 EXTRADLLFLAGS=/DWXMAKINGDLL=1
98 !if "$(WXMAKINGDLL)" == "0" && "$(DLL)" == "1"
102 !if "$(NOMAIN)" == "1"
103 EXTRADLLFLAGS=$(EXTRADLLFLAGS) /DNOMAIN
123 # Set this to 1 if you don't want to use precompiled headers
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)
132 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
133 WXLIBNAME=wxmsw$(WXVERSION)
138 !if "$(NEW_WXLIBNAME)" != ""
139 WXLIBNAME=$(NEW_WXLIBNAME)
142 !if "$(UNICODE)" == "1"
144 WXLIBNAME=$(WXLIBNAME)$(UNIEXT)
147 !if "$(FINAL)" == "1"
149 !else if "$(FINAL)" == "hybrid"
152 WXLIBNAME=$(WXLIBNAME)$(LIBEXT)
154 guilibsdll= oldnames.lib kernel32.lib \
155 ws2_32.lib mswsock.lib advapi32.lib user32.lib \
156 gdi32.lib comdlg32.lib winspool.lib
159 WXLIBNAME=$(WXLIBNAME)$(LIBEXT)
162 !if "$(wxUSE_GUI)" == "0"
165 WXLIBNAME=$(WXLIBNAME)$(UNIEXT)$(LIBEXT)
168 !if "$(UNICODE)" == "1"
172 INCEXT=$(UNIEXT)$(LIBEXT)
174 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
179 #----------------------------------------------------------------------
180 # MSLU == Microsoft Layer for Unicode
181 # See MSDN or the Platform SDK docs for details
183 MSLU_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
184 MSLU_LIBS=$(MSLU_FLAGS) unicows.lib
187 WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib
189 !if "$(wxUSE_GUI)" == "0"
190 INCTEMP=$(EXTRAINC) -I$(WXDIR)/lib/base$(INCEXT)
192 INCTEMP=$(EXTRAINC) -I$(WXDIR)/lib/msw$(INCEXT)
195 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
197 !if "$(WXUSINGDLL)" == "1" || "$(wxUSE_GUI)" == "0"
198 LIBS = $(MSLU_LIBS) $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\regex$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib
200 LIBS = $(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
203 MAKEPRECOMP=/YcWX/WXPREC.H
206 !if "$(FINAL)" == "0"
208 # ***N.B.*** to save space/time, comment out /FR to avoid browse info (.sbr files) being generated
209 DEBUG_FLAGS= /Zi /D__WXDEBUG__ # /DDEBUG=1 # /FR
210 LINK_DEBUG_FLAGS=-debug:full -debugtype:cv # /PDB:NONE
213 !else if "$(FINAL)" == "hybrid"
215 DEBUG_FLAGS= /D__WXDEBUG__ /D__NO_VC_CRTDBG__
216 LINK_DEBUG_FLAGS=/RELEASE
220 # /O1 - smallest code
222 OPT = /O1 # /O2 # /Od
224 LINK_DEBUG_FLAGS=/RELEASE
229 !if "$(CRTFLAG)" == ""
235 !if "$(NOPCH)" == "1"
241 !if "$(wxUSE_GUI)" == "0"
247 PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\$D\$(PCH) /Fd$(WXDIR)\$D\vc60.pdb
248 MAKEPRECOMP=/YcWX/WXPREC.H
253 CPPFLAGS=$(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
255 CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX- $(OVERRIDEFLAGS)
256 !if "$(wxUSE_GUI)" == "0"
257 LINKFLAGS=$(LINK_DEBUG_FLAGS) $(BASELINKFLAGS)
259 LINKFLAGS=$(LINK_DEBUG_FLAGS) $(WINLINKFLAGS) -entry:WinMainCRTStartup
265 !if "$(WXMAKINGDLL)" == "1"
273 PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\$D\$(PCH) /Fd$(WXDIR)\lib\$(WXLIBNAME).pdb
274 CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL
275 CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL
276 LINKFLAGS=$(LINK_DEBUG_FLAGS) -machine:i386 -subsystem:windows,$(APPVER) -dll # -entry:_DllMainCRTStartup$(DLLENTRY)
279 DUMMYOBJ=$(WXDIR)\$D\$(DUMMY).obj
283 $(CPPFLAGS2) /Fo$@ /c $<
288 $(CPPFLAGS2) /Fo$@ /c $<
291 #use CPPFLAGS2 so as not to use precompiled headers
294 $(CPPFLAGS2) /Fo$@ /c $<
299 $(CPPFLAGS) /Fo$@ /c /Tp $<