*** win/makefile.vc.orig	Sat Jul 31 04:31:57 1999
--- win/makefile.vc	Sun Jan 16 17:44:47 2000
***************
*** 1,4 ****
! # Visual C++ 2.x and 4.0 makefile
  #
  # See the file "license.terms" for information on usage and redistribution
  # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
--- 1,4 ----
! # Visual C++ 2.x, 4.x, 5.0 and 6.0 makefile
  #
  # See the file "license.terms" for information on usage and redistribution
  # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
***************
*** 24,45 ****
  #
  # TCLDIR = location of top of Tcl source heirarchy
  #
  
  ROOT		= ..
! TOOLS32		= c:\program files\devstudio\vc
  TOOLS32_rc	= c:\program files\devstudio\sharedide
! TCLDIR		= ..\..\tcl8.2
  INSTALLDIR      = c:\program files\tcl
  
  # Set this to the appropriate value of /MACHINE: for your platform
  MACHINE	= IX86
  
  # Uncomment the following line to compile with thread support
! #THREADDEFINES = -DTCL_THREADS=1
  
  # Set NODEBUG to 0 to compile with symbols
  NODEBUG = 1
  
  # uncomment the following two lines to compile with TCL_MEM_DEBUG
  #DEBUGDEFINES	=-DTCL_MEM_DEBUG
  
--- 24,56 ----
  #
  # TCLDIR = location of top of Tcl source heirarchy
  #
+ # INSTALLDIR = where the install- targets should copy the binaries and
+ #           support files
+ #
  
  ROOT		= ..
! #TOOLS32 	= c:\msdev                                                 # VC++ 2.x,4.x
! #TOOLS32_rc	= c:\msdev
! TOOLS32		= c:\program files\devstudio\vc                            # VC++ 5.x
  TOOLS32_rc	= c:\program files\devstudio\sharedide
! #TOOLS32 	= c:\program files\microsoft visual studio\vc98            # VC++ 6.x
! #TOOLS32_rc	= c:\program files\microsoft visual studio\common\msdev98
! TCLDIR		= ..\..\tcl8.2.3
  INSTALLDIR      = c:\program files\tcl
  
  # Set this to the appropriate value of /MACHINE: for your platform
  MACHINE	= IX86
  
  # Uncomment the following line to compile with thread support
! THREADDEFINES = -DTCL_THREADS=1
  
  # Set NODEBUG to 0 to compile with symbols
  NODEBUG = 1
  
+ # Set NOSTATIC to 0 to compile as static libraries
+ NOSTATIC = 1
+ 
+ 
  # uncomment the following two lines to compile with TCL_MEM_DEBUG
  #DEBUGDEFINES	=-DTCL_MEM_DEBUG
  
***************
*** 58,69 ****
  
  
  BINROOT		= .
  !IF "$(NODEBUG)" == "1"
! TMPDIRNAME	= Release
! DBGX		=
  !ELSE
! TMPDIRNAME	= Debug
! DBGX		= d
  !ENDIF
  TMPDIR		= $(BINROOT)\$(TMPDIRNAME)
  OUTDIRNAME	= $(TMPDIRNAME)
--- 69,85 ----
  
  
  BINROOT		= .
+ !IF "$(NOSTATIC)" == "1"
+ S		=
+ !ELSE
+ S		= s
+ !ENDIF
  !IF "$(NODEBUG)" == "1"
! TMPDIRNAME	= Release$(S)
! DBGX		= $(S)
  !ELSE
! TMPDIRNAME	= Debug$(S)
! DBGX		= $(S)d
  !ENDIF
  TMPDIR		= $(BINROOT)\$(TMPDIRNAME)
  OUTDIRNAME	= $(TMPDIRNAME)
***************
*** 75,80 ****
--- 91,103 ----
  TKDLLNAME	= $(TKNAMEPREFIX)$(VERSION)$(DBGX).dll
  TKDLL 		= $(OUTDIR)\$(TKDLLNAME)
  TKLIB 		= $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)$(DBGX).lib
+ TKLIBS 		= $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)s$(DBGX).lib
+ TESTDLLNAME	= $(TKNAMEPREFIX)test.dll
+ TESTDLL 	= $(OUTDIR)\$(TESTDLLNAME)
+ TKPTESTDLLNAME	= $(TKNAMEPREFIX)ptest.dll
+ TKPTESTDLL 	= $(OUTDIR)\$(TKPTESTDLLNAME)
+ SQUAREDLLNAME	= $(TKNAMEPREFIX)square.dll
+ SQUAREDLL	= $(OUTDIR)\$(SQUAREDLLNAME)
  TKSTUBLIBNAME	= $(TKSTUBPREFIX)$(VERSION)$(DBGX).lib
  TKSTUBLIB	= $(OUTDIR)\$(TKSTUBLIBNAME)
  TKPLUGINDLLNAME	= $(TKNAMEPREFIX)$(VERSION)p$(DBG).dll
***************
*** 92,101 ****
--- 115,129 ----
  INCLUDE_INSTALL_DIR = $(INSTALLDIR)\include
  LIB_INSTALL_DIR = $(INSTALLDIR)\lib
  SCRIPT_INSTALL_DIR = $(LIB_INSTALL_DIR)\tk$(DOTVERSION)
+ X11_INCLUDE_INSTALL_DIR = $(INCLUDE_INSTALL_DIR)\X11
+ DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget
  
  WISHOBJS = \
  	$(TMPDIR)\winMain.obj
  
+ WISHSAOBJS = \
+ 	$(TMPDIR)\winMainSA.obj
+ 
  TKTESTOBJS = \
  	$(TMPDIR)\tkTest.obj \
  	$(TMPDIR)\tkSquare.obj \
***************
*** 111,121 ****
  
  TKOBJS = \
  	$(TMPDIR)\tkConsole.obj \
  	$(TMPDIR)\tkUnixMenubu.obj \
  	$(TMPDIR)\tkUnixScale.obj \
  	$(XLIBOBJS) \
  	$(TMPDIR)\tkWin3d.obj \
- 	$(TMPDIR)\tkWin32Dll.obj \
  	$(TMPDIR)\tkWinButton.obj \
  	$(TMPDIR)\tkWinClipboard.obj \
  	$(TMPDIR)\tkWinColor.obj \
--- 139,149 ----
  
  TKOBJS = \
  	$(TMPDIR)\tkConsole.obj \
+ 	$(TMPDIR)\tkMain.obj \
  	$(TMPDIR)\tkUnixMenubu.obj \
  	$(TMPDIR)\tkUnixScale.obj \
  	$(XLIBOBJS) \
  	$(TMPDIR)\tkWin3d.obj \
  	$(TMPDIR)\tkWinButton.obj \
  	$(TMPDIR)\tkWinClipboard.obj \
  	$(TMPDIR)\tkWinColor.obj \
***************
*** 180,186 ****
  	$(TMPDIR)\tkImgUtil.obj \
  	$(TMPDIR)\tkListbox.obj \
  	$(TMPDIR)\tkMacWinMenu.obj \
- 	$(TMPDIR)\tkMain.obj \
  	$(TMPDIR)\tkMenu.obj \
  	$(TMPDIR)\tkMenubutton.obj \
  	$(TMPDIR)\tkMenuDraw.obj \
--- 208,213 ----
***************
*** 210,216 ****
  	$(TMPDIR)\tkStubLib.obj \
  	$(TMPDIR)\tkWindow.obj
  
! TKSTUBOBJS = $(TMPDIR)\tkStubLib.obj \
  
  
  cc32		= "$(TOOLS32)\bin\cl.exe"
--- 237,247 ----
  	$(TMPDIR)\tkStubLib.obj \
  	$(TMPDIR)\tkWindow.obj
  
! TKDLLOBJS = \
! 	$(TKOBJS) \
! 	$(TMPDIR)\tkWin32Dll.obj
! 
! TKSTUBOBJS = $(TMPDIR)\tkStubLib.obj
  
  
  cc32		= "$(TOOLS32)\bin\cl.exe"
***************
*** 221,237 ****
  
  WINDIR          = $(ROOT)\win
  GENERICDIR	= $(ROOT)\generic
  XLIBDIR		= $(ROOT)\xlib
  BITMAPDIR	= $(ROOT)\bitmaps
  TCLLIBDIR       = $(TCLDIR)\win\$(OUTDIRNAME)
  RCDIR		= $(WINDIR)\rc
  
  TK_INCLUDES	= -I$(WINDIR) -I$(GENERICDIR) -I$(BITMAPDIR) -I$(XLIBDIR) \
  			-I$(TCLDIR)\generic
  TK_DEFINES	= -D__WIN32__ $(DEBUGDEFINES) $(THREADDEFINES)
  
  TK_CFLAGS	= $(cdebug) $(cflags) $(cvarsdll) $(include32) \
! 			$(TK_INCLUDES) $(TK_DEFINES) -DUSE_TCL_STUBS
  
  WISH_CFLAGS	= $(cdebug) $(cflags) $(cvarsdll) $(include32) \
  			$(TK_INCLUDES) $(TK_DEFINES)
--- 252,275 ----
  
  WINDIR          = $(ROOT)\win
  GENERICDIR	= $(ROOT)\generic
+ LIBDIR		= $(ROOT)\library
  XLIBDIR		= $(ROOT)\xlib
  BITMAPDIR	= $(ROOT)\bitmaps
  TCLLIBDIR       = $(TCLDIR)\win\$(OUTDIRNAME)
  RCDIR		= $(WINDIR)\rc
  
+ !IF "$(NOSTATIC)" == "1"
+ cstatic = -DUSE_TCL_STUBS
+ !ELSE
+ cstatic =
+ !ENDIF
+ 
  TK_INCLUDES	= -I$(WINDIR) -I$(GENERICDIR) -I$(BITMAPDIR) -I$(XLIBDIR) \
  			-I$(TCLDIR)\generic
  TK_DEFINES	= -D__WIN32__ $(DEBUGDEFINES) $(THREADDEFINES)
  
  TK_CFLAGS	= $(cdebug) $(cflags) $(cvarsdll) $(include32) \
! 			$(TK_INCLUDES) $(TK_DEFINES) $(cstatic)
  
  WISH_CFLAGS	= $(cdebug) $(cflags) $(cvarsdll) $(include32) \
  			$(TK_INCLUDES) $(TK_DEFINES)
***************
*** 280,292 ****
  ######################################################################
  
  !IF "$(NODEBUG)" == "1"
! !IF "$(MACHINE)" == "ALPHA"
! # MSVC on Alpha doesn't understand -Ot
! cdebug = -O2i -Gs -GD
! !ELSE
! # NOTE: Due to a bug in MSVC, we cannot use -O2 here or Tk starts to misbehave.
! cdebug = -Oti -Gs -GD
! !ENDIF
  !ELSE
  cdebug = -Z7 -Od -WX
  !ENDIF
--- 318,324 ----
  ######################################################################
  
  !IF "$(NODEBUG)" == "1"
! cdebug = -Ox -Oy- -GD
  !ELSE
  cdebug = -Z7 -Od -WX
  !ENDIF
***************
*** 326,332 ****
  # Project specific targets
  ######################################################################
  
! all:    setup $(WISH) $(CAT32)
  install: install-binaries install-libraries
  plugin:	setup $(TKPLUGINDLL) $(WISHP)
  tktest: setup $(TKTEST) $(CAT32)
--- 358,364 ----
  # Project specific targets
  ######################################################################
  
! all:    setup $(WISH) $(TKLIBS) $(CAT32)
  install: install-binaries install-libraries
  plugin:	setup $(TKPLUGINDLL) $(WISHP)
  tktest: setup $(TKTEST) $(CAT32)
***************
*** 355,362 ****
--- 387,396 ----
  	@mkd "$(BIN_INSTALL_DIR)"
  	copy $(TKDLL) "$(BIN_INSTALL_DIR)"
  	copy $(WISH) "$(BIN_INSTALL_DIR)"
+ 	-copy $(WISHSA) "$(BIN_INSTALL_DIR)"
  	@mkd "$(LIB_INSTALL_DIR)"
  	copy $(TKLIB) "$(LIB_INSTALL_DIR)"
+ 	copy $(TKLIBS) "$(LIB_INSTALL_DIR)"
  
  install-libraries:
  	@mkd "$(INCLUDE_INSTALL_DIR)"
***************
*** 379,390 ****
  $(TKSTUBLIB): $(TKSTUBOBJS)
          $(lib32) /out:$@ $(TKSTUBOBJS)
  
! $(TKDLL): $(TKOBJS) $(TMPDIR)\tk.res $(TMPDIR)\tk.def
  	set LIB=$(TOOLS32)\lib
         $(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\tk.def \
  		-out:$@ $(TMPDIR)\tk.res $(TCLLIBDIR)\$(TCLSTUBLIB) \
  		$(guilibsdll) @<<
! 			$(TKOBJS)
  <<
  
  $(TKPLUGINLIB): $(TKPLUGINDLL)
--- 413,430 ----
  $(TKSTUBLIB): $(TKSTUBOBJS)
          $(lib32) /out:$@ $(TKSTUBOBJS)
  
! $(TKDLL): $(TKDLLOBJS) $(TMPDIR)\tk.res $(TMPDIR)\tk.def
  	set LIB=$(TOOLS32)\lib
         $(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\tk.def \
  		-out:$@ $(TMPDIR)\tk.res $(TCLLIBDIR)\$(TCLSTUBLIB) \
  		$(guilibsdll) @<<
! 			$(TKDLLOBJS)
! <<
! 
! $(TKLIBS): $(TKOBJS)
!       @del $(TKLIBS)
!         $(lib32) -out:$(TKLIBS) @<<
!                $(TKOBJS)
  <<
  
  $(TKPLUGINLIB): $(TKPLUGINDLL)
***************
*** 413,428 ****
  		$(guilibsdll) $(TCLLIBDIR)\$(TCLPLUGINLIB) \
  		$(TKPLUGINLIB) $(WISHOBJS) 
  
! $(TKTEST): $(TKTESTOBJS) $(TKLIB) $(TMPDIR)\wish.res
  	set LIB=$(TOOLS32)\lib
! 	$(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -out:$@ \
! 		$(guilibsdll) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB) $(TKTESTOBJS)
  
  $(TMPDIR)\tk.def: $(DUMPEXTS) $(TKOBJS)
  	$(DUMPEXTS) -o $@ $(TKDLLNAME) @<<
  		$(TKOBJS)
  <<
  
  $(TMPDIR)\plugin.def: $(DUMPEXTS) $(TKOBJS)
  	$(DUMPEXTS) -o $@ $(TKPLUGINDLLNAME) @<<
  		$(TKOBJS)
--- 453,503 ----
  		$(guilibsdll) $(TCLLIBDIR)\$(TCLPLUGINLIB) \
  		$(TKPLUGINLIB) $(WISHOBJS) 
  
! $(TESTDLL): $(TMPDIR)\tkTest.obj $(TMPDIR)\tkWinDllEntry.obj $(TKLIB) $(TCLLIBDIR)\$(TCLLIB) $(TMPDIR)\tktest.def
  	set LIB=$(TOOLS32)\lib
! 	$(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\tktest.def \
! 		-out:$@ $(TKLIB) $(TCLLIBDIR)\$(TCLLIB) \
! 		$(guilibsdll) @<<
! 			$(TMPDIR)\tkTest.obj $(TMPDIR)\tkWinDllEntry.obj
! <<
! 
! $(TKPTESTDLL): $(TMPDIR)\tkWinTest.obj $(TMPDIR)\tkWinDllEntry.obj $(TKSTUBLIB) $(TCLLIBDIR)\$(TCLSTUBLIB) $(TMPDIR)\tkptest.def
! 	set LIB=$(TOOLS32)\lib
! 	$(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\tkptest.def \
! 		-out:$@ $(TKSTUBLIB) $(TCLLIBDIR)\$(TCLSTUBLIB) \
! 		$(guilibsdll) @<<
! 			$(TMPDIR)\tkWinTest.obj $(TMPDIR)\tkWinDllEntry.obj
! <<
! 
! $(SQUAREDLL): $(TMPDIR)\tkSquare.obj $(TMPDIR)\tkWinDllEntry.obj $(TKSTUBLIB) $(TCLLIBDIR)\$(TCLSTUBLIB) $(TMPDIR)\tksquare.def
! 	set LIB=$(TOOLS32)\lib
! 	$(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\tksquare.def \
! 		-out:$@ $(TKSTUBLIB) $(TCLLIBDIR)\$(TCLSTUBLIB) \
! 		$(guilibsdll) @<<
! 			$(TMPDIR)\tkSquare.obj $(TMPDIR)\tkWinDllEntry.obj
! <<
! 
  
  $(TMPDIR)\tk.def: $(DUMPEXTS) $(TKOBJS)
  	$(DUMPEXTS) -o $@ $(TKDLLNAME) @<<
  		$(TKOBJS)
  <<
  
+ $(TMPDIR)\tktest.def: $(DUMPEXTS) $(TMPDIR)\tkTest.obj
+ 	$(DUMPEXTS) -o $@ $(TESTDLLNAME) @<<
+ 		$(TMPDIR)\tkTest.obj
+ <<
+ 
+ $(TMPDIR)\tkptest.def: $(DUMPEXTS) $(TMPDIR)\tkWinTest.obj
+ 	$(DUMPEXTS) -o $@ $(TESTDLLNAME) @<<
+ 		$(TMPDIR)\tkWinTest.obj
+ <<
+ 
+ $(TMPDIR)\tksquare.def: $(DUMPEXTS) $(TMPDIR)\tkSquare.obj
+ 	$(DUMPEXTS) -o $@ $(SQUAREDLLNAME) @<<
+ 		$(TMPDIR)\tkSquare.obj
+ <<
+ 
  $(TMPDIR)\plugin.def: $(DUMPEXTS) $(TKOBJS)
  	$(DUMPEXTS) -o $@ $(TKPLUGINDLLNAME) @<<
  		$(TKOBJS)
***************
*** 451,464 ****
  # Special case object file targets
  #
  
- $(TMPDIR)\testMain.obj: $(ROOT)\win\winMain.c
- 	$(cc32) $(WISH_CFLAGS) -DTK_TEST -Fo$@ $?
- 
  $(TMPDIR)\tkTest.obj: $(ROOT)\generic\tkTest.c
! 	$(cc32) $(WISH_CFLAGS) -Fo$@ $?
  
  $(TMPDIR)\tkSquare.obj: $(ROOT)\generic\tkSquare.c
! 	$(cc32) $(WISH_CFLAGS) -Fo$@ $?
  
  $(TMPDIR)\winMain.obj: $(ROOT)\win\winMain.c
  	$(cc32) $(WISH_CFLAGS) -Fo$@ $?
--- 526,539 ----
  # Special case object file targets
  #
  
  $(TMPDIR)\tkTest.obj: $(ROOT)\generic\tkTest.c
! 	$(cc32) $(TK_CFLAGS) -DUSE_TK_STUBS -Fo$@ $?
! 
! $(TMPDIR)\tkWinTest.obj: $(ROOT)\win\tkWinTest.c
! 	$(cc32) $(TK_CFLAGS) -DUSE_TK_STUBS -Fo$@ $?
  
  $(TMPDIR)\tkSquare.obj: $(ROOT)\generic\tkSquare.c
! 	$(cc32) $(TK_CFLAGS) -DUSE_TK_STUBS -Fo$@ $?
  
  $(TMPDIR)\winMain.obj: $(ROOT)\win\winMain.c
  	$(cc32) $(WISH_CFLAGS) -Fo$@ $?
***************
*** 471,486 ****
  #
  
  {$(XLIBDIR)}.c{$(TMPDIR)}.obj:
! 	$(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -Fo$(TMPDIR)\ $<
  
  {$(GENERICDIR)}.c{$(TMPDIR)}.obj:
! 	$(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -Fo$(TMPDIR)\ $<
  
  {$(WINDIR)}.c{$(TMPDIR)}.obj:
! 	$(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -Fo$(TMPDIR)\ $<
  
  {$(ROOT)\unix}.c{$(TMPDIR)}.obj:
! 	$(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -Fo$(TMPDIR)\ $<
  
  {$(RCDIR)}.rc{$(TMPDIR)}.res:
  	$(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TOOLS32)\include" \
--- 546,561 ----
  #
  
  {$(XLIBDIR)}.c{$(TMPDIR)}.obj:
! 	$(cc32) $(TK_CFLAGS) -DSTATIC_BUILD -Fo$(TMPDIR)\ $<
  
  {$(GENERICDIR)}.c{$(TMPDIR)}.obj:
! 	$(cc32) $(TK_CFLAGS) -DSTATIC_BUILD -Fo$(TMPDIR)\ $<
  
  {$(WINDIR)}.c{$(TMPDIR)}.obj:
! 	$(cc32) $(TK_CFLAGS) -DSTATIC_BUILD -Fo$(TMPDIR)\ $<
  
  {$(ROOT)\unix}.c{$(TMPDIR)}.obj:
! 	$(cc32) $(TK_CFLAGS) -DSTATIC_BUILD -Fo$(TMPDIR)\ $<
  
  {$(RCDIR)}.rc{$(TMPDIR)}.res:
  	$(rc32) -fo $@ -r -i "$(GENERICDIR)" -i "$(TOOLS32)\include" \
