diff options
author | davygrvy <davygrvy@noemail.net> | 2002-03-28 23:23:02 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@noemail.net> | 2002-03-28 23:23:02 (GMT) |
commit | 72c6dece05777c6158e9d6726c879d2c1cb74d2c (patch) | |
tree | 64a7d4eacc4548a71dd1f2cb8b45ee3356516b18 /win/rules.vc | |
parent | 0672495db3d5bf3c59fbed5249eaa92388c21966 (diff) | |
download | tk-72c6dece05777c6158e9d6726c879d2c1cb74d2c.zip tk-72c6dece05777c6158e9d6726c879d2c1cb74d2c.tar.gz tk-72c6dece05777c6158e9d6726c879d2c1cb74d2c.tar.bz2 |
* win/.cvsignore (new):
* win/lamp.bmp (new):
* win/makefile.vc:
* win/nmakehlp.c (new):
* win/rules.vc: Brought the makefile up-to-date with Tcl's one.
This now has support for Win9x issues and the winhelp target now
exists. Color scheme can be changed. I'm just imparting a first
suggestion using orange :) I'll have to think about the install
portion of the helpfile as I'll need to do some tricks to insert
tk's contents file into Tcl's using some special winhlp32.exe
switches. [Bug 533862 527941]
FossilOrigin-Name: 8bb6331b52c3c5354d532404f7dc125089c6b701
Diffstat (limited to 'win/rules.vc')
-rw-r--r-- | win/rules.vc | 111 |
1 files changed, 94 insertions, 17 deletions
diff --git a/win/rules.vc b/win/rules.vc index 95f33fe..402a5d9 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -7,10 +7,10 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# Copyright (c) 2001 Tomasoft Engineering. +# Copyright (c) 2001-2002 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.1 2001/11/13 02:46:23 davygrvy Exp $ +# RCS: @(#) $Id: rules.vc,v 1.2 2002/03/28 23:23:03 davygrvy Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -29,61 +29,128 @@ INSTALLDIR = C:\Progra~1\Tcl MACHINE = IX86 !endif +!message =============================================================================== + +#---------------------------------------------------------- +# build the helper app we need to overcome nmake's limiting +# environment. +#---------------------------------------------------------- + +!if !exist(nmakehlp.exe) +!if [$(cc32) -nologo -ML nmakehlp.c -link -subsystem:console > nul] +!endif +!endif + +#---------------------------------------------------------- +# Test for compiler features +#---------------------------------------------------------- + +### test for optimizations +!if [nmakehlp -c -Ox] +!message *** Compiler has 'Optimizations' +OPTIMIZING = 1 +!else +!message *** Compiler doesn't have 'Optimizations' +OPTIMIZING = 0 +!endif + +!if "$(MACHINE)" == "IX86" +### test for pentium errata +!if [nmakehlp -c -QI0f] +!message *** Compiler has 'Pentium 0x0f fix' +PENT_0F_ERRATA = 1 +!else +!message *** Compiler doesn't have 'Pentium 0x0f fix' +PENT_0F_ERRATA = 0 +!endif +### test for -align:4096, when align:512 will do. +!if [nmakehlp -l -opt:nowin98] +!message *** Linker has 'Win98 alignment problem' +ALIGN98_HACK = 1 +!else +!message *** Linker doesn't have 'Win98 alignment problem' +ALIGN98_HACK = 0 +!endif +!else +PENT_0F_ERRATA = 0 +ALIGN98_HACK = 0 +!endif + +!if "$(MACHINE)" == "IA64" +### test for Itanium errata +!if [nmakehlp -c -QIA64_Bx] +!message *** Compiler has 'B-stepping errata workarounds' +ITAN_B_ERRATA = 1 +!else +!message *** Compiler doesn't have 'B-stepping errata workarounds' +ITAN_B_ERRATA = 0 +!endif +!else +ITAN_B_ERRATA = 0 +!endif #---------------------------------------------------------- # Decode the options requested. #---------------------------------------------------------- -!if "$(OPTS)" == "" || ![echo $(OPTS) | find /i "none" > nul] + +!if "$(OPTS)" == "" || [nmakehlp -f "$(OPTS)" "none"] STATIC_BUILD = 0 TCL_THREADS = 0 DEBUG = 0 PROFILE = 0 MSVCRT = 0 +LOIMPACT = 0 TCL_LINKWITHEXTENSIONS = 0 !else -!if ![echo $(OPTS) | find /i "static" > nul] +!if [nmakehlp -f $(OPTS) "static"] !message *** Doing static STATIC_BUILD = 1 !else STATIC_BUILD = 0 !endif -!if ![echo $(OPTS) | find /i "msvcrt" > nul] +!if [nmakehlp -f $(OPTS) "msvcrt"] !message *** Doing msvcrt MSVCRT = 1 !else MSVCRT = 0 !endif -!if ![echo $(OPTS) | find /i "linkexten" > nul] +!if [nmakehlp -f $(OPTS) "linkexten"] !message *** Doing linkexten TCL_LINKWITHEXTENSIONS = 1 !else TCL_LINKWITHEXTENSIONS = 0 !endif -!if ![echo $(OPTS) | find /i "threads" > nul] +!if [nmakehlp -f $(OPTS) "threads"] !message *** Doing threads TCL_THREADS = 1 !else TCL_THREADS = 0 !endif -!if ![echo $(OPTS) | find /i "symbols" > nul] +!if [nmakehlp -f $(OPTS) "symbols"] !message *** Doing symbols DEBUG = 1 !else DEBUG = 0 !endif -!if ![echo $(OPTS) | find /i "profile" > nul] +!if [nmakehlp -f $(OPTS) "profile"] !message *** Doing profile PROFILE = 1 !else PROFILE = 0 !endif +!if [nmakehlp -f $(OPTS) "loimpact"] +!message *** Doing loimpact +LOIMPACT = 1 +!else +LOIMPACT = 0 +!endif !endif !if !$(STATIC_BUILD) # Make sure we don't build overly fat DLLs. MSVCRT = 1 -# Shouldn't statically put the extensions inside the shell when dynamic. +# We shouldn't statically put the extensions inside the shell when dynamic. TCL_LINKWITHEXTENSIONS = 0 !endif @@ -140,25 +207,22 @@ OUT_DIR = $(TMP_DIR) !endif !endif -!message *** Intermediate directory will be '$(TMP_DIR)' -!message *** Output directory will be '$(OUT_DIR)' -!message *** Suffix for binaries will be '$(SUFX)' - #---------------------------------------------------------- # Decode the statistics requested. #---------------------------------------------------------- -!if "$(STATS)" == "" || ![echo $(STATS) | find /i "none" > nul] + +!if "$(STATS)" == "" || [nmakehlp -f "$(STATS)" "none"] TCL_MEM_DEBUG = 0 TCL_COMPILE_DEBUG = 0 !else -!if ![echo $(STATS) | find /i "memdbg" > nul] +!if [nmakehlp -f $(STATS) "memdbg"] !message *** Doing memdbg TCL_MEM_DEBUG = 1 !else TCL_MEM_DEBUG = 0 !endif -!if ![echo $(STATS) | find /i "compdbg" > nul] +!if [nmakehlp -f $(STATS) "compdbg"] !message *** Doing compdbg TCL_COMPILE_DEBUG = 1 !else @@ -166,6 +230,11 @@ TCL_COMPILE_DEBUG = 0 !endif !endif + +#---------------------------------------------------------- +# Set our defines armed with our options. +#---------------------------------------------------------- + OPTDEFINES = !if $(TCL_MEM_DEBUG) OPTDEFINES = -DTCL_MEM_DEBUG @@ -180,6 +249,14 @@ OPTDEFINES = $(OPTDEFINES) -DTCL_THREADS=1 OPTDEFINES = $(OPTDEFINES) -DSTATIC_BUILD !endif + +#---------------------------------------------------------- +# Display stats being used. +#---------------------------------------------------------- + +!message *** Intermediate directory will be '$(TMP_DIR)' +!message *** Output directory will be '$(OUT_DIR)' +!message *** Suffix for binaries will be '$(SUFX)' !message *** Optional defines are '$(OPTDEFINES)' !endif |