#------------------------------------------------------------------------------ # # Microsoft Visual C++ 5.0+ makefile for [Incr Tcl/Tk]. # #------------------------------------------------------------------------------ # # This is the main Visual C++ makefile for the Win32 distribution # of [incr Tcl/Tk]. This is not the TEA makefile. # #------------------------------------------------------------------------------ # $Id: makefile.vc,v 1.8 2003/12/23 05:22:45 davygrvy Exp $ #------------------------------------------------------------------------------ !if "$(MSVCDIR)" == "" MSG = ^ You'll need to run vcvars32.bat from Developer Studio, first, to setup^ the environment. Jump to this line to read the new instructions. !error $(MSG) !endif #------------------------------------------------------------------------------ # HOW TO USE this makefile: # # 1) It is now necessary to have MSVCDir set in the environment. This is used # as a check to see if vcvars32.bat had been run prior to running nmake or # during the install of Microsoft Developer Studio, MSVCDir had been set # globally and the PATH adjusted. Either way is valid. # # You'll need to run vcvars32.bat contained in the MsDev's vc(98)/bin # directory to setup the proper environment, if needed, for your current # setup. This is a needed bootstrap requirement and allows the swapping of # different environments to be easier. # # 2) To use the Platform SDK (not expressly needed), run setenv.bat after # vcvars32.bat according to the instructions for it. This can also turn on # the 64-bit compiler, if your SDK has it. # # 3) Targets are: # release -- builds the core, the shell. (default) # core -- Only builds the core. # all -- builds everything. # test -- builds and runs the test suite. # tktest -- just builds the binaries for the test suite. # install -- installs the built binaries and libraries to $(INSTALLDIR) # as the root of the install tree. # clean -- removes the contents of $(TMP_DIR) # hose -- removes the contents of $(TMP_DIR) and $(OUT_DIR) # genstubs -- rebuilds the Stubs table and support files (dev only). # depend -- Generates an accurate set of source dependancies for this # makefile. Helpful to avoid problems when the sources are # refreshed and you rebuild, but can "overbuild" when common # headers like tkInt.h just get small changes. # winhelp -- builds the windows .hlp file for Itcl/Itk from the troff man # files. # # 4) Macros usable on the commandline: # TCLDIR= # Sets the location for where to find the Tcl headers and # libraries. The install point is assumed when not specified. # Tk does need the source directory, though. Tk comes very close # to not needing the sources, but does, in fact, require them. # # INSTALLDIR= # Sets where to install Tcl from the built binaries. # C:\Progra~1\Tcl is assumed when not specified. # # OPTS=static,msvcrt,linkexten,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. # linkexten = Affects the static option only to switch wishXX.exe # to have the dde and reg extension linked inside it. # threads = Turns on full multithreading support. # symbols = Adds symbols for step debugging. # profile = Adds profiling hooks. Map file is assumed. # # STATS=memdbg,compdbg,none # Sets optional memory and bytecode compiler debugging code added # to the core. The default is for none. Any combination of the # above may be used (comma separated). 'none' will over-ride # everything to nothing. # # memdbg = Enables the debugging memory allocator. # compdbg = Enables byte compilation logging. # # MACHINE=(IX86|IA64|ALPHA) # Set the machine type used for the compiler, linker, and # resource compiler. This hook is needed to tell the tools # when alternate platforms are requested. IX86 is the default # when not specified. # # TMP_DIR= # OUT_DIR= # Hooks to allow the intermediate and output directories to be # changed. $(OUT_DIR) is assumed to be # $(BINROOT)\(Release|Debug) based on if symbols are requested. # $(TMP_DIR) will de $(OUT_DIR)\ by default. # # TESTPAT= # Reads the tests requested to be run from this file. # # 5) Examples: # # Basic syntax of calling nmake looks like this: # nmake [-nologo] -f makefile.vc [target|macrodef [target|macrodef] [...]] # # Standard (no frills) # c:\tk_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat # Setting environment for using Microsoft Visual C++ tools. # c:\tk_src\win\>nmake -f makefile.vc release # c:\tk_src\win\>nmake -f makefile.vc install INSTALLDIR=c:\progra~1\tcl # # Building for Win64 # c:\tk_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat # Setting environment for using Microsoft Visual C++ tools. # c:\tk_src\win\>c:\progra~1\platfo~1\setenv.bat /pre64 /RETAIL # Targeting Windows pre64 RETAIL # c:\tk_src\win\>nmake -f makefile.vc MACHINE=IA64 # #------------------------------------------------------------------------------ MAKECMD = nmake.exe -nologo /$(MAKEFLAGS) -f makefile.vc release : cd itcl\win $(MAKECMD) release cd ..\..\itk\win $(MAKECMD) release cd $(MAKEDIR) genstubs : cd itcl\win $(MAKECMD) genstubs cd ..\..\itk\win $(MAKECMD) genstubs cd $(MAKEDIR) docs : cd itcl\win $(MAKECMD) winhelp cd ..\..\itk\win $(MAKECMD) winhelp cd $(MAKEDIR) install : cd itcl\win $(MAKECMD) install cd ..\..\itk\win $(MAKECMD) install cd $(MAKEDIR) test : cd itcl\win $(MAKECMD) test cd ..\..\itk\win $(MAKECMD) test cd $(MAKEDIR) dist-clean: cd itcl\win $(MAKECMD) clean cd ..\..\itk\win $(MAKECMD) clean cd $(MAKEDIR)