Attachment "changes.diff" to
ticket [456759ffff]
added by
lloydlim
2001-08-30 12:42:34.
--- makefile.vc.old Mon Jul 9 11:47:02 2001
+++ makefile.vc Wed Aug 29 22:23:27 2001
@@ -69,8 +69,11 @@
# Uncomment the following line to compile with thread support
#THREADDEFINES = -DTCL_THREADS=1
-# Set NODEBUG to 0 to compile with symbols
-NODEBUG = 1
+# Set DEBUG to 1 to compile with symbols
+DEBUG = 0
+
+# Set STATIC_BUILD to 1 to build a static library
+STATIC_BUILD = 0
# The following defines can be used to control the amount of debugging
# code that is added to the compilation.
@@ -100,33 +103,43 @@
VERSION = 83
BINROOT = .
-!IF "$(NODEBUG)" == "1"
-TMPDIRNAME = Release
-DBGX =
-!ELSE
-TMPDIRNAME = Debug
-DBGX = d
-!ENDIF
+
+!if $(DEBUG)
+TMPDIRNAME = Debug
+DBGX = d
+!else
+TMPDIRNAME = Release
+DBGX =
+!endif
+
+!if $(STATIC_BUILD)
+STCX = s
+!else
+STCX =
+!endif
+
TMPDIR = $(BINROOT)\$(TMPDIRNAME)
OUTDIRNAME = $(TMPDIRNAME)
OUTDIR = $(TMPDIR)
-TCLLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)$(DBGX).lib
+TCLLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)$(STCX)$(DBGX).lib
TCLDLLNAME = $(NAMEPREFIX)$(VERSION)$(DBGX).dll
TCLDLL = $(OUTDIR)\$(TCLDLLNAME)
-TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION)$(DBGX).lib
+TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION)$(STCX)$(DBGX).lib
TCLSTUBLIB = $(OUTDIR)\$(TCLSTUBLIBNAME)
TCLPLUGINLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)p$(DBGX).lib
TCLPLUGINDLLNAME= $(NAMEPREFIX)$(VERSION)p$(DBGX).dll
TCLPLUGINDLL = $(OUTDIR)\$(TCLPLUGINDLLNAME)
-TCLSH = $(OUTDIR)\$(NAMEPREFIX)sh$(VERSION)$(DBGX).exe
+TCLSH = $(OUTDIR)\$(NAMEPREFIX)sh$(VERSION)$(STCX)$(DBGX).exe
TCLSHP = $(OUTDIR)\$(NAMEPREFIX)shp$(VERSION)$(DBGX).exe
TCLPIPEDLLNAME = $(NAMEPREFIX)pip$(VERSION)$(DBGX).dll
TCLPIPEDLL = $(OUTDIR)\$(TCLPIPEDLLNAME)
+TCLREGLIB = $(OUTDIR)\$(NAMEPREFIX)reg$(VERSION)$(STCX)$(DBGX).lib
TCLREGDLLNAME = $(NAMEPREFIX)reg$(VERSION)$(DBGX).dll
TCLREGDLL = $(OUTDIR)\$(TCLREGDLLNAME)
+TCLDDELIB = $(OUTDIR)\$(NAMEPREFIX)dde$(VERSION)$(STCX)$(DBGX).lib
TCLDDEDLLNAME = $(NAMEPREFIX)dde$(VERSION)$(DBGX).dll
TCLDDEDLL = $(OUTDIR)\$(TCLDDEDLLNAME)
TCLTEST = $(OUTDIR)\$(NAMEPREFIX)test.exe
@@ -242,7 +255,7 @@
# Compile flags
######################################################################
-!IF "$(NODEBUG)" == "1"
+!IF !$(DEBUG)
# This cranks the optimization level to maximize speed
cdebug = -O2 -Gs -GD
!ELSE IF "$(MACHINE)" == "IA64"
@@ -252,10 +265,15 @@
!ENDIF
# declarations common to all compiler options
+!IF $(STATIC_BUILD)
+cflags = -c -W3 -nologo -Fp$(TMPDIR)\ -YX -DSTATIC_BUILD=1
+cvars = -MT$(DBGX)
+!ELSE
cflags = -c -W3 -nologo -Fp$(TMPDIR)\ -YX
-cvarsdll = -MD$(DBGX)
+cvars = -MD$(DBGX)
+!ENDIF
-TCL_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) \
+TCL_CFLAGS = $(cdebug) $(cflags) $(cvars) $(include32) \
$(TCL_INCLUDES) $(TCL_DEFINES)
CON_CFLAGS = $(cdebug) $(cflags) $(include32) -DCONSOLE
@@ -263,10 +281,10 @@
# Link flags
######################################################################
-!IF "$(NODEBUG)" == "1"
-ldebug = /RELEASE
-!ELSE
+!IF $(DEBUG)
ldebug = -debug:full -debugtype:cv
+!ELSE
+ldebug = /RELEASE
!ENDIF
# declarations common to all linker options
@@ -287,10 +305,10 @@
guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup
!IF "$(MACHINE)" == "PPC"
-libc = libc$(DBGX).lib
+libc = libcmt$(DBGX).lib
libcdll = crtdll$(DBGX).lib
!ELSE
-libc = libc$(DBGX).lib oldnames.lib
+libc = libcmt$(DBGX).lib oldnames.lib
libcdll = msvcrt$(DBGX).lib oldnames.lib
!ENDIF
@@ -302,12 +320,24 @@
guilibsdll = $(libcdll) $(winlibs)
conlibsdll = $(libcdll) $(baselibs)
+!if $(STATIC_BUILD)
+TCLSHLIBS = $(guilibs)
+TCLTESTLIBS = $(conlibs)
+!else
+TCLSHLIBS = $(conlibsdll)
+TCLTESTLIBS = $(conlibsdll)
+!endif
+
######################################################################
# Project specific targets
######################################################################
release: setup $(TCLSH) dlls
+!if $(STATIC_BUILD)
+dlls: setup $(TCLPIPEDLL) $(TCLREGLIB) $(TCLDDELIB)
+!else
dlls: setup $(TCLPIPEDLL) $(TCLREGDLL) $(TCLDDEDLL)
+!endif
all: setup $(TCLSH) dlls $(CAT32)
tcltest: setup $(TCLTEST) dlls $(CAT32)
plugin: setup $(TCLPLUGINDLL) $(TCLSHP)
@@ -320,7 +350,12 @@
@$(MKDIR) $(TMPDIR)
@$(MKDIR) $(OUTDIR)
+!if $(STATIC_BUILD)
+$(TCLLIB): $(TCLOBJS) $(TMPDIR)\tcl.res
+ $(lib32) -nologo -out:$@ $(TCLOBJS) $(TMPDIR)\tcl.res
+!else
$(TCLLIB): $(TCLDLL)
+!endif
$(TCLDLL): $(TCLOBJS) $(TMPDIR)\tcl.res
$(link32) $(ldebug) $(dlllflags) \
@@ -329,7 +364,7 @@
<<
$(TCLSTUBLIB): $(TCLSTUBOBJS)
- $(lib32) /out:$@ $(TCLSTUBOBJS)
+ $(lib32) -nologo -out:$@ $(TCLSTUBOBJS)
$(TCLPLUGINLIB): $(TCLPLUGINDLL)
@@ -341,7 +376,7 @@
$(TCLSH): $(TCLSHOBJS) $(TCLLIB) $(TMPDIR)\tclsh.res
$(link32) $(ldebug) $(conlflags) $(TMPDIR)\tclsh.res -stack:2300000 \
- -out:$@ $(conlibsdll) $(TCLLIB) $(TCLSHOBJS)
+ -out:$@ $(TCLSHLIBS) $(TCLLIB) $(TCLSHOBJS)
$(TCLSHP): $(TCLSHOBJS) $(TCLPLUGINLIB) $(TMPDIR)\tclsh.res
$(link32) $(ldebug) $(conlflags) $(TMPDIR)\tclsh.res -stack:2300000 \
@@ -349,16 +384,22 @@
$(TCLTEST): $(TCLTESTOBJS) $(TCLLIB) $(TMPDIR)\tclsh.res
$(link32) $(ldebug) $(conlflags) $(TMPDIR)\tclsh.res -stack:2300000 \
- -out:$@ $(conlibsdll) $(TCLLIB) $(TCLTESTOBJS)
+ -out:$@ $(TCLTESTLIBS) $(TCLLIB) $(TCLTESTOBJS)
$(TCLPIPEDLL): $(WINDIR)\stub16.c
$(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $(WINDIR)\stub16.c
$(link32) $(ldebug) $(conlflags) -out:$@ $(TMPDIR)\stub16.obj $(guilibs)
+$(TCLDDELIB): $(TMPDIR)\tclWinDde.obj $(TCLLIB)
+ $(lib32) -nologo -out:$@ $(TMPDIR)\tclWinDde.obj $(TCLLIB)
+
$(TCLDDEDLL): $(TMPDIR)\tclWinDde.obj $(TCLSTUBLIB)
$(link32) $(ldebug) $(dlllflags) -out:$@ $(TMPDIR)\tclWinDde.obj \
$(conlibsdll) $(TCLSTUBLIB)
+$(TCLREGLIB): $(TMPDIR)\tclWinReg.obj $(TCLLIB)
+ $(lib32) -nologo -out:$@ $(TMPDIR)\tclWinReg.obj $(TCLLIB)
+
$(TCLREGDLL): $(TMPDIR)\tclWinReg.obj $(TCLSTUBLIB)
$(link32) $(ldebug) $(dlllflags) -out:$@ $(TMPDIR)\tclWinReg.obj \
$(conlibsdll) $(TCLSTUBLIB)
@@ -530,20 +571,14 @@
{$(WINDIR)}.rc{$(TMPDIR)}.res:
$(rc32) -fo $@ -r -i $(GENERICDIR) -i $(WINDIR) -D__WIN32__ \
$(TCL_DEFINES) \
-!if "$(NODEBUG)" == "0"
+!if !$(DEBUG)
-d DEBUG \
!endif
+!if $(STATIC_BUILD)
+ -d STATIC_BUILD \
+!endif
$<
clean:
- -@$(RM) $(OUTDIR)\*.exp
- -@$(RM) $(OUTDIR)\*.lib
- -@$(RM) $(OUTDIR)\*.dll
- -@$(RM) $(OUTDIR)\*.exe
- -@$(RM) $(OUTDIR)\*.pdb
- -@$(RM) $(TMPDIR)\*.pch
- -@$(RM) $(TMPDIR)\*.obj
- -@$(RM) $(TMPDIR)\*.res
- -@$(RM) $(TMPDIR)\*.exe
-@$(RMDIR) $(OUTDIR)
-@$(RMDIR) $(TMPDIR)
--- mkd.bat.old Mon Jul 9 11:47:02 2001
+++ mkd.bat Wed Aug 29 22:06:28 2001
@@ -1,20 +1,11 @@
@echo off
rem RCS: @(#) $Id: mkd.bat,v 1.1.1.1 2001/07/09 18:47:02 lim Exp $
-if exist %1\. goto end
+if exist %1\nul goto end
-if "%OS%" == "Windows_NT" goto winnt
-
-md %1
-if errorlevel 1 goto end
-
-goto success
-
-:winnt
md %1
if errorlevel 1 goto end
-:success
echo created directory %1
:end
--- rmd.bat.old Mon Jul 9 11:47:02 2001
+++ rmd.bat Wed Aug 29 22:06:28 2001
@@ -1,22 +1,18 @@
@echo off
rem RCS: @(#) $Id: rmd.bat,v 1.1.1.1 2001/07/09 18:47:02 lim Exp $
-if not exist %1\. goto end
+if not exist %1\nul goto end
echo Removing directory %1
if "%OS%" == "Windows_NT" goto winnt
-cd %1
-if errorlevel 1 goto end
-del *.*
-cd ..
-rmdir %1
+deltree /y %1
if errorlevel 1 goto end
goto success
:winnt
-rmdir %1 /s /q
+rmdir /s /q %1
if errorlevel 1 goto end
:success