summaryrefslogtreecommitdiffstats
path: root/win/rules.vc
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2006-09-26 23:55:50 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2006-09-26 23:55:50 (GMT)
commit00c02f61ecfef30ea080d3f881e79fa0c5c5e0dc (patch)
treedd2b2ac49c84033e65cf74247332d4840ee9554a /win/rules.vc
parent9dfdfe057b35a6a13b2da62fb23c03bd87ab030f (diff)
downloadtk-00c02f61ecfef30ea080d3f881e79fa0c5c5e0dc.zip
tk-00c02f61ecfef30ea080d3f881e79fa0c5c5e0dc.tar.gz
tk-00c02f61ecfef30ea080d3f881e79fa0c5c5e0dc.tar.bz2
* win/makefile.vc: Support MSVC8 and AMD64 target. Also try using
* win/rules.vc: sed to generate the manifest (cross-compile cannot * win/nmakehlp.c: execute tclsh). If no sed, use the tclsh exe.
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