diff options
author | davygrvy <davygrvy> | 2002-11-04 07:49:43 (GMT) |
---|---|---|
committer | davygrvy <davygrvy> | 2002-11-04 07:49:43 (GMT) |
commit | 5efb972739e1035f9a910dc0206079818b052ba1 (patch) | |
tree | 7368d859ec4ea15e18816d9d443cd06c71986936 /win/makefile.vc | |
parent | 38730b27a6b3d9798ef4658a13408c22fbd8271b (diff) | |
download | tk-5efb972739e1035f9a910dc0206079818b052ba1.zip tk-5efb972739e1035f9a910dc0206079818b052ba1.tar.gz tk-5efb972739e1035f9a910dc0206079818b052ba1.tar.bz2 |
* win/winMain.c (Tcl_AppInit): Calls Registry_Init() and
Dde_Init() when STATIC_BUILD and TCL_USE_STATIC_PACKAGES macros
are set.
* win/makefile.vc: linkexten option now sets the
TCL_USE_STATIC_PACKAGES macro which also adds the registry and
dde static lib files to the link of the shell. [Patch 479697]
* win/rules.vc: Matches the one from Tcl.
* win/buildall.vc.bat: More useful commentary.
Diffstat (limited to 'win/makefile.vc')
-rw-r--r-- | win/makefile.vc | 137 |
1 files changed, 44 insertions, 93 deletions
diff --git a/win/makefile.vc b/win/makefile.vc index 4bd537f..52feff6 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.64 2002/11/01 18:33:54 andreas_kupries Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.65 2002/11/04 07:49:43 davygrvy Exp $ #------------------------------------------------------------------------------ !if "$(MSVCDIR)" == "" @@ -155,30 +155,6 @@ Please `cd` to its location first. PROJECT = tk !include "rules.vc" -_INSTALLDIR = $(INSTALLDIR:/=\) - -!if !defined(TCLDIR) -!if exist($(_INSTALLDIR)\include\tcl.h) -TCLINSTALL = 1 -_TCLDIR = $(_INSTALLDIR) -!else -MSG=^ -Don't know where tcl.h is. Set the _TCLDIR macro. -!error $(MSG) -!endif -!else -_TCLDIR = $(TCLDIR:/=\) -!if exist($(_TCLDIR)\include\tcl.h) -TCLINSTALL = 1 -!elseif exist($(_TCLDIR)\generic\tcl.h) -TCLINSTALL = 0 -!else -MSG =^ -Don't know where tcl.h is. the TCLDIR macro doesn't appear correct. -!error $(MSG) -!endif -!endif - !if $(TCLINSTALL) !message *** Warning: Tk requires the source distribution of Tcl to build from, !message *** at this time, sorry. Please set the TCLDIR macro to point to the @@ -193,47 +169,22 @@ WISHNAMEPREFIX = wish BINROOT = . ROOT = .. -TCLIMPLIBNAME = tcl$(VERSION)$(SUFX).lib -TCLLIBNAME = tcl$(VERSION)$(SUFX).$(EXT) -TCLSTUBLIBNAME = tclstub$(VERSION).lib +#TCLIMPLIBNAME = tcl$(VERSION)$(SUFX).lib +#TCLLIB = tcl$(VERSION)$(SUFX).$(EXT) +#TCLSTUBLIBNAME = tclstub$(VERSION).lib -TCLREGLIBNAME = tclreg11$(SUFX:t=).lib -TCLDDELIBNAME = tcldde12$(SUFX:t=).lib - -TKIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib +TKIMPLIB = "$(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib" TKLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT) -TKLIB = $(OUT_DIR)\$(TKLIBNAME) +TKLIB = "$(OUT_DIR)\$(TKLIBNAME)" TKSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib -TKSTUBLIB = $(OUT_DIR)\$(TKSTUBLIBNAME) - -!if $(TCLINSTALL) -TCLSH = $(_INSTALLDIR)\bin\tclsh$(VERSION)$(SUFX).exe -TCLSTUBLIB = $(_INSTALLDIR)\lib\$(TCLSTUBLIBNAME) -TCLIMPLIB = $(_INSTALLDIR)\lib\$(TCLIMPLIBNAME) -TCL_LIBRARY = $(_INSTALLDIR)\lib -TCLREGLIB = $(_INSTALLDIR)\lib\$(TCLREGLIBNAME) -TCLDDELIB = $(_INSTALLDIR)\lib\$(TCLDDELIBNAME) -TCLTMP_DIR = \must\have\tcl\sources\to\build\this\target -COFFBASE = \must\have\tcl\sources\to\build\this\target -TOOLSDIR = \must\have\tcl\sources\to\build\this\target -!else -TCLSH = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(VERSION)$(SUFX).exe -TCLSTUBLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\$(TCLSTUBLIBNAME) -TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\$(TCLIMPLIBNAME) -TCL_LIBRARY = $(_TCLDIR)\library -TCLREGLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\$(TCLREGLIBNAME) -TCLDDELIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\$(TCLDDELIBNAME) -TCLTMP_DIR = $(_TCLDIR)\win\$(TMP_DIR:tk=tcl) -COFFBASE = $(_TCLDIR)\win\coffbase.txt -TOOLSDIR = $(_TCLDIR)\tools -!endif +TKSTUBLIB = "$(OUT_DIR)\$(TKSTUBLIBNAME)" -WISH = $(OUT_DIR)\$(WISHNAMEPREFIX)$(VERSION)$(SUFX).exe -WISHC = $(OUT_DIR)\$(WISHNAMEPREFIX)c$(VERSION)$(SUFX).exe +WISH = "$(OUT_DIR)\$(WISHNAMEPREFIX)$(VERSION)$(SUFX).exe" +WISHC = "$(OUT_DIR)\$(WISHNAMEPREFIX)c$(VERSION)$(SUFX).exe" -TKTEST = $(OUT_DIR)\$(PROJECT)test.exe -CAT32 = $(OUT_DIR)\cat32.exe +TKTEST = "$(OUT_DIR)\$(PROJECT)test.exe" +CAT32 = "$(OUT_DIR)\cat32.exe" RMDIR = .\rmd.bat RM = del @@ -245,7 +196,7 @@ INCLUDE_INSTALL_DIR = $(_INSTALLDIR)\include WISHOBJS = \ $(TMP_DIR)\winMain.obj \ -!if $(TCL_LINKWITHEXTENSIONS) +!if $(TCL_USE_STATIC_PACKAGES) $(TCLDDELIB) \ $(TCLREGLIB) \ !endif @@ -466,8 +417,8 @@ dlllflags = $(lflags) -dll conlflags = $(lflags) -subsystem:console guilflags = $(lflags) -subsystem:windows -baselibs = kernel32.lib advapi32.lib user32.lib -guilibs = $(baselibs) shell32.lib gdi32.lib comdlg32.lib winspool.lib imm32.lib comctl32.lib +baselibs = kernel32.lib advapi32.lib user32.lib +guilibs = $(baselibs) shell32.lib gdi32.lib comdlg32.lib winspool.lib imm32.lib comctl32.lib #--------------------------------------------------------------------- @@ -563,25 +514,25 @@ $(CAT32): $(_TCLDIR)\win\cat.c $(link32) $(conlflags) -out:$@ -stack:16384 $(TMP_DIR)\cat.obj $(baselibs) install-binaries: - @xcopy /i /y "$(WISH)" "$(BIN_INSTALL_DIR)\" -!if "$(TKLIB)" != "$(TKIMPLIB)" - @xcopy /i /y "$(TKLIB)" "$(BIN_INSTALL_DIR)\" + @$(CPY) "$(WISH)" "$(BIN_INSTALL_DIR)\" +!if $(TKLIB) != $(TKIMPLIB) + @$(CPY) "$(TKLIB)" "$(BIN_INSTALL_DIR)\" !endif - @xcopy /i /y "$(TKIMPLIB)" "$(LIB_INSTALL_DIR)\" - @xcopy /i /y "$(TKSTUBLIB)" "$(LIB_INSTALL_DIR)\" + @$(CPY) "$(TKIMPLIB)" "$(LIB_INSTALL_DIR)\" + @$(CPY) "$(TKSTUBLIB)" "$(LIB_INSTALL_DIR)\" install-libraries: - @xcopy /i /y "$(GENERICDIR)\tk.h" "$(INCLUDE_INSTALL_DIR)\" - @xcopy /i /y "$(GENERICDIR)\tkDecls.h" "$(INCLUDE_INSTALL_DIR)\" - @xcopy /i /y "$(GENERICDIR)\tkPlatDecls.h" "$(INCLUDE_INSTALL_DIR)\" - @xcopy /i /y "$(GENERICDIR)\tkIntXlibDecls.h" "$(INCLUDE_INSTALL_DIR)\" - @xcopy /i /y "$(XLIBDIR)\X11\*.h" "$(INCLUDE_INSTALL_DIR)\X11\" - @xcopy /i /y "$(ROOT)\library\*" "$(SCRIPT_INSTALL_DIR)\" - @xcopy /i /y "$(ROOT)\library\*" "$(SCRIPT_INSTALL_DIR)\" - @xcopy /i /y "$(ROOT)\library\demos\*" "$(SCRIPT_INSTALL_DIR)\demos\" - @xcopy /i /y "$(ROOT)\library\demos\images\*" "$(SCRIPT_INSTALL_DIR)\demos\images\" - @xcopy /i /y "$(ROOT)\library\images\*" "$(SCRIPT_INSTALL_DIR)\images\" - @xcopy /i /y "$(ROOT)\library\msgs\*" "$(SCRIPT_INSTALL_DIR)\msgs\" + @$(CPY) "$(GENERICDIR)\tk.h" "$(INCLUDE_INSTALL_DIR)\" + @$(CPY) "$(GENERICDIR)\tkDecls.h" "$(INCLUDE_INSTALL_DIR)\" + @$(CPY) "$(GENERICDIR)\tkPlatDecls.h" "$(INCLUDE_INSTALL_DIR)\" + @$(CPY) "$(GENERICDIR)\tkIntXlibDecls.h" "$(INCLUDE_INSTALL_DIR)\" + @$(CPY) "$(XLIBDIR)\X11\*.h" "$(INCLUDE_INSTALL_DIR)\X11\" + @$(CPY) "$(ROOT)\library\*" "$(SCRIPT_INSTALL_DIR)\" + @$(CPY) "$(ROOT)\library\*" "$(SCRIPT_INSTALL_DIR)\" + @$(CPY) "$(ROOT)\library\demos\*" "$(SCRIPT_INSTALL_DIR)\demos\" + @$(CPY) "$(ROOT)\library\demos\images\*" "$(SCRIPT_INSTALL_DIR)\demos\images\" + @$(CPY) "$(ROOT)\library\images\*" "$(SCRIPT_INSTALL_DIR)\images\" + @$(CPY) "$(ROOT)\library\msgs\*" "$(SCRIPT_INSTALL_DIR)\msgs\" #--------------------------------------------------------------------- @@ -630,11 +581,11 @@ winhelp: docsetup $(HELPFILE) docsetup: @if not exist $(DOCTMP_DIR)\nul mkdir $(DOCTMP_DIR) -$(MAN2HELP) $(MAN2HELP2) $(INDEX): $(TOOLSDIR)\$$(@F) - copy $(TOOLSDIR)\$(@F) $(@D) +$(MAN2HELP) $(MAN2HELP2) $(INDEX): $(TCLTOOLSDIR)\$$(@F) + $(CPY) $(TCLTOOLSDIR)\$(@F) $(@D) $(BMP): - copy $(WINDIR)\$(@F) $(@D) + $(CPY) $(WINDIR)\$(@F) $(@D) $(HELPFILE): $(HELPRTF) $(BMP) cd $(DOCTMP_DIR) @@ -661,19 +612,19 @@ CreateButton(3, "Wiki", ExecFile("http://wiki.tcl.tk")) CreateButton(4, "FAQ", ExecFile("http://www.purl.org/NET/Tcl-FAQ/")) << cd $(MAKEDIR) - copy "$(DOCTMP_DIR)\$(@B).hlp" "$(OUT_DIR)" - copy "$(DOCTMP_DIR)\$(@B).cnt" "$(OUT_DIR)" + $(CPY) "$(DOCTMP_DIR)\$(@B).hlp" "$(OUT_DIR)" + $(CPY) "$(DOCTMP_DIR)\$(@B).cnt" "$(OUT_DIR)" -$(MAN2TCL): $(TOOLSDIR)\$$(@B).c - $(cc32) -nologo -G4 -ML -O2 -Fo$(@D)\ $(TOOLSDIR)\$(@B).c -link -out:$@ +$(MAN2TCL): $(TCLTOOLSDIR)\$$(@B).c + $(cc32) -nologo -G4 -ML -O2 -Fo$(@D)\ $(TCLTOOLSDIR)\$(@B).c -link -out:$@ $(HELPRTF): $(MAN2TCL) $(MAN2HELP) $(MAN2HELP2) $(INDEX) - $(TCLSH) $(MAN2HELP:\=/) -bitmap $(BMP_NOPATH) $(PROJECT) $(VERSION) $(DOCDIR:\=/) + $(TCLSH) $(MAN2HELP) -bitmap $(BMP_NOPATH) $(PROJECT) $(VERSION) $(DOCDIR:\=/) install-docs: !if exist($(HELPFILE)) - @xcopy /i /y "$(HELPFILE)" "$(DOC_INSTALL_DIR)\" - @xcopy /i /y "$(HELPCNT)" "$(DOC_INSTALL_DIR)\" + $(CPY) "$(HELPFILE)" "$(DOC_INSTALL_DIR)\" + $(CPY) "$(HELPCNT)" "$(DOC_INSTALL_DIR)\" $(TCLSH) << puts "Installing $(PROJECT)'s helpfile contents into Tcl's ..." set f [open "$(DOC_INSTALL_DIR:\=/)/tcl$(VERSION).cnt" r] @@ -702,8 +653,8 @@ close $$f #--------------------------------------------------------------------- $(TMP_DIR)\testMain.obj: $(WINDIR)\winMain.c -!if $(TCL_LINKWITHEXTENSIONS) - $(cc32) $(WISH_CFLAGS) -DTK_TEST -DTCL_LINKWITHEXTENSIONS -Fo$@ $? +!if $(TCL_USE_STATIC_PACKAGES) + $(cc32) $(WISH_CFLAGS) -DTK_TEST -DTCL_USE_STATIC_PACKAGES -Fo$@ $? !else $(cc32) $(WISH_CFLAGS) -DTK_TEST -Fo$@ $? !endif @@ -718,8 +669,8 @@ $(TMP_DIR)\tkSquare.obj: $(GENERICDIR)\tkSquare.c $(cc32) $(WISH_CFLAGS) -Fo$@ $? $(TMP_DIR)\winMain.obj: $(WINDIR)\winMain.c -!if $(TCL_LINKWITHEXTENSIONS) - $(cc32) $(WISH_CFLAGS) -DTCL_LINKWITHEXTENSIONS -Fo$@ $? +!if $(TCL_USE_STATIC_PACKAGES) + $(cc32) $(WISH_CFLAGS) -DTCL_USE_STATIC_PACKAGES -Fo$@ $? !else $(cc32) $(WISH_CFLAGS) -Fo$@ $? !endif |