diff options
-rw-r--r-- | win/makefile.vc | 48 | ||||
-rw-r--r-- | win/rules.vc | 25 |
2 files changed, 43 insertions, 30 deletions
diff --git a/win/makefile.vc b/win/makefile.vc index c6fee5f..1ecb1fd 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,7 +12,7 @@ # Copyright (c) 2001-2002 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.97 2002/12/18 22:47:01 davygrvy Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.98 2003/01/05 00:44:24 davygrvy Exp $ #------------------------------------------------------------------------------ !if "$(MSVCDIR)" == "" @@ -25,7 +25,7 @@ the environment. Jump to this line to read the new instructions. #------------------------------------------------------------------------------ # HOW TO USE this makefile: # -# 1) It is now necessary to have MSVCDir set in the environment. This is used +# 1) It is now necessary to have %MSVCDir% set in the environment. This is used # as a check to see if vcvars32.bat had been run prior to running nmake or # during the installation of Microsoft Visual C++, MSVCDir had been set # globally and the PATH adjusted. Either way is valid. @@ -64,7 +64,7 @@ the environment. Jump to this line to read the new instructions. # Sets where to install Tcl from the built binaries. # C:\Progra~1\Tcl is assumed when not specified. # -# OPTS=static,msvcrt,linkexten,threads,symbols,profile,loimpact,none +# OPTS=static,msvcrt,staticpkg,threads,symbols,profile,loimpact,none # Sets special options for the core. The default is for none. # Any combination of the above may be used (comma separated). # 'none' will over-ride everything to nothing. @@ -75,10 +75,11 @@ the environment. Jump to this line to read the new instructions. # using libcmt(d) as the C runtime [by default] to # msvcrt(d). This is useful for static embedding # support. -# linkexten = Effects the static option only to switch +# staticpkg = Effects the static option only to switch # tclshXX.exe to have the dde and reg extension linked # inside it. # threads = Turns on full multithreading support. +# thrdalloc = Use the thread allocator (shared global free pool). # symbols = Adds symbols for step debugging. # profile = Adds profiling hooks. Map file is assumed. # loimpact = Adds a flag for how NT treats the heap to keep memory @@ -188,7 +189,6 @@ TCLTEST = $(OUT_DIR)\$(PROJECT)test.exe CAT32 = $(OUT_DIR)\cat32.exe ### Make sure we use backslash only. -_INSTALLDIR = $(INSTALLDIR:/=\) LIB_INSTALL_DIR = $(_INSTALLDIR)\lib BIN_INSTALL_DIR = $(_INSTALLDIR)\bin DOC_INSTALL_DIR = $(_INSTALLDIR)\doc @@ -340,11 +340,6 @@ cflags = $(cflags) -QI0f cflags = $(cflags) -QIA64_Bx !endif -### Turn on the thread allocator, too. -!if $(TCL_THREADS) -cflags = $(cflags) -DUSE_THREAD_ALLOC=1 -!endif - !if $(MSVCRT) crt = -MD$(DBGX) !else @@ -612,6 +607,7 @@ $(TMP_DIR)\tclAppInit.obj: $(WINDIR)\tclAppInit.c !endif ### The following objects should be built using the stub interfaces +### *ALL* extensions need to built with -DTCL_THREADS=1 $(TMP_DIR)\tclWinReg.obj: $(WINDIR)\tclWinReg.c !if $(STATIC_BUILD) @@ -630,7 +626,8 @@ $(TMP_DIR)\tclWinDde.obj: $(WINDIR)\tclWinDde.c ### The following objects are part of the stub library and should not -### be built as DLL objects but none of the symbols should be exported +### be built as DLL objects. -Zl is used to avoid a dependancy on any +### specific c-runtime. $(TMP_DIR)\tclStubLib.obj: $(GENERICDIR)\tclStubLib.c $(cc32) $(cdebug) $(cflags) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $? @@ -711,6 +708,8 @@ $< #--------------------------------------------------------------------- install-binaries: + @echo Installing to '$(_INSTALLDIR)' + @echo. @echo installing $(TCLLIBNAME) !if "$(TCLLIB)" != "$(TCLIMPLIB)" @$(CPY) "$(TCLLIB)" "$(BIN_INSTALL_DIR)\" @@ -781,21 +780,22 @@ install-libraries: # Clean up #--------------------------------------------------------------------- -!if "$(OS)" == "Windows_NT" -RMDIR = rmdir /S /Q -!else -RMDIR = deltree /Y -!endif - tidy: - if exist $(TCLLIB) del $(TCLLIB) - if exist $(TCLSH) del $(TCLSH) - if exist $(TCLTEST) del $(TCLTEST) - if exist $(TCLDDELIB) del $(TCLDDELIB) - if exist $(TCLREGLIB) del $(TCLREGLIB) + @echo Removing $(TCLLIB) ... + @if exist $(TCLLIB) del $(TCLLIB) + @echo Removing $(TCLSH) ... + @if exist $(TCLSH) del $(TCLSH) + @echo Removing $(TCLTEST) ... + @if exist $(TCLTEST) del $(TCLTEST) + @echo Removing $(TCLDDELIB) ... + @if exist $(TCLDDELIB) del $(TCLDDELIB) + @echo Removing $(TCLREGLIB) ... + @if exist $(TCLREGLIB) del $(TCLREGLIB) clean: - if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR) + @echo Cleaning $(TMP_DIR)\* ... + @if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR) hose: - if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR) + @echo Hosing $(OUT_DIR)\* ... + @if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR) diff --git a/win/rules.vc b/win/rules.vc index 0bc3469..583d8e9 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -10,7 +10,7 @@ # Copyright (c) 2001-2002 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.9 2002/11/04 05:50:19 davygrvy Exp $ +# RCS: @(#) $Id: rules.vc,v 1.10 2003/01/05 00:44:24 davygrvy Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -36,10 +36,12 @@ MACHINE = IX86 #---------------------------------------------------------- # Set the proper copy method to avoid overwrite questions -# to the user when copying files. +# to the user when copying files and selecting the right +# "delete all" method. #---------------------------------------------------------- !if "$(OS)" == "Windows_NT" +RMDIR = rmdir /S /Q !if ![ver | find "4.0" > nul] CPY = echo y | xcopy /i !else @@ -47,6 +49,7 @@ CPY = xcopy /i /y !endif !else CPY = xcopy /i +RMDIR = deltree /Y !endif @@ -122,6 +125,7 @@ PROFILE = 0 MSVCRT = 0 LOIMPACT = 0 TCL_USE_STATIC_PACKAGES = 0 +USE_THREAD_ALLOC = 0 !else !if [nmakehlp -f $(OPTS) "static"] !message *** Doing static @@ -135,8 +139,8 @@ MSVCRT = 1 !else MSVCRT = 0 !endif -!if [nmakehlp -f $(OPTS) "linkexten"] -!message *** Doing linkexten +!if [nmakehlp -f $(OPTS) "staticpkg"] +!message *** Doing staticpkg TCL_USE_STATIC_PACKAGES = 1 !else TCL_USE_STATIC_PACKAGES = 0 @@ -165,6 +169,12 @@ LOIMPACT = 1 !else LOIMPACT = 0 !endif +!if [nmakehlp -f $(OPTS) "thrdalloc"] +!message *** Doing thrdalloc +USE_THREAD_ALLOC = 1 +!else +USE_THREAD_ALLOC = 0 +!endif !endif @@ -253,7 +263,7 @@ TCL_COMPILE_DEBUG = 0 #---------------------------------------------------------- -# Set our defines armed with our options. +# Set our defines now armed with our options. #---------------------------------------------------------- OPTDEFINES = @@ -265,6 +275,9 @@ OPTDEFINES = $(OPTDEFINES) -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS !endif !if $(TCL_THREADS) OPTDEFINES = $(OPTDEFINES) -DTCL_THREADS=1 +!if $(USE_THREAD_ALLOC) +OPTDEFINES = $(OPTDEFINES) -DUSE_THREAD_ALLOC=1 +!endif !endif !if $(STATIC_BUILD) OPTDEFINES = $(OPTDEFINES) -DSTATIC_BUILD @@ -301,7 +314,7 @@ Don't know where tcl.h is. The TCLDIR macro doesn't appear correct. ### TODO: add a command to nmakehlp.c to grep for Tcl's version from tcl.h. ### Because nmake can't return a string, we'll need to play games with return -### codes :) It might look something like this: +### codes. It might look something like this: #!if [nmakehlp -g $(TCL.H)] == 81 #TCL_DOTVERSION = 8.1 #!elseif [nmakehlp -g $(TCL.H)] == 82 |