summaryrefslogtreecommitdiffstats
path: root/win/makefile.vc
diff options
context:
space:
mode:
Diffstat (limited to 'win/makefile.vc')
-rw-r--r--win/makefile.vc178
1 files changed, 137 insertions, 41 deletions
diff --git a/win/makefile.vc b/win/makefile.vc
index 7bdfff4..5ded8d6 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -4,7 +4,7 @@
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
-# SCCS: @(#) makefile.vc 1.91 98/02/18 15:07:56
+# RCS: @(#) $Id: makefile.vc,v 1.1.2.2 1998/09/24 23:59:49 stanton Exp $
# Does not depend on the presence of any environment variables in
# order to compile tcl; all needed information is derived from
@@ -30,13 +30,17 @@
# will return an error.
# B. A 16-bit program to test the behavior of the exec
# command under NT and 95 will not be built.
+# INSTALLDIR = where the install- targets should copy the binaries and
+# support files
#
ROOT = ..
-TMPDIR = .
-TOOLS32 = c:\msdev
+TOOLS32 = c:\progra~1\devstudio\vc
+TOOLS32_rc = c:\progra~1\devstudio\sharedide
TOOLS16 = c:\msvc
+INSTALLDIR = c:\progra~1\Tcl
+
# Set this to the appropriate value of /MACHINE: for your platform
MACHINE = IX86
@@ -46,6 +50,9 @@ 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
+
# The following defines can be added to enable various options in the
# way Tcl is built:
#
@@ -59,21 +66,44 @@ MACHINE = IX86
# Do not modify below this line
######################################################################
-VERSION = 81
+NAMEPREFIX = tcl
+DOTVERSION = 8.0
+VERSION = 80
-TCLLIB = tcl$(VERSION).lib
-TCLDLL = tcl$(VERSION).dll
-TCLPLUGINLIB = tcl$(VERSION)p.lib
-TCLPLUGINDLL = tcl$(VERSION)p.dll
-TCL16DLL = tcl16$(VERSION).dll
-TCLSH = tclsh$(VERSION).exe
-TCLSHP = tclshp$(VERSION).exe
-TCLTEST = tcltest.exe
+BINROOT = .
+!IF "$(NODEBUG)" == "1"
+TMPDIRNAME = Release
+DBGX =
+!ELSE
+TMPDIRNAME = Debug
+DBGX = d
+!ENDIF
+TMPDIR = $(BINROOT)\$(TMPDIRNAME)
+OUTDIRNAME = $(TMPDIRNAME)
+OUTDIR = $(TMPDIR)
+
+TCLLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)$(DBGX).lib
+TCLDLLNAME = $(NAMEPREFIX)$(VERSION)$(DBGX).dll
+TCLDLL = $(OUTDIR)\$(TCLDLLNAME)
+TCLPLUGINLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)p$(DBGX).lib
+TCLPLUGINDLLNAME= $(NAMEPREFIX)$(VERSION)p$(DBGX).dll
+TCLPLUGINDLL = $(OUTDIR)\$(TCLPLUGINDLLNAME)
+TCL16DLL = $(OUTDIR)\$(NAMEPREFIX)16$(VERSION)$(DBGX).dll
+TCLSH = $(OUTDIR)\$(NAMEPREFIX)sh$(VERSION)$(DBGX).exe
+TCLSHP = $(OUTDIR)\$(NAMEPREFIX)shp$(VERSION)$(DBGX).exe
+TCLPIPEDLLNAME = $(NAMEPREFIX)pip$(VERSION)$(DBGX).dll
+TCLPIPEDLL = $(OUTDIR)\$(TCLPIPEDLLNAME)
+TCLREGDLLNAME = $(NAMEPREFIX)reg$(VERSION)$(DBGX).dll
+TCLREGDLL = $(OUTDIR)\$(TCLREGDLLNAME)
+TCLTEST = $(OUTDIR)\$(NAMEPREFIX)test.exe
DUMPEXTS = $(TMPDIR)\dumpexts.exe
-TCLPIPEDLL = tclpip$(VERSION).dll
-TCLREGDLL = tclreg$(VERSION).dll
-CAT16 = cat16.exe
-CAT32 = cat32.exe
+CAT16 = $(TMPDIR)\cat16.exe
+CAT32 = $(TMPDIR)\cat32.exe
+
+LIB_INSTALL_DIR = $(INSTALLDIR)\lib
+BIN_INSTALL_DIR = $(INSTALLDIR)\bin
+SCRIPT_INSTALL_DIR = $(INSTALLDIR)\lib\tcl$(DOTVERSION)
+INCLUDE_INSTALL_DIR = $(INSTALLDIR)\include
TCLSHOBJS = \
$(TMPDIR)\tclAppInit.obj
@@ -132,6 +162,7 @@ TCLOBJS = \
$(TMPDIR)\tclPkg.obj \
$(TMPDIR)\tclPosixStr.obj \
$(TMPDIR)\tclPreserve.obj \
+ $(TMPDIR)\tclResolve.obj \
$(TMPDIR)\tclProc.obj \
$(TMPDIR)\tclRegexp.obj \
$(TMPDIR)\tclResult.obj \
@@ -157,7 +188,7 @@ TCLOBJS = \
cc32 = $(TOOLS32)\bin\cl.exe
link32 = $(TOOLS32)\bin\link.exe
-rc32 = $(TOOLS32)\bin\rc.exe
+rc32 = $(TOOLS32_rc)\bin\rc.exe
include32 = -I$(TOOLS32)\include
cc16 = $(TOOLS16)\bin\cl.exe
@@ -181,9 +212,7 @@ DLL16_CFLAGS = $(cdebug) $(cflags) $(include16) -ALw
# Link flags
######################################################################
-!IF "$(DEBUG)" == "1"
-ldebug = -debug:full -debugtype:cv
-!ELSE
+!IF "$(NODEBUG)" == "1"
ldebug = /RELEASE
!ENDIF
@@ -193,7 +222,7 @@ 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)
+lflags = $(lcommon) /MACHINE:$(MACHINE)
!ELSE
lflags = $(lcommon) /MACHINE:$(MACHINE)
!ENDIF
@@ -222,15 +251,19 @@ conlibsdll = $(libcdll) $(baselibs)
# Compile flags
######################################################################
-!IF "$(DEBUG)" == "1"
-#cdebug = -Z7 -Od -WX
-cdebug = -Z7 -Od
+!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 -YX -Dtry=__try -Dexcept=__except
+ccommon = -c -W3 -nologo -YX -Fp$(TMPDIR)\ -Dtry=__try -Dexcept=__except
!IF "$(MACHINE)" == "IX86"
cflags = $(ccommon) -D_X86_=1
@@ -252,21 +285,32 @@ cvars = -DWIN32 -D_WIN32
cvarsmt = $(cvars) -D_MT
cvarsdll = $(cvarsmt) -D_DLL
+!IF "$(NODEBUG)" == "1"
+cvarsdll = $(cvars) -MD
+!ELSE
+cvarsdll = $(cvars) -MDd
+!ENDIF
+
######################################################################
# Project specific targets
######################################################################
-release: $(TCLSH) dlls
-dlls: $(TCL16DLL) $(TCLPIPEDLL) $(TCLREGDLL)
-all: $(TCLSH) dlls $(CAT16) $(CAT32)
-tcltest: $(TCLTEST) dlls $(CAT16) $(CAT32)
-plugin: $(TCLPLUGINDLL) $(TCLSHP)
-test: $(TCLTEST) dlls $(CAT16) $(CAT32)
+release: setup $(TCLSH) dlls
+dlls: setup $(TCL16DLL) $(TCLPIPEDLL) $(TCLREGDLL)
+all: setup $(TCLSH) dlls $(CAT16) $(CAT32)
+tcltest: setup $(TCLTEST) dlls $(CAT16) $(CAT32)
+plugin: setup $(TCLPLUGINDLL) $(TCLSHP)
+install: install-binaries install-libraries
+test: setup $(TCLTEST) dlls $(CAT16) $(CAT32)
$(TCLTEST) <<
cd ../tests
source all
<<
+setup:
+ @mkd $(TMPDIR)
+ @mkd $(OUTDIR)
+
$(DUMPEXTS): $(WINDIR)\winDumpExts.c
$(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $?
set LIB=$(TOOLS32)\lib
@@ -351,44 +395,96 @@ $(CAT16): $(WINDIR)\cat.c
$(TMPDIR)\cat.obj,$@,nul,llibce.lib,nul
$(TMPDIR)\tcl.def: $(DUMPEXTS) $(TCLOBJS)
- $(DUMPEXTS) -o $@ $(TCLDLL) @<<
+ $(DUMPEXTS) -o $@ $(TCLDLLNAME) @<<
$(TCLOBJS)
<<
$(TMPDIR)\plugin.def: $(DUMPEXTS) $(TCLOBJS)
- $(DUMPEXTS) -o $@ $(TCLPLUGINDLL) @<<
+ $(DUMPEXTS) -o $@ $(TCLPLUGINDLLNAME) @<<
$(TCLOBJS)
<<
+install-binaries: $(TCLSH)
+ @mkd $(BIN_INSTALL_DIR)
+ @mkd $(LIB_INSTALL_DIR)
+ @echo installing $(TCLDLLNAME)
+ @copy $(TCLDLL) $(BIN_INSTALL_DIR)
+ @echo installing $(TCLSH)
+ @copy $(TCLSH) $(BIN_INSTALL_DIR)
+
+install-libraries:
+ @mkd $(LIB_INSTALL_DIR)
+ @mkd $(INCLUDE_INSTALL_DIR)
+ @mkd $(SCRIPT_INSTALL_DIR)
+ @mkd $(SCRIPT_INSTALL_DIR)\http1.0
+ @copy $(ROOT)\library\http1.0\http.tcl $(SCRIPT_INSTALL_DIR)\http1.0
+ @copy $(ROOT)\library\http1.0\pkgIndex.tcl $(SCRIPT_INSTALL_DIR)\http1.0
+ @mkd $(SCRIPT_INSTALL_DIR)\http2.0
+ @copy $(ROOT)\library\http2.0\http.tcl $(SCRIPT_INSTALL_DIR)\http2.0
+ @copy $(ROOT)\library\http2.0\pkgIndex.tcl $(SCRIPT_INSTALL_DIR)\http2.0
+ @mkd $(SCRIPT_INSTALL_DIR)\opt0.1
+ @copy $(ROOT)\library\opt0.1\optparse.tcl $(SCRIPT_INSTALL_DIR)\opt0.1
+ @copy $(ROOT)\library\opt0.1\pkgIndex.tcl $(SCRIPT_INSTALL_DIR)\opt0.1
+ @copy $(GENERICDIR)\tcl.h $(INCLUDE_INSTALL_DIR)
+ @copy $(ROOT)\library\history.tcl $(SCRIPT_INSTALL_DIR)
+ @copy $(ROOT)\library\init.tcl $(SCRIPT_INSTALL_DIR)
+ @copy $(ROOT)\library\ldAout.tcl $(SCRIPT_INSTALL_DIR)
+ @copy $(ROOT)\library\parray.tcl $(SCRIPT_INSTALL_DIR)
+ @copy $(ROOT)\library\safe.tcl $(SCRIPT_INSTALL_DIR)
+ @copy $(ROOT)\library\tclIndex $(SCRIPT_INSTALL_DIR)
+ @copy $(ROOT)\library\word.tcl $(SCRIPT_INSTALL_DIR)
+
#
# Special case object file targets
#
+$(TMPDIR)\tclWinInit.obj: $(WINDIR)\tclWinInit.c
+ $(cc32) -DDLL_BUILD -DBUILD_tcl $(TCL_CFLAGS) $(EXTFLAGS) \
+ -Fo$(TMPDIR)\ $?
+
$(TMPDIR)\testMain.obj: $(WINDIR)\tclAppInit.c
- $(cc32) $(TCL_CFLAGS) -DTCL_TEST -Fo$(TMPDIR)\testMain.obj $?
+ $(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -DTCL_TEST \
+ -Fo$(TMPDIR)\testMain.obj $?
+
+$(TMPDIR)\tclTest.obj: $(GENERICDIR)\tclTest.c
+ $(cc32) $(TCL_CFLAGS) -Fo$@ $?
+
+$(TMPDIR)\tclTestObj.obj: $(GENERICDIR)\tclTestObj.c
+ $(cc32) $(TCL_CFLAGS) -Fo$@ $?
+
+$(TMPDIR)\tclWinTest.obj: $(WINDIR)\tclWinTest.c
+ $(cc32) $(TCL_CFLAGS) -Fo$@ $?
+
+$(TMPDIR)\tclAppInit.obj : $(WINDIR)\tclAppInit.c
+ $(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -Fo$@ $?
#
# Implicit rules
#
{$(WINDIR)}.c{$(TMPDIR)}.obj:
- $(cc32) $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
+ $(cc32) -DDLL_BUILD -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
{$(GENERICDIR)}.c{$(TMPDIR)}.obj:
- $(cc32) $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
+ $(cc32) -DDLL_BUILD -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
{$(ROOT)\compat}.c{$(TMPDIR)}.obj:
- $(cc32) $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
+ $(cc32) -DDLL_BUILD -DBUILD_tcl $(TCL_CFLAGS) -Fo$(TMPDIR)\ $<
{$(WINDIR)}.rc{$(TMPDIR)}.res:
$(rc32) -fo $@ -r -i $(GENERICDIR) -i $(WINDIR) -D__WIN32__ \
$(TCL_DEFINES) $<
clean:
- -@del *.exp
- -@del *.lib
- -@del *.dll
- -@del *.exe
+ -@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)