diff options
author | nijtmans <nijtmans> | 2010-10-31 21:25:07 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-10-31 21:25:07 (GMT) |
commit | 44f16df1be0b7cc077186b156b508865160a0b50 (patch) | |
tree | d5fdcbd91e15ba658de09ed986f38f3ee76e8820 /win/rules.vc | |
parent | 118b3a147bb0d54069c2190fa61bdd06dce15cd9 (diff) | |
download | tcl-44f16df1be0b7cc077186b156b508865160a0b50.zip tcl-44f16df1be0b7cc077186b156b508865160a0b50.tar.gz tcl-44f16df1be0b7cc077186b156b508865160a0b50.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 f4fad25..c63e1c4 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.11.2.8 2010/10/23 21:42:15 nijtmans Exp $ +# RCS: @(#) $Id: rules.vc,v 1.11.2.9 2010/10/31 21:25:07 nijtmans Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -183,24 +183,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 #---------------------------------------------------------- |