# Copyright (c) 1995-1996 Sun Microsystems, Inc. # SCCS: @(#) makefile.vc 1.56 96/10/11 17:39:36 # # Visual C++ 2.x and 4.0 makefile # # Does not depend on the presence of any environment variables in # order to compile tcl; all needed information is derived from # location of the compiler directories. # # 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++. # # TOOLS16 = location of VC++ 1.5 16-bit tools, needed to build thunking # library. This information is optional; if the 16-bit compiler # is not available, then the 16-bit code will not be built. # Tcl will still run without the 16-bit code, but... # A. Under Windows 3.X you will any calls to the exec command # 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. # ROOT = .. TMPDIR = . TOOLS32 = c:\msdev TOOLS16 = c:\msvc # Comment the following line to compile with symbols NODEBUG=1 # uncomment the following two lines to compile with TCL_MEM_DEBUG #DEBUGDEFINES = -DTCL_MEM_DEBUG WINDIR = $(ROOT)\win GENERICDIR = $(ROOT)\generic cc32 = $(TOOLS32)\bin\cl.exe link32 = $(TOOLS32)\bin\link.exe rc32 = $(TOOLS32)\bin\rc.exe include32 = -I$(TOOLS32)\include cc16 = $(TOOLS16)\bin\cl.exe link16 = $(TOOLS16)\bin\link.exe rc16 = $(TOOLS16)\bin\rc.exe include16 = -I$(TOOLS16)\include TCL_INCLUDES = -I$(WINDIR) -I$(GENERICDIR) TCL_DEFINES = -D__WIN32__ -DUSE_TCLALLOC=0 $(DEBUGDEFINES) -Dtry=__try \ -Dexcept=__except TCLSHOBJS = \ $(TMPDIR)\tclAppInit.obj TCLTESTOBJS = \ $(TMPDIR)\tclTest.obj \ $(TMPDIR)\tclWinTest.obj \ $(TMPDIR)\testMain.obj TCLOBJS = \ $(TMPDIR)\panic.obj \ $(TMPDIR)\regexp.obj \ $(TMPDIR)\strftime.obj \ $(TMPDIR)\tclAsync.obj \ $(TMPDIR)\tclBasic.obj \ $(TMPDIR)\tclCkalloc.obj \ $(TMPDIR)\tclClock.obj \ $(TMPDIR)\tclCmdAH.obj \ $(TMPDIR)\tclCmdIL.obj \ $(TMPDIR)\tclCmdMZ.obj \ $(TMPDIR)\tclDate.obj \ $(TMPDIR)\tclEnv.obj \ $(TMPDIR)\tclEvent.obj \ $(TMPDIR)\tclExpr.obj \ $(TMPDIR)\tclFCmd.obj \ $(TMPDIR)\tclFHandle.obj \ $(TMPDIR)\tclFileName.obj \ $(TMPDIR)\tclGet.obj \ $(TMPDIR)\tclHash.obj \ $(TMPDIR)\tclHistory.obj \ $(TMPDIR)\tclIO.obj \ $(TMPDIR)\tclIOCmd.obj \ $(TMPDIR)\tclIOSock.obj \ $(TMPDIR)\tclIOUtil.obj \ $(TMPDIR)\tclInterp.obj \ $(TMPDIR)\tclLink.obj \ $(TMPDIR)\tclLoad.obj \ $(TMPDIR)\tclMain.obj \ $(TMPDIR)\tclNotify.obj \ $(TMPDIR)\tclParse.obj \ $(TMPDIR)\tclPkg.obj \ $(TMPDIR)\tclPosixStr.obj \ $(TMPDIR)\tclPreserve.obj \ $(TMPDIR)\tclProc.obj \ $(TMPDIR)\tclUtil.obj \ $(TMPDIR)\tclVar.obj \ $(TMPDIR)\tclWin32Dll.obj \ $(TMPDIR)\tclWinChan.obj \ $(TMPDIR)\tclWinError.obj \ $(TMPDIR)\tclWinFCmd.obj \ $(TMPDIR)\tclWinFile.obj \ $(TMPDIR)\tclWinInit.obj \ $(TMPDIR)\tclWinLoad.obj \ $(TMPDIR)\tclWinMtherr.obj \ $(TMPDIR)\tclWinNotify.obj \ $(TMPDIR)\tclWinPipe.obj \ $(TMPDIR)\tclWinSock.obj \ $(TMPDIR)\tclWinTime.obj TCLLIB = tcl76.lib TCLDLL = tcl76.dll TCL16DLL = tcl1676.dll TCLSH = tclsh76.exe TCLTEST = tcltest.exe DUMPEXTS = dumpexts.exe TCLPIPEDLL = tclpip76.dll CAT16 = cat16.exe CAT32 = cat32.exe CPU = i386 INCLUDE = $(TOOLS32)\include !include TCL_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) $(TCL_INCLUDES) $(TCL_DEFINES) CON_CFLAGS = $(cdebug) $(cflags) $(cvars) $(include32) -DCONSOLE DOS_CFLAGS = $(cdebug) $(cflags) $(include16) -AL DLL16_CFLAGS = $(cdebug) $(cflags) $(include16) -ALw # # Targets # release: $(DUMPEXTS) $(TCLDLL) $(TCLSH) $(TCL16DLL) $(TCLPIPEDLL) all: $(DUMPEXTS) $(TCLDLL) $(TCLSH) $(TCL16DLL) $(TCLPIPEDLL) $(CAT16) $(CAT32) test: $(DUMPEXTS) $(TCLDLL) $(TCLTEST) $(TCL16DLL) $(TCLPIPEDLL) $(CAT16) $(CAT32) $(TCLTEST) << cd ../tests source all << $(DUMPEXTS): $(WINDIR)\winDumpExts.c $(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $? set LIB=$(TOOLS32)\lib $(link32) $(linkdebug) $(conlflags) -out:$@ $(TMPDIR)\winDumpExts.obj $(guilibs) $(TCLDLL): $(TCLOBJS) $(TMPDIR)\tclvc.def $(TMPDIR)\tcl.res set LIB=$(TOOLS32)\lib $(link32) $(linkdebug) $(dlllflags) -def:$(TMPDIR)\tclvc.def \ -out:$@ $(TMPDIR)\tcl.res $(guilibsdll) @<< $(TCLOBJS) << $(TCLSH): $(TCLSHOBJS) $(TCLLIB) $(TMPDIR)\tclsh.res set LIB=$(TOOLS32)\lib $(link32) $(linkdebug) $(conlflags) $(TMPDIR)\tclsh.res \ -out:$@ $(conlibsdll) $(TCLLIB) $(TCLSHOBJS) $(TCLTEST): $(TCLTESTOBJS) $(TCLLIB) $(TMPDIR)\tclsh.res set LIB=$(TOOLS32)\lib $(link32) $(linkdebug) $(conlflags) $(TMPDIR)\tclsh.res \ -out:$@ $(conlibsdll) $(TCLLIB) $(TCLTESTOBJS) $(TCL16DLL): $(WINDIR)\tcl16.rc $(WINDIR)\tclWin16.c if exist $(cc16) $(cc16) @<< $(DLL16_CFLAGS) -Fo$(TMPDIR)\ $(WINDIR)\tclWin16.c << @copy << $(TMPDIR)\tclWin16.def > nul LIBRARY $(@B);dll EXETYPE WINDOWS CODE PRELOAD MOVEABLE DISCARDABLE DATA PRELOAD MOVEABLE SINGLE HEAPSIZE 1024 EXPORTS WEP @1 RESIDENTNAME UTPROC @2 << if exist $(cc16) $(link16) /NOLOGO /ONERROR:NOEXE /NOE @<< $(TMPDIR)\tclWin16.obj $@ nul $(TOOLS16)\lib\ ldllcew oldnames libw toolhelp $(TMPDIR)\tclWin16.def << if exist $(cc16) $(rc16) -i $(GENERICDIR) $(TCL_DEFINES) $(WINDIR)\tcl16.rc $@ $(TCLPIPEDLL): $(WINDIR)\stub16.c $(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $(WINDIR)\stub16.c set LIB=$(TOOLS32)\lib $(link32) $(linkdebug) $(conlflags) -out:$@ $(TMPDIR)\stub16.obj $(guilibs) $(CAT32): $(WINDIR)\cat.c $(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $? set LIB=$(TOOLS32)\lib $(link32) $(conlflags) -out:$@ -stack:16384 $(TMPDIR)\cat.obj $(conlibs) $(CAT16): $(WINDIR)\cat.c if exist $(cc16) $(cc16) $(DOS_CFLAGS) -Fo$(TMPDIR)\ $? set LIB=$(TOOLS16)\lib if exist $(cc16) $(link16) /NOLOGO /ONERROR:NOEXE /NOI /STACK:16384 \ $(TMPDIR)\cat.obj,$@,nul,llibce.lib,nul # # Special case object file targets # $(TMPDIR)\tclvc.def: $(DUMPEXTS) $(TCLOBJS) $(DUMPEXTS) -o $@ $(TCLDLL) @<< $(TCLOBJS) << $(TMPDIR)\testMain.obj: $(WINDIR)\tclAppInit.c $(cc32) $(TCL_CFLAGS) -DTCL_TEST -Fo$(TMPDIR)\testMain.obj $? # # Implicit rules # {$(WINDIR)}.c{$(TMPDIR)}.obj: $(cc32) $(TCL_CFLAGS) -Fo$(TMPDIR)\ $< {$(GENERICDIR)}.c{$(TMPDIR)}.obj: $(cc32) $(TCL_CFLAGS) -Fo$(TMPDIR)\ $< {$(ROOT)\compat}.c{$(TMPDIR)}.obj: $(cc32) $(TCL_CFLAGS) -Fo$(TMPDIR)\ $< {$(WINDIR)}.rc{$(TMPDIR)}.res: $(rc32) -fo $@ -r -i $(GENERICDIR) -i $(WINDIR) $(TCL_DEFINES) $< clean: -@del *.exp -@del *.lib -@del *.dll -@del *.exe -@del $(TMPDIR)\*.obj