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
34 # On Alpha machines, change to CPU=ALPHA
43 # If you set wxUSE_IOSTREAMH to 0, remove
44 # -Dtry=__try -Dexcept=__except -Dleave=__leave -Dfinally=__finally
45 #WINFLAGS=-c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 -DWIN32 -D__WIN32__ $(WINVERSION) -DSTRICT
46 WINFLAGS=-c -W3 -nologo -DWIN32 -D_WINDOWS $(WINVERSION) -DSTRICT
47 WINLINKFLAGS=-nologo -machine:$(CPU) -subsystem:windows,$(APPVER)
48 BASELINKFLAGS=-nologo -machine:$(CPU) -subsystem:console,$(APPVER)
49 WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib \
50 shell32.lib oldnames.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib \
51 uuid.lib rpcrt4.lib advapi32.lib wsock32.lib \
52 # libci.lib # libci.lib required for VC++ 4.2
54 # Set a WXWIN environment variable be the path to your WXWIN directory
57 WXSRC=$(WXDIR)\src\msw
58 WXINC=$(WXDIR)\include
59 WXBASESRC=$(WXDIR)\src\common
61 #####################################################################
62 # These are the possible DLL/non-DLL usages:
64 # Type _DLL/_WINDLL WXUSINGDLL WXMAKINGDLL Library
65 #--------------------------------------------------------------------
66 # Normal application - - - wx.lib
68 # wxWin as DLL Defined - Defined wx$(WXVERSION).lib
70 # App using wxWin DLL - Defined - wx$(WXVERSION).lib
72 # App built as one DLL Defined - - wx.lib
74 ######################################################################
78 # when compiling an app to use the DLL version of wxWindows
79 # (but not to be a DLL itself), set WXUSINGDLL to 1 in your
80 # makefile just before including ntwxwin.mak.
81 # To compile wxWin _and_ app itself as a DLL, set DLL to 1
82 # in ntwxwin.mak, and do not set WXUSINGDLL.
84 # Compiling wxWindows:
85 #---------------------
86 # Use the dll target to compile wxWindows as DLL; then make 'pch'
87 # to generate a precompiled header for your apps to use. BUG: must compile without
88 # wxExpr (USE_WX_RESOURCES = 0) for this to link properly. Don't know why yet.
89 # Use the dllapp target to compile wxWindows for making a DLL app (not implemented yet)
93 !if "$(WXUSINGDLL)" == "1"
94 EXTRADLLFLAGS=/DWXUSINGDLL=1
97 !if "$(WXMAKINGDLL)" == "1"
98 EXTRADLLFLAGS=/DWXMAKINGDLL=1
101 !if "$(WXMAKINGDLL)" == "0" && "$(DLL)" == "1"
105 !if "$(NOMAIN)" == "1"
106 EXTRADLLFLAGS=$(EXTRADLLFLAGS) /DNOMAIN
122 !if "$(FINAL)" == "0"
133 # Set this to 1 if you don't want to use precompiled headers
138 # This sets 'D' to a suitable directory name: [Base](Debug|Release|Hybrid)[Dll]
139 # for this kind of build, and WXLIBNAME to one of wx(msw|base)[u][d] (static),
140 # wx(msw|base)$(WXVERSION)[u][d] (DLL)
142 !if "$(UNICODE)" == "1"
145 _WXDIR_UNICODESUFFIX=Unicode
148 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
149 _WXLIB_VERSION=$(WXVERSION)
158 !if "$(FINAL)" == "1"
162 !else if "$(FINAL)" == "hybrid"
166 guilibsdll= oldnames.lib kernel32.lib \
167 ws2_32.lib mswsock.lib advapi32.lib user32.lib \
168 gdi32.lib comdlg32.lib winspool.lib
173 !if "$(wxUSE_GUI)" == "0"
183 !if "$(UNICODE)" == "1"
184 UNIFLAGS=-DUNICODE -D_UNICODE -DwxUSE_UNICODE=1
187 !if "$(wxUSE_GUI)" == "0"
188 UNIFLAGS=$(UNIFLAGS) -DwxUSE_GUI=0
191 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
196 D=$(_WXDIR_PREFIX)$(_WXDIR_BUILD)$(_WXDIR_UNICODESUFFIX)$(_WXDIR_DLLSUFFIX)
197 WXLIBNAME=$(_WXLIB_NAME)$(_WXLIB_VERSION)$(_WXLIB_SUFFIX)$(LIBEXT)
198 INCEXT=$(_WXINC_SUFFIX)$(LIBEXT)
200 !if "$(NEW_WXLIBNAME)" != ""
201 WXLIBNAME=$(NEW_WXLIBNAME)
204 #----------------------------------------------------------------------
205 # MSLU == Microsoft Layer for Unicode
206 # See MSDN or the Platform SDK docs for details
208 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
209 MSLU_LIBS=$(MSLU_FLAGS) unicows.lib
212 WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib
214 INC=$(EXTRAINC) -I$(WXDIR)/lib/$(_WXINC_BUILD)$(_WXINC_DLLSUFFIX)$(_WXINC_SUFFIX)$(LIBEXT) -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
216 !if "$(WXUSINGDLL)" == "1" || "$(wxUSE_GUI)" == "0"
217 LIBS = $(MSLU_LIBS) $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\regex$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib
219 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
224 !if "$(DEBUGINFO)" == "0"
226 !if "$(FINAL)" == "hybrid"
229 # /O1 - smallest code
231 OPT = /O1 # /O2 # /Od
234 LINK_DEBUG_FLAGS=/RELEASE
238 LINK_DEBUG_FLAGS=-debug:full -debugtype:cv
241 !if "$(FINAL)" == "0"
242 # ***N.B.*** to save space/time, comment out /FR to avoid browse info (.sbr files) being generated
243 DEBUG_FLAGS= /D__WXDEBUG__ # /DDEBUG=1 # /FR
246 !else if "$(FINAL)" == "hybrid"
247 DEBUG_FLAGS= /D__WXDEBUG__ /D__NO_VC_CRTDBG__
257 !if "$(CRTFLAG)" == ""
261 !if "$(NOPCH)" == "1"
269 !if "$(wxUSE_GUI)" == "0"
275 PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\$D\$(PCH) /Fd$(WXDIR)\lib\$(WXLIBNAME).pdb
276 MAKEPRECOMP=/YcWX/WXPREC.H
282 CPPFLAGS=$(UNIFLAGS) $(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) $(INC) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) $(OVERRIDEFLAGS)
283 # If you don't include wxprec.h, use CPPFLAGS2
284 CPPFLAGS2=$(UNIFLAGS) $(WINFLAGS) $(DEBUG_FLAGS) $(INC) $(EXTRAFLAGS) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) $(OVERRIDEFLAGS)
286 !if "$(wxUSE_GUI)" == "0"
287 LINKFLAGS=$(LINK_DEBUG_FLAGS) $(BASELINKFLAGS)
289 LINKFLAGS=$(LINK_DEBUG_FLAGS) $(WINLINKFLAGS)
296 CPPFLAGS= $(UNIFLAGS) $(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) $(INC) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDLL
297 CPPFLAGS2=$(UNIFLAGS) $(WINFLAGS) $(DEBUG_FLAGS) $(EXTRAFLAGS) $(INC) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDLL
299 !if "$(wxUSE_GUI)" == "0"
300 LINKFLAGS=$(LINK_DEBUG_FLAGS) $(BASELINKFLAGS) -dll
302 LINKFLAGS=$(LINK_DEBUG_FLAGS) $(WINLINKFLAGS) -dll
305 !if "$(WXMAKINGDLL)" == "1"
313 DUMMYOBJ=$(WXDIR)\$D\$(DUMMY).obj
317 $(CPPFLAGS2) /Fo$@ /c $<
322 $(CPPFLAGS2) /Fo$@ /c $<
325 #use CPPFLAGS2 so as not to use precompiled headers
328 $(CPPFLAGS2) /Fo$@ /c $<
333 $(CPPFLAGS) /Fo$@ /c /Tp $<