Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-05
08:22 • Ticket [218488ffff] add &quot;install&quot; target to windows makefile</... artifact: b5562d53a4 user: dgp
2000-10-26
08:23 • Closed ticket [218488ffff]. artifact: 2f70dd1ea0 user: welch
01:01 • New ticket [218488ffff]. artifact: fc6c1c93c4 user: nobody

add &quot;install&quot; target to windows makefile

Closed / Fixed218488ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:01:12
OriginalBugID: 705 RFE
Version: 8.2
SubmitDate: '1998-10-13'
LastModified: '1999-08-12'
Severity: MED
Status: Released
Submitter: admin
ChangedBy: hobbs
OS: All Windows
OSVersion: NA
Machine: NA
FixedDate: '1999-08-12'
FixedInVersion: NA
ClosedDate: '2000-10-25'


I propose to add a target 'install' to the windows makefiles in: 
    tk8.0.3\win\makefile.*
See my edited version for WinNT of makefile.vc in the attachment. 
---
# 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.
# 
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# SCCS: @(#) makefile.vc 1.13 98/08/20 22:10:09

# Does not depend on the presence of any environment variables in
# order to compile tk; all needed information is derived from 
# location of the compiler directories.

# 1998-09-14 Dirk Zoettl        email:[email protected]
#       added target 'install' analogous tcl8.0.3\win\makefile.vc

#
# Project directories
#
# ROOT    = top of source tree
#
# TMPDIR  = location where .obj files should be stored during build
#
# TOOLS32 = location of VC++ 32-bit development tools. Note that the
#           VC++ 2.0 header files are broken, so you need to use the
#           ones that come with the developer network CD's, or later
#           versions of VC++.
#
# TCLDIR = location of top of Tcl source heirarchy
#
# INSTALLDIR = where the install- targets should copy the binaries and
#           support files
#

ROOT            = ..
TOOLS32         = D:\Programme\DevStudio\VC
TOOLS32_rc      = D:\Programme\DevStudio\SharedIDE
TCLDIR          = D:\tcl8.0.3
INSTALLDIR      = D:\Tcl

# Set this to the appropriate value of /MACHINE: for your platform
MACHINE = IX86

# 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

######################################################################
# Do not modify below this line
######################################################################

TCLNAMEPREFIX = tcl
TKNAMEPREFIX = tk
WISHNAMEPREFIX = wish
VERSION = 80
DOTVERSION = 8.0

BINROOT         = .
!IF "$(NODEBUG)" == "1"
TMPDIRNAME      = Release
DBGX            =
!ELSE
TMPDIRNAME      = Debug
DBGX            = d
!ENDIF
TMPDIR          = $(BINROOT)\$(TMPDIRNAME)
OUTDIRNAME      = $(TMPDIRNAME)
OUTDIR          = $(TMPDIR)

TCLLIB          = $(TCLNAMEPREFIX)$(VERSION)$(DBGX).lib
TCLPLUGINLIB    = $(TCLNAMEPREFIX)$(VERSION)p.lib
TKDLLNAME       = $(TKNAMEPREFIX)$(VERSION)$(DBGX).dll
TKDLL           = $(OUTDIR)\$(TKDLLNAME)
TKLIB           = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)$(DBGX).lib
TKPLUGINDLLNAME = $(TKNAMEPREFIX)$(VERSION)p$(DBG).dll
TKPLUGINDLL     = $(OUTDIR)\$(TKPLUGINDLLNAME)
TKPLUGINLIB     = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)p$(DBGX).lib

WISH            = $(OUTDIR)\$(WISHNAMEPREFIX)$(VERSION)$(DBGX).exe
WISHP           = $(OUTDIR)\$(WISHNAMEPREFIX)p$(VERSION)$(DBGX).exe
TKTEST          = $(OUTDIR)\$(TKNAMEPREFIX)test.exe
DUMPEXTS        = $(TMPDIR)\dumpexts.exe

LIB_INSTALL_DIR = $(INSTALLDIR)\lib
BIN_INSTALL_DIR = $(INSTALLDIR)\bin
SCRIPT_INSTALL_DIR      = $(INSTALLDIR)\lib\tk$(DOTVERSION)
INCLUDE_INSTALL_DIR     = $(INSTALLDIR)\include

WISHOBJS =  $(TMPDIR)\winMain.obj

TKTESTOBJS =  $(TMPDIR)\tkTest.obj  $(TMPDIR)\tkSquare.obj  $(TMPDIR)\testMain.obj

XLIBOBJS =  $(TMPDIR)\xcolors.obj  $(TMPDIR)\xdraw.obj  $(TMPDIR)\xgc.obj  $(TMPDIR)\ximage.obj  $(TMPDIR)\xutil.obj

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  $(TMPDIR)\tkWinCursor.obj  $(TMPDIR)\tkWinDialog.obj  $(TMPDIR)\tkWinDraw.obj  $(TMPDIR)\tkWinEmbed.obj  $(TMPDIR)\tkWinFont.obj  $(TMPDIR)\tkWinImage.obj  $(TMPDIR)\tkWinInit.obj  $(TMPDIR)\tkWinKey.obj  $(TMPDIR)\tkWinMenu.obj  $(TMPDIR)\tkWinPixmap.obj  $(TMPDIR)\tkWinPointer.obj  $(TMPDIR)\tkWinRegion.obj  $(TMPDIR)\tkWinScrlbr.obj  $(TMPDIR)\tkWinSend.obj  $(TMPDIR)\tkWinWindow.obj  $(TMPDIR)\tkWinWm.obj  $(TMPDIR)\tkWinX.obj  $(TMPDIR)\stubs.obj  $(TMPDIR)\tk3d.obj  $(TMPDIR)\tkArgv.obj  $(TMPDIR)\tkAtom.obj  $(TMPDIR)\tkBind.obj  $(TMPDIR)\tkBitmap.obj  $(TMPDIR)\tkButton.obj  $(TMPDIR)\tkCanvArc.obj  $(TMPDIR)\tkCanvBmap.obj  $(TMPDIR)\tkCanvImg.obj  $(TMPDIR)\tkCanvLine.obj  $(TMPDIR)\tkCanvPoly.obj  $(TMPDIR)\tkCanvPs.obj  $(TMPDIR)\tkCanvText.obj  $(TMPDIR)\tkCanvUtil.obj  $(TMPDIR)\tkCanvWind.obj  $(TMPDIR)\tkCanvas.obj  $(TMPDIR)\tkClipboard.obj  $(TMPDIR)\tkCmds.obj  $(TMPDIR)\tkColor.obj  $(TMPDIR)\tkConfig.obj  $(TMPDIR)\tkCursor.obj  $(TMPDIR)\tkEntry.obj  $(TMPDIR)\tkError.obj  $(TMPDIR)\tkEvent.obj  $(TMPDIR)\tkFileFilter.obj  $(TMPDIR)\tkFocus.obj  $(TMPDIR)\tkFont.obj  $(TMPDIR)\tkFrame.obj  $(TMPDIR)\tkGC.obj  $(TMPDIR)\tkGeometry.obj  $(TMPDIR)\tkGet.obj  $(TMPDIR)\tkGrab.obj  $(TMPDIR)\tkGrid.obj  $(TMPDIR)\tkImage.obj  $(TMPDIR)\tkImgBmap.obj  $(TMPDIR)\tkImgGIF.obj  $(TMPDIR)\tkImgPPM.obj  $(TMPDIR)\tkImgPhoto.obj  $(TMPDIR)\tkImgUtil.obj  $(TMPDIR)\tkListbox.obj  $(TMPDIR)\tkMacWinMenu.obj  $(TMPDIR)\tkMain.obj  $(TMPDIR)\tkMenu.obj  $(TMPDIR)\tkMenubutton.obj  $(TMPDIR)\tkMenuDraw.obj  $(TMPDIR)\tkMessage.obj  $(TMPDIR)\tkOption.obj  $(TMPDIR)\tkPack.obj  $(TMPDIR)\tkPlace.obj  $(TMPDIR)\tkPointer.obj  $(TMPDIR)\tkRectOval.obj  $(TMPDIR)\tkScale.obj  $(TMPDIR)\tkScrollbar.obj  $(TMPDIR)\tkSelect.obj  $(TMPDIR)\tkText.obj  $(TMPDIR)\tkTextBTree.obj  $(TMPDIR)\tkTextDisp.obj  $(TMPDIR)\tkTextImage.obj  $(TMPDIR)\tkTextIndex.obj  $(TMPDIR)\tkTextMark.obj  $(TMPDIR)\tkTextTag.obj  $(TMPDIR)\tkTextWind.obj  $(TMPDIR)\tkTrig.obj  $(TMPDIR)\tkUtil.obj  $(TMPDIR)\tkVisual.obj  $(TMPDIR)\tkWindow.obj

cc32            = $(TOOLS32)\bin\cl.exe
link32          = $(TOOLS32)\bin\link.exe
rc32            = $(TOOLS32_rc)\bin\rc.exe
include32       = -I$(TOOLS32)\include

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      = $(DEBUGDEFINES)

TK_CFLAGS       = $(cdebug) $(cflags) $(cvarsdll) $(include32)  $(TK_INCLUDES) $(TK_DEFINES) 

######################################################################
# Link flags
######################################################################

!IF "$(NODEBUG)" == "1"
ldebug = /RELEASE
!ELSE
ldebug = -debug:full -debugtype:cv
!ENDIF

# declarations common to all linker options
lcommon = /NODEFAULTLIB /RELEASE /NOLOGO

# declarations for use on Intel i386, i486, and Pentium systems
!IF "$(MACHINE)" == "IX86"
DLLENTRY = @12
lflags   = $(lcommon) -align:0x1000 /MACHINE:$(MACHINE)
!ELSE
lflags   = $(lcommon) /MACHINE:$(MACHINE)
!ENDIF

conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup
guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup
dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll

!IF "$(MACHINE)" == "PPC"
libc = libc.lib
libcdll = crtdll.lib
!ELSE
libc = libc.lib oldnames.lib
libcdll = msvcrt.lib oldnames.lib
!ENDIF

baselibs   = kernel32.lib $(optlibs) advapi32.lib
winlibs    = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib
guilibs    = $(libc) $(winlibs)

guilibsdll = $(libcdll) $(winlibs)

######################################################################
# Compile flags
######################################################################

!IF "$(NODEBUG)" == "1"
!IF "$(MACHINE)" == "ALPHA"
# MSVC on Alpha doesn't understand -Ot
cdebug = -O2i -Gs -GD
!ELSE
cdebug = -Oti -Gs -GD
!ENDIF
!ELSE
cdebug = -Z7 -Od -WX
!ENDIF

# declarations common to all compiler options
ccommon = -c -W3 -nologo -Fp$(TMPDIR)\ -YX

!IF "$(MACHINE)" == "IX86"
cflags = $(ccommon) -D_X86_=1
!ELSE
!IF "$(MACHINE)" == "MIPS"
cflags = $(ccommon) -D_MIPS_=1
!ELSE
!IF "$(MACHINE)" == "PPC"
cflags = $(ccommon) -D_PPC_=1
!ELSE
!IF "$(MACHINE)" == "ALPHA"
cflags = $(ccommon) -D_ALPHA_=1
!ENDIF
!ENDIF
!ENDIF
!ENDIF

cvars      = -DWIN32 -D_WIN32
cvarsmt    = $(cvars) -D_MT
cvarsdll   = $(cvarsmt) -D_DLL

!IF "$(NODEBUG)" == "1"
cvarsdll   = $(cvars) -MD
!ELSE
cvarsdll   = $(cvars) -MDd
!ENDIF

CON_CFLAGS      = $(cdebug) $(cflags) $(cvars) $(include32) -DCONSOLE

######################################################################
# Project specific targets
######################################################################

all:            setup $(WISH)
test:           setup $(TKTEST)
plugin:         setup $(TKPLUGINDLL) $(WISHP)
install:        install-binaries install-libraries

setup:
        @mkd $(TMPDIR)
        @mkd $(OUTDIR)

$(TKLIB): $(TKDLL)

$(TKDLL): $(TKOBJS) $(TMPDIR)\tk.res $(TMPDIR)\tk.def
        set LIB=$(TOOLS32)\lib
       $(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\tk.def  -out:$@ $(TMPDIR)\tk.res $(TCLLIBDIR)\$(TCLLIB)  $(guilibsdll) @<<
                        $(TKOBJS)
<<

$(TKPLUGINLIB): $(TKPLUGINDLL)

$(TKPLUGINDLL): $(TKOBJS) $(TMPDIR)\tk.res $(TMPDIR)\plugin.def
        set LIB=$(TOOLS32)\lib
        $(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\plugin.def  -out:$@ $(TMPDIR)\tk.res $(TCLLIBDIR)\$(TCLPLUGINLIB)  $(guilibsdll) @<<
                        $(TKOBJS)
<<

$(WISH): $(WISHOBJS) $(TKLIB) $(TMPDIR)\wish.res
        set LIB=$(TOOLS32)\lib
        $(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -out:$@  $(guilibsdll) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB) $(WISHOBJS) 

$(WISHP): $(WISHOBJS) $(TKPLUGINLIB) $(TMPDIR)\wish.res
        set LIB=$(TOOLS32)\lib
        $(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -out:$@  $(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)
<<

$(DUMPEXTS): $(TCLDIR)\win\winDumpExts.c
        $(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $?
        set LIB=$(TOOLS32)\lib
        $(link32) $(ldebug) $(conlflags) $(guilibs) -out:$@  $(TMPDIR)\winDumpExts.obj 

install-binaries: $(WISH)
        @mkd $(BIN_INSTALL_DIR)
        @mkd $(LIB_INSTALL_DIR)
        @echo installing $(TKDLLNAME)
        @copy $(TKDLL) $(BIN_INSTALL_DIR)
        @echo installing $(WISH)
        @copy $(WISH) $(BIN_INSTALL_DIR)

install-libraries:
        @mkd $(LIB_INSTALL_DIR)
        @mkd $(INCLUDE_INSTALL_DIR)
        @mkd $(SCRIPT_INSTALL_DIR)
        @copy $(ROOT)\library\*.* $(SCRIPT_INSTALL_DIR)
        @del $(SCRIPT_INSTALL_DIR)\license.terms
        @mkd $(SCRIPT_INSTALL_DIR)\demos
        @copy $(ROOT)\library\demos\*.tcl       $(SCRIPT_INSTALL_DIR)\demos
        @copy $(ROOT)\library\demos\browse
$(SCRIPT_INSTALL_DIR)\demos\browse.tcl
        @copy $(ROOT)\library\demos\hello
$(SCRIPT_INSTALL_DIR)\demos\hello.tcl
        @copy $(ROOT)\library\demos\ixset
$(SCRIPT_INSTALL_DIR)\demos\ixset.tcl
        @copy $(ROOT)\library\demos\rmt
$(SCRIPT_INSTALL_DIR)\demos\rmt.tcl
        @copy $(ROOT)\library\demos\rolodex
$(SCRIPT_INSTALL_DIR)\demos\rolodex.tcl
        @copy $(ROOT)\library\demos\square
$(SCRIPT_INSTALL_DIR)\demos\square.tcl
        @copy $(ROOT)\library\demos\tcolor
$(SCRIPT_INSTALL_DIR)\demos\tcolor.tcl
        @copy $(ROOT)\library\demos\timer
$(SCRIPT_INSTALL_DIR)\demos\timer.tcl
        @copy $(ROOT)\library\demos\widget
$(SCRIPT_INSTALL_DIR)\demos\widget.tcl
        @copy $(ROOT)\library\demos\README
$(SCRIPT_INSTALL_DIR)\demos
        @copy $(ROOT)\library\demos\tclIndex
$(SCRIPT_INSTALL_DIR)\demos
        @mkd $(SCRIPT_INSTALL_DIR)\demos\images
        @copy $(ROOT)\library\demos\images\*.*
$(SCRIPT_INSTALL_DIR)\demos\images
        @mkd $(SCRIPT_INSTALL_DIR)\images
        @copy $(ROOT)\library\images\*.* $(SCRIPT_INSTALL_DIR)\images

#
# Special case object file targets
#

$(TMPDIR)\testMain.obj: $(ROOT)\win\winMain.c
        $(cc32) $(TK_CFLAGS) -DSTATIC_BUILD -DTK_TEST -Fo$@ $?

$(TMPDIR)\tkTest.obj: $(ROOT)\generic\tkTest.c
        $(cc32) $(TK_CFLAGS) -DSTATIC_BUILD -Fo$@ $?

$(TMPDIR)\tkSquare.obj: $(ROOT)\generic\tkSquare.c
        $(cc32) $(TK_CFLAGS) -Fo$@ $?

$(TMPDIR)\winMain.obj: $(ROOT)\win\winMain.c
        $(cc32) $(TK_CFLAGS) -DSTATIC_BUILD -Fo$@ $?

#
# Implicit rules
#

{$(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) $<

clean:
        -@del $(OUTDIR)\*.exp 
        -@del $(OUTDIR)\*.lib 
        -@del $(OUTDIR)\*.dll 
        -@del $(OUTDIR)\*.exe
        -@del $(OUTDIR)\*.pdb
        -@del $(TMPDIR)\*.pch
        -@del $(TMPDIR)\*.obj
        -@del $(TMPDIR)\*.res
        -@del $(TMPDIR)\*.def
        -@del $(TMPDIR)\*.exe
        -@rmd $(OUTDIR)
        -@rmd $(TMPDIR)

# dependencies

$(TMPDIR)\tk.res:  $(RCDIR)\buttons.bmp  $(RCDIR)\cursor*.cur  $(RCDIR)\tk.ico

$(GENERICDIR)/default.h: $(WINDIR)/tkWinDefault.h
$(GENERICDIR)/tkButton.c: $(GENERICDIR)/default.h
$(GENERICDIR)/tkCanvas.c: $(GENERICDIR)/default.h
$(GENERICDIR)/tkEntry.c: $(GENERICDIR)/default.h
$(GENERICDIR)/tkFrame.c: $(GENERICDIR)/default.h
$(GENERICDIR)/tkListbox.c: $(GENERICDIR)/default.h
$(GENERICDIR)/tkMenu.c: $(GENERICDIR)/default.h
$(GENERICDIR)/tkMenubutton.c: $(GENERICDIR)/default.h
$(GENERICDIR)/tkMessage.c: $(GENERICDIR)/default.h
$(GENERICDIR)/tkScale.c: $(GENERICDIR)/default.h
$(GENERICDIR)/tkScrollbar.c: $(GENERICDIR)/default.h
$(GENERICDIR)/tkText.c: $(GENERICDIR)/default.h
$(GENERICDIR)/tkTextIndex.c: $(GENERICDIR)/default.h
$(GENERICDIR)/tkTextTag.c: $(GENERICDIR)/default.h

$(GENERICDIR)/tkText.c: $(GENERICDIR)/tkText.h
$(GENERICDIR)/tkTextBTree.c: $(GENERICDIR)/tkText.h
$(GENERICDIR)/tkTextDisp.c: $(GENERICDIR)/tkText.h
$(GENERICDIR)/tkTextDisp.c: $(GENERICDIR)/tkText.h
$(GENERICDIR)/tkTextImage.c: $(GENERICDIR)/tkText.h
$(GENERICDIR)/tkTextIndex.c: $(GENERICDIR)/tkText.h
$(GENERICDIR)/tkTextMark.c: $(GENERICDIR)/tkText.h
$(GENERICDIR)/tkTextTag.c: $(GENERICDIR)/tkText.h
$(GENERICDIR)/tkTextWind.c: $(GENERICDIR)/tkText.h

$(GENERICDIR)/tkMacWinMenu.c: $(GENERICDIR)/tkMenu.h
$(GENERICDIR)/tkMenu.c: $(GENERICDIR)/tkMenu.h
$(GENERICDIR)/tkMenuDraw.c: $(GENERICDIR)/tkMenu.h
$(WINDIR)/tkWinMenu.c: $(GENERICDIR)/tkMenu.h



The new TEA architecture for 8.2.0 gives Tcl/Tk support for
cygwin on Windows as well as an install target. 
-- 08/12/1999 hobbs
welch Closed ticket [218488ffff]. [History diff]2000-10-26 08:23:17
dgp Ticket [218488ffff]: 4 changes [History diff]2001-04-05 08:22:18
Log in (anonymous is fine) to add a comment.