diff options
author | nijtmans <nijtmans> | 2010-10-31 21:25:55 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-10-31 21:25:55 (GMT) |
commit | ee4a642fd43dde2d79f0175ab24e3a12a420387c (patch) | |
tree | 1e8bd4af8c9c23115379ae4db07c9d996545dad8 /win/rules.vc | |
parent | ff76e17890fe1b8b16aca68dd915089231bcc458 (diff) | |
download | tk-ee4a642fd43dde2d79f0175ab24e3a12a420387c.zip tk-ee4a642fd43dde2d79f0175ab24e3a12a420387c.tar.gz tk-ee4a642fd43dde2d79f0175ab24e3a12a420387c.tar.bz2 |
Add -D_CRT_SECURE_NO_DEPRECATE and -D_CRT_NONSTDC_NO_DEPRECATE, reducing the number of
deprecation warnings on later VC++ versions.
Better VCVERSION determination.
All changes backported from Tcl8.5/8.6
Diffstat (limited to 'win/rules.vc')
-rw-r--r-- | win/rules.vc | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/win/rules.vc b/win/rules.vc index ba87724..80e6b2d 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -11,7 +11,7 @@ # Copyright (c) 2003-2006 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.5.2.10 2010/10/23 21:43:05 nijtmans Exp $ +# RCS: @(#) $Id: rules.vc,v 1.5.2.11 2010/10/31 21:25:55 nijtmans Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -187,24 +187,27 @@ LINKERFLAGS =-ltcg _VC_MANIFEST_EMBED_EXE= _VC_MANIFEST_EMBED_DLL= -!if ![cl /Zs /Tc NUL 2>&1 | find "Version 12" > NUL] -VCVER=6 -!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 13" > NUL] -VCVER=7 -!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 14" > NUL] -VCVER=8 -_VC_MANIFEST_EMBED_EXE=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 -_VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 -!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 15" > NUL] -VCVER=9 -_VC_MANIFEST_EMBED_EXE=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 -_VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 -!elseif ![cl /Zs /Tc NUL 2>&1 | find "Version 16" > NUL] +VCVER=0 +!if ![echo VCVERSION=_MSC_VER > vercl.x] \ + && ![cl -nologo -TC -P vercl.x $(ERRNULL)] +!include vercl.i +!if $(VCVERSION) >= 1600 VCVER=10 +!elseif $(VCVERSION) >= 1500 +VCVER=9 +!elseif $(VCVERSION) >= 1400 +VCVER=8 +!elseif $(VCVERSION) >= 1300 +VCVER=7 +!elseif $(VCVERSION) >= 1200 +VCVER=6 +!endif +!endif + +# Since MSVC8 we must deal with manifest resources. +!if $(VCVERSION) >= 1400 _VC_MANIFEST_EMBED_EXE=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;1 _VC_MANIFEST_EMBED_DLL=if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 -!else -VCVER=0 !endif #---------------------------------------------------------- |