diff options
Diffstat (limited to 'win/rules.vc')
-rw-r--r-- | win/rules.vc | 78 |
1 files changed, 68 insertions, 10 deletions
diff --git a/win/rules.vc b/win/rules.vc index 9b7a6c4..1210997 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -7,11 +7,11 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# Copyright (c) 2001-2002 David Gravereaux. -# Copyright (c) 2003 Patrick Thoyts +# Copyright (c) 2001-2003 David Gravereaux. +# Copyright (c) 2003-2006 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.11.2.2 2006/06/14 15:24:19 patthoyts Exp $ +# RCS: @(#) $Id: rules.vc,v 1.11.2.3 2006/09/26 21:40:37 patthoyts Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -34,6 +34,9 @@ _INSTALLDIR = $(INSTALLDIR:/=\) MACHINE = IX86 !endif +!ifndef CFG_ENCODING +CFG_ENCODING = \"cp1252\" +!endif #---------------------------------------------------------- # Set the proper copy method to avoid overwrite questions @@ -46,13 +49,14 @@ RMDIR = rmdir /S /Q !if ![ver | find "4.0" > nul] CPY = echo y | xcopy /i !else -CPY = xcopy /i /y +CPY = xcopy /i /y >NUL !endif !else CPY = xcopy /i RMDIR = deltree /Y !endif - +MKDIR = mkdir +COPY = copy /y >NUL !message =============================================================================== @@ -105,6 +109,10 @@ OPTIMIZATIONS = $(OPTIMIZATIONS) -Gs OPTIMIZATIONS = $(OPTIMIZATIONS) -GS !endif +!if [nmakehlp -c -GL] +OPTIMIZATIONS = $(OPTIMIZATIONS) -GL +!endif + DEBUGFLAGS = !if [nmakehlp -c -RTC1] @@ -113,6 +121,10 @@ DEBUGFLAGS = $(DEBUGFLAGS) -RTC1 DEBUGFLAGS = $(DEBUGFLAGS) -GZ !endif +!if [nmakehlp -c -RTCc] +DEBUGFLAGS = $(DEBUGFLAGS) -RTCc +!endif + COMPILERFLAGS =-W3 !if [nmakehlp -c -YX] @@ -152,6 +164,12 @@ ALIGN98_HACK = 0 ALIGN98_HACK = 0 !endif +LINKERFLAGS = + +!if [nmakehlp -l -ltcg] +LINKERFLAGS =-ltcg +!endif + #---------------------------------------------------------- # MSVC8 (ships with Visual Studio 2005) generates a manifest # file that we should link into the binaries. This is how. @@ -257,6 +275,16 @@ TCL_USE_STATIC_PACKAGES = 0 # by accident. #---------------------------------------------------------- +#---------------------------------------- +# Naming convention: +# t = full thread support. +# s = static library (as opposed to an +# import library) +# g = linked to the debug enabled C +# run-time. +# x = special static build when it +# links to the dynamic C run-time. +#---------------------------------------- SUFX = tsgx !if $(DEBUG) @@ -268,9 +296,12 @@ DBGX = SUFX = $(SUFX:g=) !endif -#!if $(VCVER) > 6 -#BUILDDIRTOP =$(BUILDDIRTOP)_VC$(VCVER) -#!endif +!if "$(MACHINE)" != "IX86" +BUILDDIRTOP =$(BUILDDIRTOP)_$(MACHINE) +!endif +!if $(VCVER) > 6 +BUILDDIRTOP =$(BUILDDIRTOP)_VC$(VCVER) +!endif TMP_DIRFULL = .\$(BUILDDIRTOP)\$(PROJECT)_ThreadedDynamicStaticX @@ -330,6 +361,28 @@ TCL_COMPILE_DEBUG = 0 !endif !endif +#---------------------------------------------------------- +# Decode the checks requested. +#---------------------------------------------------------- + +!if "$(CHECKS)" == "" || [nmakehlp -f "$(CHECKS)" "none"] +TCL_NO_DEPRECATED = 0 +FULLWARNINGS = 0 +!else +!if [nmakehlp -f $(CHECKS) "nodep"] +!message *** Doing nodep check +TCL_NO_DEPRECATED = 1 +!else +TCL_NO_DEPRECATED = 0 +!endif +!if [nmakehlp -f $(CHECKS) "fullwarn"] +!message *** Doing full warnings check +FULLWARNINGS = 1 +!else +FULLWARNINGS = 0 +!endif +!endif + #---------------------------------------------------------- # Set our defines now armed with our options. @@ -337,7 +390,7 @@ TCL_COMPILE_DEBUG = 0 OPTDEFINES = !if $(TCL_MEM_DEBUG) -OPTDEFINES = -DTCL_MEM_DEBUG +OPTDEFINES = $(OPTDEFINES) -DTCL_MEM_DEBUG !endif !if $(TCL_COMPILE_DEBUG) OPTDEFINES = $(OPTDEFINES) -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS @@ -373,6 +426,7 @@ OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DO64BIT !if !defined(TCLDIR) !if exist("$(_INSTALLDIR)\include\tcl.h") +TCLH = "$(_INSTALLDIR)\include\tcl.h" TCLINSTALL = 1 _TCLDIR = $(_INSTALLDIR) !else @@ -383,8 +437,10 @@ Failed to find tcl.h. Set the TCLDIR macro. !else _TCLDIR = $(TCLDIR:/=\) !if exist("$(_TCLDIR)\include\tcl.h") +TCLH = "$(_TCLDIR)\include\tcl.h" TCLINSTALL = 1 !elseif exist("$(_TCLDIR)\generic\tcl.h") +TCLH = "$(_TCLDIR)\generic\tcl.h" TCLINSTALL = 0 !else MSG =^ @@ -437,6 +493,8 @@ TCLTOOLSDIR = $(_TCLDIR)\tools !message *** Output directory will be '$(OUT_DIR)' !message *** Suffix for binaries will be '$(SUFX)' !message *** Optional defines are '$(OPTDEFINES)' -!message *** Compiler version $(VCVER) options are '$(OPTIMIZATIONS) $(DEBUGFLAGS)' +!message *** Compiler version $(VCVER) +!message *** Compiler options '$(OPTIMIZATIONS) $(DEBUGFLAGS)' +!message *** Link options '$(LINKERFLAGS)' !endif |