3 # Author: Ulrich Leodolter
4 # Created: Wed May 17 08:36:42 1995
7 # MSVC++ 32-bit makefile include file
17 # WIN95 means "all systems newer than Win95", i.e. Win9x and NT 4+
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.
25 WINVERSION=-DWINVER=0x0350 # Generic WIN32
28 # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0).
29 WINVERSION=-DWINVER=0x0400 /D__WIN95__
32 # On Alpha machines, change to CPU=ALPHA
41 # If you set wxUSE_IOSTREAMH to 0, remove -Dtry=__try -Dexcept=__except -Dleave=__leave -Dfinally=__finally
42 #WINFLAGS=-c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 -DWIN32 -D__WIN32__ $(WINVERSION) -DSTRICT
43 WINFLAGS=-c -W3 -nologo -DWIN32 -D__WIN32__ -D_WINDOWS $(WINVERSION) -DSTRICT
44 WINLINKFLAGS=/INCREMENTAL:NO /NOLOGO -machine:$(CPU) -subsystem:windows,$(APPVER)
45 BASELINKFLAGS=/INCREMENTAL:NO /NOLOGO -machine:$(CPU) -subsystem:console,$(APPVER)
46 WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib oldnames.lib\
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
49 # Set a WXWIN environment variable be the path to your WXWIN directory
52 WXSRC=$(WXDIR)\src\msw
53 WXINC=$(WXDIR)\include
54 WXBASESRC=$(WXDIR)\src\common
56 #####################################################################
57 # These are the possible DLL/non-DLL usages:
59 # Type _DLL/_WINDLL WXUSINGDLL WXMAKINGDLL Library
60 #--------------------------------------------------------------------
61 # Normal application - - - wx.lib
63 # wxWin as DLL Defined - Defined wx$(WXVERSION).lib
65 # App using wxWin DLL - Defined - wx$(WXVERSION).lib
67 # App built as one DLL Defined - - wx.lib
69 ######################################################################
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.
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)
88 !if "$(WXUSINGDLL)" == "1"
89 EXTRADLLFLAGS=/DWXUSINGDLL=1
92 !if "$(WXMAKINGDLL)" == "1"
93 EXTRADLLFLAGS=/DWXMAKINGDLL=1
96 !if "$(WXMAKINGDLL)" == "0" && "$(DLL)" == "1"
100 !if "$(NOMAIN)" == "1"
101 EXTRADLLFLAGS=$(EXTRADLLFLAGS) /DNOMAIN
121 # Set this to 1 if you don't want to use precompiled headers
126 # This sets 'D' to a suitable directory name
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)
130 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
131 WXLIBNAME=wxmsw$(WXVERSION)
136 !if "$(NEW_WXLIBNAME)" != ""
137 WXLIBNAME=$(NEW_WXLIBNAME)
140 !if "$(UNICODE)" == "1"
142 WXLIBNAME=$(WXLIBNAME)$(UNIEXT)
145 !if "$(FINAL)" == "1"
147 !else if "$(FINAL)" == "hybrid"
150 WXLIBNAME=$(WXLIBNAME)$(LIBEXT)
152 guilibsdll= oldnames.lib kernel32.lib \
153 ws2_32.lib mswsock.lib advapi32.lib user32.lib \
154 gdi32.lib comdlg32.lib winspool.lib
157 WXLIBNAME=$(WXLIBNAME)$(LIBEXT)
160 !if "$(wxUSE_GUI)" == "0"
163 WXLIBNAME=$(WXLIBNAME)$(UNIEXT)$(LIBEXT)
166 !if "$(UNICODE)" == "1"
170 INCEXT=$(UNIEXT)$(LIBEXT)
172 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
177 #----------------------------------------------------------------------
178 # MSLU == Microsoft Layer for Unicode
179 # See MSDN or the Platform SDK docs for details
181 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
182 MSLU_LIBS=$(MSLU_FLAGS) unicows.lib
185 WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib
187 !if "$(wxUSE_GUI)" == "0"
188 INCTEMP=$(EXTRAINC) -I$(WXDIR)/lib/base$(INCEXT)
190 INCTEMP=$(EXTRAINC) -I$(WXDIR)/lib/msw$(INCEXT)
193 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
195 !if "$(WXUSINGDLL)" == "1" || "$(wxUSE_GUI)" == "0"
196 LIBS = $(MSLU_LIBS) $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\regex$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib
198 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
201 MAKEPRECOMP=/YcWX/WXPREC.H
204 !if "$(FINAL)" == "0"
206 # ***N.B.*** to save space/time, comment out /FR to avoid browse info (.sbr files) being generated
207 DEBUG_FLAGS= /Zi /D__WXDEBUG__ # /DDEBUG=1 # /FR
208 LINK_DEBUG_FLAGS=-debug:full -debugtype:cv # /PDB:NONE
211 !else if "$(FINAL)" == "hybrid"
213 DEBUG_FLAGS= /D__WXDEBUG__ /D__NO_VC_CRTDBG__
214 LINK_DEBUG_FLAGS=/RELEASE
218 # /O1 - smallest code
220 OPT = /O1 # /O2 # /Od
222 LINK_DEBUG_FLAGS=/RELEASE
227 !if "$(CRTFLAG)" == ""
233 !if "$(NOPCH)" == "1"
239 !if "$(wxUSE_GUI)" == "0"
245 PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\$D\$(PCH) /Fd$(WXDIR)\$D\vc60.pdb
246 MAKEPRECOMP=/YcWX/WXPREC.H
251 CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX- $(OVERRIDEFLAGS)
252 # If you don't include wxprec.h, use CPPFLAGS2
253 CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX- $(OVERRIDEFLAGS)
254 !if "$(wxUSE_GUI)" == "0"
255 LINKFLAGS=$(LINK_DEBUG_FLAGS) $(BASELINKFLAGS)
257 LINKFLAGS=$(LINK_DEBUG_FLAGS) $(WINLINKFLAGS) -entry:WinMainCRTStartup
263 !if "$(WXMAKINGDLL)" == "1"
271 PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\$D\$(PCH) /Fd$(WXDIR)\lib\$(WXLIBNAME).pdb
272 CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL
273 CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL
274 LINKFLAGS=$(LINK_DEBUG_FLAGS) -machine:i386 -subsystem:windows,$(APPVER) -dll # -entry:_DllMainCRTStartup$(DLLENTRY)
277 DUMMYOBJ=$(WXDIR)\$D\$(DUMMY).obj
281 $(CPPFLAGS2) /Fo$@ /c $<
286 $(CPPFLAGS2) /Fo$@ /c $<
289 #use CPPFLAGS2 so as not to use precompiled headers
292 $(CPPFLAGS2) /Fo$@ /c $<
297 $(CPPFLAGS) /Fo$@ /c /Tp $<