diff options
author | davygrvy <davygrvy@pobox.com> | 2001-11-08 00:22:22 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@pobox.com> | 2001-11-08 00:22:22 (GMT) |
commit | f06c66bc9eef4fad9dda1251ab50c5128e3c5327 (patch) | |
tree | c6c5a02d8c4d61a455886f0f11ee29e737c846ec /win/makefile.vc | |
parent | c901b78885e45b16b089ef8c8cd4e6caf8201dc8 (diff) | |
download | tcl-f06c66bc9eef4fad9dda1251ab50c5128e3c5327.zip tcl-f06c66bc9eef4fad9dda1251ab50c5128e3c5327.tar.gz tcl-f06c66bc9eef4fad9dda1251ab50c5128e3c5327.tar.bz2 |
* win/rules.vc:
* win/makefile.vc: Dropped the NOMSVCRT macro and put it on the
option list instead. It makes more sense to me this way as
NOMSVCRT=0 would only be the valid setting. Fixed the dde and reg
extension for building static. Improved, but not perfected, the
winhelp target.
Diffstat (limited to 'win/makefile.vc')
-rw-r--r-- | win/makefile.vc | 84 |
1 files changed, 50 insertions, 34 deletions
diff --git a/win/makefile.vc b/win/makefile.vc index b457045..7152620 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -1,7 +1,7 @@ #-------------------------------------------------------------------------------- # makefile.vc -- # -# Microsoft Visual C++ makefile for use with nmake.exe v1.52+ (VC++ 5.0+) +# Microsoft Visual C++ makefile for use with nmake.exe v1.62+ (VC++ 5.0+) # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -12,7 +12,7 @@ # Copyright (c) 2001 Tomasoft Engineering. # #-------------------------------------------------------------------------------- -# RCS: @(#) $Id: makefile.vc,v 1.67 2001/11/07 03:39:30 davygrvy Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.68 2001/11/08 00:22:22 davygrvy Exp $ #-------------------------------------------------------------------------------- !if "$(MSVCDIR)" == "" @@ -61,24 +61,21 @@ 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,threads,symbols,profile,none +# OPTS=static,msvcrt,threads,symbols,profile,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. # # static = Builds a static library of the core instead of a # dll. The shell will be static (and large), as well. +# msvcrt = Effects the static option only to switch it from +# using libcmt(d) as the C runtime [by default] to +# msvcrt(d). This is useful for static embedding +# support. # threads = Turns on full multithreading support. # symbols = Adds symbols for step debugging. # profile = Adds profiling hooks. Map file is assumed. # -# NOMSVCRT=(0|1) -# Allows the core to be compiled with libcmt(d) instead of -# msvcrt(d). For a non-static core, msvcrt(d) is the default. -# For a static core, libcmt(d) is the default. This hook is -# useful if you want to build a static library that can link to -# msvcrt(d) instead. -# # STATS=memdbg,compdbg,compstat,none # Sets optional memory and bytecode compiler debugging code added # to the core. The default is for none. Any combination of the @@ -158,10 +155,11 @@ TCLSTUBLIB = $(OUT_DIR)\$(TCLSTUBLIBNAME) TCLSH = $(OUT_DIR)\$(PROJECT)sh$(VERSION)$(SUFX).exe TCLPIPEDLLNAME = $(PROJECT)pip$(VERSION).dll TCLPIPEDLL = $(OUT_DIR)\$(TCLPIPEDLLNAME) -TCLREGDLLNAME = $(PROJECT)reg$(REGVERSION)$(DBGX).dll + +TCLREGDLLNAME = $(PROJECT)reg$(REGVERSION)$(SUFX).$(EXT) TCLREGDLL = $(OUT_DIR)\$(TCLREGDLLNAME) -TCLDDEDLLNAME = $(PROJECT)dde$(DDEVERSION)$(DBGX).dll +TCLDDEDLLNAME = $(PROJECT)dde$(DDEVERSION)$(SUFX).$(EXT) TCLDDEDLL = $(OUT_DIR)\$(TCLDDEDLLNAME) TCLTEST = $(OUT_DIR)\$(PROJECT)test.exe @@ -298,14 +296,15 @@ cdebug = -Z7 -Od -WX # declarations common to all compiler options cflags = -c -W3 -nologo -Fp$(TMP_DIR)\ -YX -!if $(NOMSVCRT) -cvarsdll = -MT$(DBGX) +!if $(MSVCRT) +crt = -MD$(DBGX) !else -cvarsdll = -MD$(DBGX) +crt = -MT$(DBGX) !endif -TCL_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(TCL_INCLUDES) $(TCL_DEFINES) -CON_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) -DCONSOLE +BASE_CLFAGS = $(cdebug) $(cflags) $(crt) $(TCL_INCLUDES) +TCL_CFLAGS = $(BASE_CLFAGS) $(TCL_DEFINES) +CON_CFLAGS = $(cdebug) $(cflags) $(crt) -DCONSOLE ###################################################################### # Link flags @@ -377,12 +376,10 @@ $(TCLSTUBLIB): $(TCLSTUBOBJS) $(lib32) -nologo -out:$@ $(TCLSTUBOBJS) $(TCLSH): $(TCLSHOBJS) $(TCLIMPLIB) - $(link32) $(ldebug) $(conlflags) -stack:2300000 -out:$@ $(baselibs) \ - $(TCLIMPLIB) $(TCLSHOBJS) + $(link32) $(ldebug) $(conlflags) -stack:2300000 -out:$@ $(baselibs) $** $(TCLTEST): $(TCLTESTOBJS) $(TCLIMPLIB) - $(link32) $(ldebug) $(conlflags) -stack:2300000 -out:$@ $(baselibs) \ - $(TCLIMPLIB) $(TCLTESTOBJS) + $(link32) $(ldebug) $(conlflags) -stack:2300000 -out:$@ $(baselibs) $** $(TCLPIPEDLL): $(WINDIR)\stub16.c $(cc32) $(CON_CFLAGS) -Fo$(TMP_DIR)\ $(WINDIR)\stub16.c @@ -390,16 +387,20 @@ $(TCLPIPEDLL): $(WINDIR)\stub16.c $(TCLDDEDLL): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB) +!if $(STATIC_BUILD) + $(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinDde.obj +!else $(link32) $(ldebug) $(dlllflags) -out:$@ $** $(baselibs) -!if !$(STATIC_BUILD) -@del $*.exp -@del $*.lib !endif $(TCLREGDLL): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB) +!if $(STATIC_BUILD) + $(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinReg.obj +!else $(link32) $(ldebug) $(dlllflags) -out:$@ $** $(baselibs) -!if !$(STATIC_BUILD) -@del $*.exp -@del $*.lib !endif @@ -482,20 +483,23 @@ genstubs: TCLTOOLS = $(ROOT)/tools MAN2TCL = $(TCLTOOLS)/man2tcl TCLRTF = $(TCLTOOLS)/tcl.rtf -TCLHPJ = $(TCLTOOLS)/tcl.hpj MAN2HELP = $(TCLTOOLS)/man2help.tcl -winhelp: $(TCLRTF) - start /wait hcrtf.exe -xn $(TCLHPJ) +winhelp: $(OUT_DIR)\$(PROJECT)$(VERSION).hlp + +$(OUT_DIR)\$(PROJECT)$(VERSION).hlp : $(TCLRTF) + cd $(TCLTOOLS) + start /wait hcrtf.exe -xn tcl.hpj + copy $(PROJECT)$(VERSION).hlp ..\win\$(OUT_DIR) + copy $(PROJECT)$(VERSION).cnt ..\win\$(OUT_DIR) $(MAN2TCL).exe: $(MAN2TCL).obj cd $(TCLTOOLS) - $(cc32) /nologo /G4 /ML /O2 $(MAN2TCL).c + $(cc32) -nologo -G4 -ML -O2 $(MAN2TCL).c $(TCLRTF): $(MAN2TCL).exe $(TCLSH) cd $(TCLTOOLS) ..\win\$(TCLSH) $(MAN2HELP) $(PROJECT) $(VERSION) $(ROOT)/doc ../../tk$(DOTVERSION)/doc - # # Special case object file targets # @@ -515,21 +519,31 @@ $(TMP_DIR)\tclTestObj.obj: $(GENERICDIR)\tclTestObj.c $(TMP_DIR)\tclWinTest.obj: $(WINDIR)\tclWinTest.c $(cc32) $(TCL_CFLAGS) -Fo$@ $? -$(TMP_DIR)\tclAppInit.obj : $(WINDIR)\tclAppInit.c +$(TMP_DIR)\tclAppInit.obj: $(WINDIR)\tclAppInit.c $(cc32) $(TCL_CFLAGS) -Fo$@ $? # The following objects should be built using the stub interfaces -$(TMP_DIR)\tclWinReg.obj : $(WINDIR)\tclWinReg.c - $(cc32) $(TCL_CFLAGS) -DUSE_TCL_STUBS -DTCL_THREADS=1 -Fo$@ $? +$(TMP_DIR)\tclWinReg.obj: $(WINDIR)\tclWinReg.c +!if $(STATIC_BUILD) + $(cc32) $(BASE_CLFAGS) -DTCL_THREADS=1 -DSTATIC_BUILD -Fo$@ $? +!else + $(cc32) $(BASE_CLFAGS) -DTCL_THREADS=1 -DUSE_TCL_STUBS -Fo$@ $? +!endif + + +$(TMP_DIR)\tclWinDde.obj: $(WINDIR)\tclWinDde.c +!if $(STATIC_BUILD) + $(cc32) $(BASE_CLFAGS) -DTCL_THREADS=1 -DSTATIC_BUILD -Fo$@ $? +!else + $(cc32) $(BASE_CLFAGS) -DTCL_THREADS=1 -DUSE_TCL_STUBS -Fo$@ $? +!endif -$(TMP_DIR)\tclWinDde.obj : $(WINDIR)\tclWinDde.c - $(cc32) $(TCL_CFLAGS) -DUSE_TCL_STUBS -DTCL_THREADS=1 -Fo$@ $? # 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 -$(TMP_DIR)\tclStubLib.obj : $(GENERICDIR)\tclStubLib.c +$(TMP_DIR)\tclStubLib.obj: $(GENERICDIR)\tclStubLib.c $(cc32) $(cdebug) $(cflags) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $? @@ -589,3 +603,5 @@ clean: -@$(RM) $(TMP_DIR)\*.exe -@$(RMDIR) $(OUT_DIR) -@$(RMDIR) $(TMP_DIR) + +.SUFFIXES:.c .rc |