summaryrefslogtreecommitdiffstats
path: root/win/rules.vc
diff options
context:
space:
mode:
Diffstat (limited to 'win/rules.vc')
-rw-r--r--win/rules.vc79
1 files changed, 68 insertions, 11 deletions
diff --git a/win/rules.vc b/win/rules.vc
index a45ce36..06b7c1d 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.5.2.4 2006/09/22 19:01:52 andreas_kupries Exp $
+# RCS: @(#) $Id: rules.vc,v 1.5.2.5 2006/09/26 23:55:50 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 ===============================================================================
@@ -109,6 +113,10 @@ OPTIMIZATIONS = $(OPTIMIZATIONS) -Gs
OPTIMIZATIONS = $(OPTIMIZATIONS) -GS
!endif
+!if [nmakehlp -c -GL]
+OPTIMIZATIONS = $(OPTIMIZATIONS) -GL
+!endif
+
DEBUGFLAGS =
!if [nmakehlp -c -RTC1]
@@ -117,6 +125,10 @@ DEBUGFLAGS = $(DEBUGFLAGS) -RTC1
DEBUGFLAGS = $(DEBUGFLAGS) -GZ
!endif
+!if [nmakehlp -c -RTCc]
+DEBUGFLAGS = $(DEBUGFLAGS) -RTCc
+!endif
+
COMPILERFLAGS =-W3
!if [nmakehlp -c -YX]
@@ -156,6 +168,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.
@@ -261,6 +279,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)
@@ -272,9 +300,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
@@ -334,6 +365,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.
@@ -341,7 +394,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
@@ -377,6 +430,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
@@ -387,8 +441,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 =^
@@ -442,7 +498,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\
- '$(COMPILERFLAGS) $(OPTIMIZATIONS) $(DEBUGFLAGS)'
+!message *** Compiler version $(VCVER)
+!message *** Compiler options '$(OPTIMIZATIONS) $(DEBUGFLAGS)'
+!message *** Link options '$(LINKERFLAGS)'
!endif