3 # Author: Ulrich Leodolter
4 # Created: Wed May 17 08:36:42 1995
7 # MSVC++ 32-bit makefile include file
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.
23 WINVERSION=-DWINVER=0x0350 # Generic WIN32
26 # This means 'enable Windows 95 features' (in wxWindows and in VC++ 4.0).
27 WINVERSION=-DWINVER=0x0400 /D__WIN95__
30 # On Alpha machines, change to CPU=ALPHA
39 # If you set wxUSE_IOSTREAMH to 0, remove -Dtry=__try -Dexcept=__except -Dleave=__leave -Dfinally=__finally
40 #WINFLAGS=-c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 -DWIN32 -D__WIN32__ $(WINVERSION)
41 WINFLAGS=-c -W3 -nologo -DWIN32 -D__WIN32__ -D_WINDOWS $(WINVERSION)
42 WINLINKFLAGS=/INCREMENTAL:NO /NOLOGO -machine:$(CPU) -subsystem:windows,$(APPVER)
43 BASELINKFLAGS=/INCREMENTAL:NO /NOLOGO -machine:$(CPU) -subsystem:console,$(APPVER)
44 WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib oldnames.lib\
45 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
47 # Set a WXWIN environment variable be the path to your WXWIN directory
50 WXSRC=$(WXDIR)\src\msw
51 WXINC=$(WXDIR)\include
52 WXBASESRC=$(WXDIR)\src\common
54 #####################################################################
55 # These are the possible DLL/non-DLL usages:
57 # Type _DLL/_WINDLL WXUSINGDLL WXMAKINGDLL Library
58 #--------------------------------------------------------------------
59 # Normal application - - - wx.lib
61 # wxWin as DLL Defined - Defined wx$(WXVERSION).lib
63 # App using wxWin DLL - Defined - wx$(WXVERSION).lib
65 # App built as one DLL Defined - - wx.lib
67 ######################################################################
71 # when compiling an app to use the DLL version of wxWindows
72 # (but not to be a DLL itself), set WXUSINGDLL to 1 in your
73 # makefile just before including ntwxwin.mak.
74 # To compile wxWin _and_ app itself as a DLL, set DLL to 1
75 # in ntwxwin.mak, and do not set WXUSINGDLL.
77 # Compiling wxWindows:
78 #---------------------
79 # Use the dll target to compile wxWindows as DLL; then make 'pch'
80 # to generate a precompiled header for your apps to use. BUG: must compile without
81 # wxExpr (USE_WX_RESOURCES = 0) for this to link properly. Don't know why yet.
82 # Use the dllapp target to compile wxWindows for making a DLL app (not implemented yet)
86 !if "$(WXUSINGDLL)" == "1"
87 EXTRADLLFLAGS=/DWXUSINGDLL=1
90 !if "$(WXMAKINGDLL)" == "1"
91 EXTRADLLFLAGS=/DWXMAKINGDLL=1
94 !if "$(WXMAKINGDLL)" == "0" && "$(DLL)" == "1"
98 !if "$(NOMAIN)" == "1"
99 EXTRADLLFLAGS=$(EXTRADLLFLAGS) /DNOMAIN
111 # Set this to 1 if you don't want to use precompiled headers
116 # This sets 'D' to a suitable directory name
117 # for this kind of build, and WXLIBNAME to one of wx (static release), wxd (static debug),
118 # wx$(WXVERSION) (DLL release), wx$(WXVERSION)d (DLL debug)
120 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
121 WXLIBNAME=wx$(WXVERSION)
126 !if "$(NEW_WXLIBNAME)" != ""
127 WXLIBNAME=$(NEW_WXLIBNAME)
130 !if "$(FINAL)" == "1"
132 !else if "$(FINAL)" == "hybrid"
135 WXLIBNAME=$(WXLIBNAME)$(LIBEXT)
137 guilibsdll= oldnames.lib kernel32.lib \
138 ws2_32.lib mswsock.lib advapi32.lib user32.lib \
139 gdi32.lib comdlg32.lib winspool.lib
142 WXLIBNAME=$(WXLIBNAME)$(LIBEXT)
145 !if "$(wxUSE_GUI)" == "0"
148 WXLIBNAME=$(WXLIBNAME)$(LIBEXT)
151 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
155 WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib
157 INC=$(EXTRAINC) -I$(WXINC) -I$(WXDIR)/contrib/include -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/tiff
159 !if "$(WXUSINGDLL)" == "1" || "$(wxUSE_GUI)" == "0"
160 LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS)
162 LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\png$(LIBEXT).lib $(WXDIR)\lib\zlib$(LIBEXT).lib $(WXDIR)\lib\jpeg$(LIBEXT).lib $(WXDIR)\lib\tiff$(LIBEXT).lib
165 MAKEPRECOMP=/YcWX/WXPREC.H
168 !if "$(FINAL)" == "0"
170 # ***N.B.*** to save space/time, comment out /FR to avoid browse info (.sbr files) being generated
171 DEBUG_FLAGS= /Zi /D__WXDEBUG__ # /DDEBUG=1 # /FR
172 LINK_DEBUG_FLAGS=-debug:full -debugtype:cv # /PDB:NONE
175 !else if "$(FINAL)" == "hybrid"
177 DEBUG_FLAGS= /Zi /D__WXDEBUG__ /D__NO_VC_CRTDBG__
178 LINK_DEBUG_FLAGS=-debug:full -debugtype:cv
182 # /O1 - smallest code
184 OPT = /O1 # /O2 # /Od
186 LINK_DEBUG_FLAGS=/RELEASE
191 !if "$(CRTFLAG)" == ""
197 !if "$(NOPCH)" == "1"
203 !if "$(wxUSE_GUI)" == "0"
209 PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$D\$(PCH) /Fd$(WXDIR)\src\msw\$D\vc60.pdb
210 MAKEPRECOMP=/YcWX/WXPREC.H
215 CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX /DSTRICT $(OVERRIDEFLAGS)
216 # If you don't include wxprec.h, use CPPFLAGS2
217 CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) $(EXTRADLLFLAGS) $(CRTFLAG) /D__WINDOWS__ /GX /DSTRICT $(OVERRIDEFLAGS)
218 !if "$(wxUSE_GUI)" == "0"
219 LINKFLAGS=$(LINK_DEBUG_FLAGS) $(BASELINKFLAGS)
221 LINKFLAGS=$(LINK_DEBUG_FLAGS) $(WINLINKFLAGS) -entry:WinMainCRTStartup
227 !if "$(WXMAKINGDLL)" == "1"
235 PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$D\$(PCH) /Fd$(WXDIR)\lib\$(WXLIBNAME).pdb
236 CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WXMSW__ $(INC) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL
237 CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WXMSW__ $(INC) $(EXTRAFLAGS) $(OPT) /D_DLL $(CRTFLAG) $(EXTRADLLFLAGS) /D_WINDOWS /D__WINDOWS__ /D_WINDLL
238 LINKFLAGS=$(LINK_DEBUG_FLAGS) -machine:i386 -subsystem:windows,$(APPVER) -dll # -entry:_DllMainCRTStartup$(DLLENTRY)
241 DUMMYOBJ=$(WXDIR)\src\msw\$D\$(DUMMY).obj
245 $(CPPFLAGS2) /Fo$@ /c $<
250 $(CPPFLAGS2) /Fo$@ /c $<
253 #use CPPFLAGS2 so as not to use precompiled headers
256 $(CPPFLAGS2) /Fo$@ /c $<
261 $(CPPFLAGS) /Fo$@ /c /Tp $<