Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/win/makefile.vc @ 25

Last change on this file since 25 was 25, checked in by landauf, 18 years ago

added tcl to libs

File size: 36.0 KB
Line 
1#------------------------------------------------------------------------------
2# makefile.vc --
3#
4#       Microsoft Visual C++ makefile for use with nmake.exe v1.62+ (VC++ 5.0+)
5#
6# See the file "license.terms" for information on usage and redistribution
7# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8#
9# Copyright (c) 1995-1996 Sun Microsystems, Inc.
10# Copyright (c) 1998-2000 Ajuba Solutions.
11# Copyright (c) 2001-2005 ActiveState Corporation.
12# Copyright (c) 2001-2004 David Gravereaux.
13#
14#------------------------------------------------------------------------------
15# RCS: @(#) $Id: makefile.vc,v 1.175 2007/12/14 02:27:11 patthoyts Exp $
16#------------------------------------------------------------------------------
17
18# Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR)
19# or with the MS Platform SDK (MSSDK). Visual Studio .NET 2003 and 2005 define
20# VCINSTALLDIR instead.
21!if !defined(MSDEVDIR) && !defined(MSVCDIR) && !defined(MSSDK) && !defined(VCINSTALLDIR)
22MSG = ^
23You need to run vcvars32.bat from Developer Studio or setenv.bat from the^
24Platform SDK first to setup the environment.  Jump to this line to read^
25the build instructions.
26!error $(MSG)
27!endif
28
29#------------------------------------------------------------------------------
30# HOW TO USE this makefile:
31#
32# 1)  It is now necessary to have MSVCDir, MSDevDir or MSSDK set in the
33#     environment.  This is used as a check to see if vcvars32.bat had been
34#     run prior to running nmake or during the installation of Microsoft
35#     Visual C++, MSVCDir had been set globally and the PATH adjusted.
36#     Either way is valid.
37#
38#     You'll need to run vcvars32.bat contained in the MsDev's vc(98)/bin
39#     directory to setup the proper environment, if needed, for your
40#     current setup.  This is a needed bootstrap requirement and allows the
41#     swapping of different environments to be easier.
42#
43# 2)  To use the Platform SDK (not expressly needed), run setenv.bat after
44#     vcvars32.bat according to the instructions for it.  This can also
45#     turn on the 64-bit compiler, if your SDK has it.
46#
47# 3)  Targets are:
48#       release  -- Builds the core, the shell and the dlls. (default)
49#       dlls     -- Just builds the windows extensions and the 16-bit DOS
50#                   pipe/thunk helper app.
51#       shell    -- Just builds the shell and the core.
52#       core     -- Only builds the core [tclXX.(dll|lib)].
53#       all      -- Builds everything.
54#       test     -- Builds and runs the test suite.
55#       tcltest  -- Just builds the test shell.
56#       install  -- Installs the built binaries and libraries to $(INSTALLDIR)
57#                   as the root of the install tree.
58#       tidy/clean/hose -- varying levels of cleaning.
59#       genstubs -- Rebuilds the Stubs table and support files (dev only).
60#       depend   -- Generates an accurate set of source dependancies for this
61#                   makefile.  Helpful to avoid problems when the sources are
62#                   refreshed and you rebuild, but can "overbuild" when common
63#                   headers like tclInt.h just get small changes.
64#       winhelp  -- Builds the windows .hlp file for Tcl from the troff man
65#                   files found in $(ROOT)\doc .
66#
67# 4)  Macros usable on the commandline:
68#       INSTALLDIR=<path>
69#               Sets where to install Tcl from the built binaries.
70#               C:\Progra~1\Tcl is assumed when not specified.
71#
72#       OPTS=static,msvcrt,staticpkg,threads,symbols,profile,loimpact,unchecked,none
73#               Sets special options for the core.  The default is for none.
74#               Any combination of the above may be used (comma separated).
75#               'none' will over-ride everything to nothing.
76#
77#               static  =  Builds a static library of the core instead of a
78#                          dll.  The shell will be static (and large), as well.
79#               msvcrt  =  Effects the static option only to switch it from
80#                          using libcmt(d) as the C runtime [by default] to
81#                          msvcrt(d). This is useful for static embedding
82#                          support.
83#               staticpkg = Effects the static option only to switch
84#                          tclshXX.exe to have the dde and reg extension linked
85#                          inside it.
86#               threads =  Turns on full multithreading support.
87#               thrdalloc = Use the thread allocator (shared global free pool).
88#               thrdstorage = Use the generic thread storage support.
89#               symbols =  Adds symbols for step debugging.
90#               profile =  Adds profiling hooks.  Map file is assumed.
91#               loimpact =  Adds a flag for how NT treats the heap to keep memory
92#                          in use, low.  This is said to impact alloc performance.
93#               unchecked = Allows a symbols build to not use the debug
94#                          enabled runtime (msvcrt.dll not msvcrtd.dll
95#                          or libcmt.lib not libcmtd.lib).
96#
97#       STATS=memdbg,compdbg,none
98#               Sets optional memory and bytecode compiler debugging code added
99#               to the core.  The default is for none.  Any combination of the
100#               above may be used (comma separated).  'none' will over-ride
101#               everything to nothing.
102#
103#               memdbg   = Enables the debugging memory allocator.
104#               compdbg  = Enables byte compilation logging.
105#
106#       CHECKS=nodep,fullwarn,64bit,none
107#               Sets special macros for checking compatability.
108#
109#               nodep    = Turns off compatability macros to ensure the core
110#                           isn't being built with deprecated functions.
111#               fullwarn = Builds with full compiler and link warnings enabled.
112#                           Very verbose.
113#               64bit    = Enable 64bit portability warnings (if available)
114#
115#       MACHINE=(IX86|IA64|AMD64|ALPHA)
116#               Set the machine type used for the compiler, linker, and
117#               resource compiler.  This hook is needed to tell the tools
118#               when alternate platforms are requested.  IX86 is the default
119#               when not specified.
120#
121#       TMP_DIR=<path>
122#       OUT_DIR=<path>
123#               Hooks to allow the intermediate and output directories to be
124#               changed.  $(OUT_DIR) is assumed to be
125#               $(BINROOT)\(Release|Debug) based on if symbols are requested.
126#               $(TMP_DIR) will de $(OUT_DIR)\<buildtype> by default.
127#
128#       TESTPAT=<file>
129#               Reads the tests requested to be run from this file.
130#
131#       CFG_ENCODING=encoding
132#               name of encoding for configuration information. Defaults
133#               to cp1252
134#
135# 5)  Examples:
136#
137#       Basic syntax of calling nmake looks like this:
138#       nmake [-nologo] -f makefile.vc [target|macrodef [target|macrodef] [...]]
139#
140#                        Standard (no frills)
141#       c:\tcl_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
142#       Setting environment for using Microsoft Visual C++ tools.
143#       c:\tcl_src\win\>nmake -f makefile.vc release
144#       c:\tcl_src\win\>nmake -f makefile.vc install INSTALLDIR=c:\progra~1\tcl
145#
146#                         Building for Win64
147#       c:\tcl_src\win\>c:\progra~1\micros~1\vc98\bin\vcvars32.bat
148#       Setting environment for using Microsoft Visual C++ tools.
149#       c:\tcl_src\win\>c:\progra~1\platfo~1\setenv.bat /pre64 /RETAIL
150#       Targeting Windows pre64 RETAIL
151#       c:\tcl_src\win\>nmake -f makefile.vc MACHINE=IA64
152#
153#------------------------------------------------------------------------------
154#==============================================================================
155###############################################################################
156
157
158#    //==================================================================\\
159#   >>[               -> Do not modify below this line. <-               ]<<
160#   >>[  Please, use the commandline macros to modify how Tcl is built.  ]<<
161#   >>[  If you need more features, send us a patch for more macros.     ]<<
162#    \\==================================================================//
163
164
165###############################################################################
166#==============================================================================
167#------------------------------------------------------------------------------
168
169!if !exist("makefile.vc")
170MSG = ^
171You must run this makefile only from the directory it is in.^
172Please `cd` to its location first.
173!error $(MSG)
174!endif
175
176PROJECT = tcl
177!include "rules.vc"
178
179STUBPREFIX      = $(PROJECT)stub
180DOTVERSION      = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)
181VERSION         = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION)
182
183DDEDOTVERSION = 1.3
184DDEVERSION = $(DDEDOTVERSION:.=)
185
186REGDOTVERSION = 1.2
187REGVERSION = $(REGDOTVERSION:.=)
188
189BINROOT         = .
190ROOT            = ..
191
192TCLIMPLIB       = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
193TCLLIBNAME      = $(PROJECT)$(VERSION)$(SUFX).$(EXT)
194TCLLIB          = $(OUT_DIR)\$(TCLLIBNAME)
195
196TCLSTUBLIBNAME  = $(STUBPREFIX)$(VERSION).lib
197TCLSTUBLIB      = $(OUT_DIR)\$(TCLSTUBLIBNAME)
198
199TCLSHNAME       = $(PROJECT)sh$(VERSION)$(SUFX).exe
200TCLSH           = $(OUT_DIR)\$(TCLSHNAME)
201TCLPIPEDLLNAME  = $(PROJECT)pip$(VERSION)$(SUFX:t=).dll
202TCLPIPEDLL      = $(OUT_DIR)\$(TCLPIPEDLLNAME)
203
204TCLREGLIBNAME   = $(PROJECT)reg$(REGVERSION)$(SUFX:t=).$(EXT)
205TCLREGLIB       = $(OUT_DIR)\$(TCLREGLIBNAME)
206
207TCLDDELIBNAME   = $(PROJECT)dde$(DDEVERSION)$(SUFX:t=).$(EXT)
208TCLDDELIB       = $(OUT_DIR)\$(TCLDDELIBNAME)
209
210TCLTEST         = $(OUT_DIR)\$(PROJECT)test.exe
211CAT32           = $(OUT_DIR)\cat32.exe
212
213### Make sure we use backslash only.
214LIB_INSTALL_DIR         = $(_INSTALLDIR)\lib
215BIN_INSTALL_DIR         = $(_INSTALLDIR)\bin
216DOC_INSTALL_DIR         = $(_INSTALLDIR)\doc
217SCRIPT_INSTALL_DIR      = $(_INSTALLDIR)\lib\tcl$(DOTVERSION)
218INCLUDE_INSTALL_DIR     = $(_INSTALLDIR)\include
219
220TCLSHOBJS = \
221        $(TMP_DIR)\tclAppInit.obj \
222!if $(TCL_USE_STATIC_PACKAGES)
223        $(TMP_DIR)\tclWinReg.obj \
224        $(TMP_DIR)\tclWinDde.obj \
225!endif
226        $(TMP_DIR)\tclsh.res
227
228TCLTESTOBJS = \
229        $(TMP_DIR)\tclTest.obj \
230        $(TMP_DIR)\tclTestObj.obj \
231        $(TMP_DIR)\tclTestProcBodyObj.obj \
232        $(TMP_DIR)\tclThreadTest.obj \
233        $(TMP_DIR)\tclWinTest.obj \
234!if $(TCL_USE_STATIC_PACKAGES)
235        $(TMP_DIR)\tclWinReg.obj \
236        $(TMP_DIR)\tclWinDde.obj \
237!endif
238        $(TMP_DIR)\testMain.obj
239
240TCLOBJS = \
241        $(TMP_DIR)\regcomp.obj \
242        $(TMP_DIR)\regerror.obj \
243        $(TMP_DIR)\regexec.obj \
244        $(TMP_DIR)\regfree.obj \
245        $(TMP_DIR)\tclAlloc.obj \
246        $(TMP_DIR)\tclAsync.obj \
247        $(TMP_DIR)\tclBasic.obj \
248        $(TMP_DIR)\tclBinary.obj \
249        $(TMP_DIR)\tclCkalloc.obj \
250        $(TMP_DIR)\tclClock.obj \
251        $(TMP_DIR)\tclCmdAH.obj \
252        $(TMP_DIR)\tclCmdIL.obj \
253        $(TMP_DIR)\tclCmdMZ.obj \
254        $(TMP_DIR)\tclCompCmds.obj \
255        $(TMP_DIR)\tclCompExpr.obj \
256        $(TMP_DIR)\tclCompile.obj \
257        $(TMP_DIR)\tclConfig.obj \
258        $(TMP_DIR)\tclDate.obj \
259        $(TMP_DIR)\tclDictObj.obj \
260        $(TMP_DIR)\tclEncoding.obj \
261        $(TMP_DIR)\tclEnv.obj \
262        $(TMP_DIR)\tclEvent.obj \
263        $(TMP_DIR)\tclExecute.obj \
264        $(TMP_DIR)\tclFCmd.obj \
265        $(TMP_DIR)\tclFileName.obj \
266        $(TMP_DIR)\tclGet.obj \
267        $(TMP_DIR)\tclHash.obj \
268        $(TMP_DIR)\tclHistory.obj \
269        $(TMP_DIR)\tclIndexObj.obj \
270        $(TMP_DIR)\tclInterp.obj \
271        $(TMP_DIR)\tclIO.obj \
272        $(TMP_DIR)\tclIOCmd.obj \
273        $(TMP_DIR)\tclIOGT.obj \
274        $(TMP_DIR)\tclIOSock.obj \
275        $(TMP_DIR)\tclIOUtil.obj \
276        $(TMP_DIR)\tclIORChan.obj \
277        $(TMP_DIR)\tclLink.obj \
278        $(TMP_DIR)\tclListObj.obj \
279        $(TMP_DIR)\tclLiteral.obj \
280        $(TMP_DIR)\tclLoad.obj \
281        $(TMP_DIR)\tclMain.obj \
282        $(TMP_DIR)\tclNamesp.obj \
283        $(TMP_DIR)\tclNotify.obj \
284        $(TMP_DIR)\tclObj.obj \
285        $(TMP_DIR)\tclPanic.obj \
286        $(TMP_DIR)\tclParse.obj \
287        $(TMP_DIR)\tclPathObj.obj \
288        $(TMP_DIR)\tclPipe.obj \
289        $(TMP_DIR)\tclPkg.obj \
290        $(TMP_DIR)\tclPkgConfig.obj \
291        $(TMP_DIR)\tclPosixStr.obj \
292        $(TMP_DIR)\tclPreserve.obj \
293        $(TMP_DIR)\tclProc.obj \
294        $(TMP_DIR)\tclRegexp.obj \
295        $(TMP_DIR)\tclResolve.obj \
296        $(TMP_DIR)\tclResult.obj \
297        $(TMP_DIR)\tclScan.obj \
298        $(TMP_DIR)\tclStringObj.obj \
299        $(TMP_DIR)\tclStrToD.obj \
300        $(TMP_DIR)\tclStubInit.obj \
301        $(TMP_DIR)\tclStubLib.obj \
302        $(TMP_DIR)\tclThread.obj \
303        $(TMP_DIR)\tclThreadAlloc.obj \
304        $(TMP_DIR)\tclThreadJoin.obj \
305        $(TMP_DIR)\tclThreadStorage.obj \
306        $(TMP_DIR)\tclTimer.obj \
307        $(TMP_DIR)\tclTomMathInterface.obj \
308        $(TMP_DIR)\tclTrace.obj \
309        $(TMP_DIR)\tclUtf.obj \
310        $(TMP_DIR)\tclUtil.obj \
311        $(TMP_DIR)\tclVar.obj \
312        $(TMP_DIR)\tclWin32Dll.obj \
313        $(TMP_DIR)\tclWinChan.obj \
314        $(TMP_DIR)\tclWinConsole.obj \
315        $(TMP_DIR)\tclWinSerial.obj \
316        $(TMP_DIR)\tclWinError.obj \
317        $(TMP_DIR)\tclWinFCmd.obj \
318        $(TMP_DIR)\tclWinFile.obj \
319        $(TMP_DIR)\tclWinInit.obj \
320        $(TMP_DIR)\tclWinLoad.obj \
321        $(TMP_DIR)\tclWinNotify.obj \
322        $(TMP_DIR)\tclWinPipe.obj \
323        $(TMP_DIR)\tclWinSock.obj \
324        $(TMP_DIR)\tclWinThrd.obj \
325        $(TMP_DIR)\tclWinTime.obj \
326        $(TMP_DIR)\bncore.obj \
327        $(TMP_DIR)\bn_reverse.obj \
328        $(TMP_DIR)\bn_fast_s_mp_mul_digs.obj \
329        $(TMP_DIR)\bn_fast_s_mp_sqr.obj \
330        $(TMP_DIR)\bn_mp_add.obj \
331        $(TMP_DIR)\bn_mp_add_d.obj \
332        $(TMP_DIR)\bn_mp_and.obj \
333        $(TMP_DIR)\bn_mp_clamp.obj \
334        $(TMP_DIR)\bn_mp_clear.obj \
335        $(TMP_DIR)\bn_mp_clear_multi.obj \
336        $(TMP_DIR)\bn_mp_cmp.obj \
337        $(TMP_DIR)\bn_mp_cmp_d.obj \
338        $(TMP_DIR)\bn_mp_cmp_mag.obj \
339        $(TMP_DIR)\bn_mp_copy.obj \
340        $(TMP_DIR)\bn_mp_count_bits.obj \
341        $(TMP_DIR)\bn_mp_div.obj \
342        $(TMP_DIR)\bn_mp_div_d.obj \
343        $(TMP_DIR)\bn_mp_div_2.obj \
344        $(TMP_DIR)\bn_mp_div_2d.obj \
345        $(TMP_DIR)\bn_mp_div_3.obj \
346        $(TMP_DIR)\bn_mp_exch.obj \
347        $(TMP_DIR)\bn_mp_expt_d.obj \
348        $(TMP_DIR)\bn_mp_grow.obj \
349        $(TMP_DIR)\bn_mp_init.obj \
350        $(TMP_DIR)\bn_mp_init_copy.obj \
351        $(TMP_DIR)\bn_mp_init_multi.obj \
352        $(TMP_DIR)\bn_mp_init_set.obj \
353        $(TMP_DIR)\bn_mp_init_size.obj \
354        $(TMP_DIR)\bn_mp_karatsuba_mul.obj \
355        $(TMP_DIR)\bn_mp_karatsuba_sqr.obj \
356        $(TMP_DIR)\bn_mp_lshd.obj \
357        $(TMP_DIR)\bn_mp_mod.obj \
358        $(TMP_DIR)\bn_mp_mod_2d.obj \
359        $(TMP_DIR)\bn_mp_mul.obj \
360        $(TMP_DIR)\bn_mp_mul_2.obj \
361        $(TMP_DIR)\bn_mp_mul_2d.obj \
362        $(TMP_DIR)\bn_mp_mul_d.obj \
363        $(TMP_DIR)\bn_mp_neg.obj \
364        $(TMP_DIR)\bn_mp_or.obj \
365        $(TMP_DIR)\bn_mp_radix_size.obj \
366        $(TMP_DIR)\bn_mp_radix_smap.obj \
367        $(TMP_DIR)\bn_mp_read_radix.obj \
368        $(TMP_DIR)\bn_mp_rshd.obj \
369        $(TMP_DIR)\bn_mp_set.obj \
370        $(TMP_DIR)\bn_mp_shrink.obj \
371        $(TMP_DIR)\bn_mp_sqr.obj \
372        $(TMP_DIR)\bn_mp_sqrt.obj \
373        $(TMP_DIR)\bn_mp_sub.obj \
374        $(TMP_DIR)\bn_mp_sub_d.obj \
375        $(TMP_DIR)\bn_mp_to_unsigned_bin.obj \
376        $(TMP_DIR)\bn_mp_to_unsigned_bin_n.obj \
377        $(TMP_DIR)\bn_mp_toom_mul.obj \
378        $(TMP_DIR)\bn_mp_toom_sqr.obj \
379        $(TMP_DIR)\bn_mp_toradix_n.obj \
380        $(TMP_DIR)\bn_mp_unsigned_bin_size.obj \
381        $(TMP_DIR)\bn_mp_xor.obj \
382        $(TMP_DIR)\bn_mp_zero.obj \
383        $(TMP_DIR)\bn_s_mp_add.obj \
384        $(TMP_DIR)\bn_s_mp_mul_digs.obj \
385        $(TMP_DIR)\bn_s_mp_sqr.obj \
386        $(TMP_DIR)\bn_s_mp_sub.obj \
387!if !$(STATIC_BUILD)
388        $(TMP_DIR)\tcl.res
389!endif
390
391TCLSTUBOBJS = $(TMP_DIR)\tclStubLib.obj
392
393### The following paths CANNOT have spaces in them.
394COMPATDIR       = $(ROOT)\compat
395DOCDIR          = $(ROOT)\doc
396GENERICDIR      = $(ROOT)\generic
397TOMMATHDIR      = $(ROOT)\libtommath
398TOOLSDIR        = $(ROOT)\tools
399WINDIR          = $(ROOT)\win
400
401
402#---------------------------------------------------------------------
403# Compile flags
404#---------------------------------------------------------------------
405
406!if !$(DEBUG)
407!if $(OPTIMIZING)
408### This cranks the optimization level to maximize speed
409cdebug  = -O2 $(OPTIMIZATIONS)
410!else
411cdebug  =
412!endif
413!else if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
414### Warnings are too many, can't support warnings into errors.
415cdebug  = -Zi -Od $(DEBUGFLAGS)
416!else
417cdebug  = -Zi -WX $(DEBUGFLAGS)
418!endif
419
420### Declarations common to all compiler options
421cwarn = $(WARNINGS) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
422cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\
423
424!if $(MSVCRT)
425!if $(DEBUG) && !$(UNCHECKED)
426crt = -MDd
427!else
428crt = -MD
429!endif
430!else
431!if $(DEBUG) && !$(UNCHECKED)
432crt = -MTd
433!else
434crt = -MT
435!endif
436!endif
437
438TCL_INCLUDES    = -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(TOMMATHDIR)"
439TCL_DEFINES     = -DTCL_PIPE_DLL=\"$(TCLPIPEDLLNAME)\" -DTCL_TOMMATH -DMP_PREC=4 -Dinline=__inline
440BASE_CFLAGS     = $(cflags) $(cdebug) $(crt) $(TCL_INCLUDES) $(TCL_DEFINES)
441CON_CFLAGS      = $(cflags) $(cdebug) $(crt) -DCONSOLE
442TCL_CFLAGS      = $(BASE_CFLAGS) $(OPTDEFINES)
443STUB_CFLAGS     = $(cflags) $(cdebug) $(OPTDEFINES)
444
445
446#---------------------------------------------------------------------
447# Link flags
448#---------------------------------------------------------------------
449
450!if $(DEBUG)
451ldebug  = -debug:full -debugtype:cv
452!else
453ldebug  = -release -opt:ref -opt:icf,3
454!endif
455
456### Declarations common to all linker options
457lflags  = -nologo -machine:$(MACHINE) $(LINKERFLAGS) $(ldebug)
458
459!if $(PROFILE)
460lflags  = $(lflags) -profile
461!endif
462
463!if $(ALIGN98_HACK) && !$(STATIC_BUILD)
464### Align sections for PE size savings.
465lflags  = $(lflags) -opt:nowin98
466!else if !$(ALIGN98_HACK) && $(STATIC_BUILD)
467### Align sections for speed in loading by choosing the virtual page size.
468lflags  = $(lflags) -align:4096
469!endif
470
471!if $(LOIMPACT)
472lflags  = $(lflags) -ws:aggressive
473!endif
474
475dlllflags = $(lflags) -dll
476conlflags = $(lflags) -subsystem:console
477guilflags = $(lflags) -subsystem:windows
478
479baselibs   = kernel32.lib user32.lib ws2_32.lib
480# Avoid 'unresolved external symbol __security_cookie' errors.
481# c.f. http://support.microsoft.com/?id=894573
482!if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
483!if $(VCVERSION) > 1399 && $(VCVERSION) < 1500
484baselibs   = $(baselibs) bufferoverflowU.lib
485!endif
486!endif
487
488#---------------------------------------------------------------------
489# TclTest flags
490#---------------------------------------------------------------------
491
492!if "$(TESTPAT)" != ""
493TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT)
494!endif
495
496
497#---------------------------------------------------------------------
498# Project specific targets
499#---------------------------------------------------------------------
500
501release:    setup $(TCLSH) $(TCLSTUBLIB) dlls
502core:       setup $(TCLLIB) $(TCLSTUBLIB)
503shell:      setup $(TCLSH)
504dlls:       setup $(TCLPIPEDLL) $(TCLREGLIB) $(TCLDDELIB)
505all:        setup $(TCLSH) $(TCLSTUBLIB) dlls $(CAT32)
506tcltest:    setup $(TCLTEST) dlls $(CAT32)
507install:    install-binaries install-libraries install-docs
508
509
510test: setup $(TCLTEST) dlls $(CAT32)
511        set TCL_LIBRARY=$(ROOT)/library
512!if "$(OS)" == "Windows_NT"  || "$(MSVCDIR)" == "IDE"
513        $(TCLTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) -loadfile <<
514                set ::ddelib [file normalize $(TCLDDELIB:\=/)]
515                set ::reglib [file normalize $(TCLREGLIB:\=/)]
516<<
517!else
518        @echo Please wait while the tests are collected...
519        $(TCLTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) -loadfile << > tests.log
520                set ::ddelib [file normalize $(TCLDDELIB:\=/)]
521                set ::reglib [file normalize $(TCLREGLIB:\=/)]
522<<
523        type tests.log | more
524!endif
525
526runtest: setup $(TCLTEST) dlls $(CAT32)
527        set TCL_LIBRARY=$(ROOT)/library
528        $(TCLTEST)
529
530setup:
531        @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR)
532        @if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR)
533
534!if !$(STATIC_BUILD)
535$(TCLIMPLIB): $(TCLLIB)
536!endif
537
538$(TCLLIB): $(TCLOBJS)
539!if $(STATIC_BUILD)
540        $(lib32) -nologo -out:$@ @<<
541$**
542<<
543!else
544        $(link32) $(dlllflags) -base:@$(WINDIR)\coffbase.txt,tcl -out:$@ \
545                $(baselibs) @<<
546$**
547<<
548        $(_VC_MANIFEST_EMBED_DLL)
549        -@del $*.exp
550!endif
551
552$(TCLSTUBLIB): $(TCLSTUBOBJS)
553        $(lib32) -nologo -out:$@ $(TCLSTUBOBJS)
554
555$(TCLSH): $(TCLSHOBJS) $(TCLIMPLIB)
556        $(link32) $(conlflags) -stack:2300000 -out:$@ $(baselibs) $**
557        $(_VC_MANIFEST_EMBED_EXE)
558
559$(TCLTEST): $(TCLTESTOBJS) $(TCLIMPLIB)
560        $(link32) $(conlflags) -stack:2300000 -out:$@ $(baselibs) $**
561        $(_VC_MANIFEST_EMBED_EXE)
562
563$(TCLPIPEDLL): $(WINDIR)\stub16.c
564        $(cc32) $(CON_CFLAGS) -Fo$(TMP_DIR)\ $(WINDIR)\stub16.c
565        $(link32) $(conlflags) -out:$@ $(TMP_DIR)\stub16.obj $(baselibs)
566        $(_VC_MANIFEST_EMBED_DLL)
567
568!if $(STATIC_BUILD)
569!if !$(TCL_USE_STATIC_PACKAGES)
570$(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj
571        $(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinDde.obj
572!endif
573!else
574$(TCLDDELIB): $(TMP_DIR)\tclWinDde.obj $(TCLSTUBLIB)
575        $(link32) $(dlllflags) -base:@$(WINDIR)\coffbase.txt,tcldde -out:$@ \
576                $** $(baselibs)
577        $(_VC_MANIFEST_EMBED_DLL)
578        -@del $*.exp
579        -@del $*.lib
580!endif
581
582!if $(STATIC_BUILD)
583!if !$(TCL_USE_STATIC_PACKAGES)
584$(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj
585        $(lib32) -nologo -out:$@ $(TMP_DIR)\tclWinReg.obj
586!endif
587!else
588$(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB)
589        $(link32) $(dlllflags) -base:@$(WINDIR)\coffbase.txt,tclreg -out:$@ \
590                $** $(baselibs)
591        $(_VC_MANIFEST_EMBED_DLL)
592        -@del $*.exp
593        -@del $*.lib
594!endif
595
596$(CAT32): $(WINDIR)\cat.c
597        $(cc32) $(CON_CFLAGS) -Fo$(TMP_DIR)\ $?
598        $(link32) $(conlflags) -out:$@ -stack:16384 $(TMP_DIR)\cat.obj \
599                $(baselibs)
600        $(_VC_MANIFEST_EMBED_EXE)
601
602#---------------------------------------------------------------------
603# Regenerate the stubs files.  [Development use only]
604#---------------------------------------------------------------------
605
606genstubs:
607!if !exist($(TCLSH))
608        @echo Build tclsh first!
609!else
610        $(TCLSH) $(TOOLSDIR:\=/)/genStubs.tcl $(GENERICDIR:\=/) \
611                $(GENERICDIR:\=/)/tcl.decls $(GENERICDIR:\=/)/tclInt.decls \
612                $(GENERICDIR:\=/)/tclTomMath.decls
613!endif
614
615
616#----------------------------------------------------------------------
617# The following target generates the file generic/tclTomMath.h.
618# It needs to be run (and the results checked) after updating
619# to a new release of libtommath.
620#----------------------------------------------------------------------
621
622gentommath_h:
623!if !exist($(TCLSH))
624        @echo Build tclsh first!
625!else
626        $(TCLSH) "$(TOOLSDIR:\=/)/fix_tommath_h.tcl" \
627                "$(TOMMATHDIR:\=/)/tommath.h" \
628                > "$(GENERICDIR)\tclTomMath.h"
629!endif
630
631#---------------------------------------------------------------------
632# Build the windows help file.
633#---------------------------------------------------------------------
634
635TCLHLPBASE      = $(PROJECT)$(VERSION)
636HELPFILE        = $(OUT_DIR)\$(TCLHLPBASE).hlp
637HELPCNT         = $(OUT_DIR)\$(TCLHLPBASE).cnt
638DOCTMP_DIR      = $(OUT_DIR)\$(PROJECT)_docs
639HELPRTF         = $(DOCTMP_DIR)\$(PROJECT).rtf
640MAN2HELP        = $(DOCTMP_DIR)\man2help.tcl
641MAN2HELP2       = $(DOCTMP_DIR)\man2help2.tcl
642INDEX           = $(DOCTMP_DIR)\index.tcl
643BMP             = $(DOCTMP_DIR)\feather.bmp
644BMP_NOPATH      = feather.bmp
645MAN2TCL         = $(DOCTMP_DIR)\man2tcl.exe
646
647winhelp: docsetup $(HELPFILE)
648
649docsetup:
650        @if not exist $(DOCTMP_DIR)\nul mkdir $(DOCTMP_DIR)
651
652$(MAN2HELP) $(MAN2HELP2) $(INDEX) $(BMP): $(TOOLSDIR)\$$(@F)
653        @$(CPY) $(TOOLSDIR)\$(@F) $(@D)
654
655$(HELPFILE): $(HELPRTF) $(BMP)
656        cd $(DOCTMP_DIR)
657        start /wait hcrtf.exe -x <<$(PROJECT).hpj
658[OPTIONS]
659COMPRESS=12 Hall Zeck
660LCID=0x409 0x0 0x0 ; English (United States)
661TITLE=Tcl/Tk Reference Manual
662BMROOT=.
663CNT=$(@B).cnt
664HLP=$(@B).hlp
665
666[FILES]
667$(PROJECT).rtf
668
669[WINDOWS]
670main="Tcl/Tk Reference Manual",,27648,(r15263976),(r65535)
671
672[CONFIG]
673BrowseButtons()
674CreateButton(1, "Web", ExecFile("http://www.tcl.tk"))
675CreateButton(2, "SF", ExecFile("http://sf.net/projects/tcl"))
676CreateButton(3, "Wiki", ExecFile("http://wiki.tcl.tk"))
677CreateButton(4, "FAQ", ExecFile("http://www.purl.org/NET/Tcl-FAQ/"))
678<<
679        cd $(MAKEDIR)
680        @$(CPY) "$(DOCTMP_DIR)\$(@B).hlp" "$(OUT_DIR)"
681        @$(CPY) "$(DOCTMP_DIR)\$(@B).cnt" "$(OUT_DIR)"
682
683$(MAN2TCL): $(TOOLSDIR)\$$(@B).c
684        $(cc32) $(TCL_CFLAGS) -Fo$(@D)\ $(TOOLSDIR)\$(@B).c
685        $(link32) $(conlflags) -out:$@ -stack:16384 $(@D)\man2tcl.obj
686        $(_VC_MANIFEST_EMBED_EXE)
687
688$(HELPRTF): $(MAN2TCL) $(MAN2HELP) $(MAN2HELP2) $(INDEX) $(DOCDIR)\*
689        $(TCLSH) $(MAN2HELP) -bitmap $(BMP_NOPATH) $(PROJECT) $(VERSION) $(DOCDIR:\=/)
690
691install-docs:
692!if exist($(HELPFILE))
693        @$(CPY) "$(HELPFILE)" "$(DOC_INSTALL_DIR)\"
694        @$(CPY) "$(HELPCNT)" "$(DOC_INSTALL_DIR)\"
695!endif
696
697#---------------------------------------------------------------------
698# Build tclConfig.sh for the TEA build system.
699#---------------------------------------------------------------------
700
701tclConfig: $(OUT_DIR)\tclConfig.sh
702
703$(OUT_DIR)\tclConfig.sh: $(WINDIR)\tclConfig.sh.in
704        @echo Creating tclConfig.sh
705        @nmakehlp -s << $** >$@
706@TCL_DLL_FILE@       $(TCLLIBNAME)
707@TCL_VERSION@        $(DOTVERSION)
708@TCL_MAJOR_VERSION@  $(TCL_MAJOR_VERSION)
709@TCL_MINOR_VERSION@  $(TCL_MINOR_VERSION)
710@TCL_PATCH_LEVEL@    $(TCL_PATCH_LEVEL)
711@CC@                 $(CC)
712@DEFS@               $(TCL_CFLAGS)
713@CFLAGS_DEBUG@       -nologo -c -W3 -YX -Fp$(TMP_DIR)\ -MDd
714@CFLAGS_OPTIMIZE@    -nologo -c -W3 -YX -Fp$(TMP_DIR)\ -MD
715@LDFLAGS_DEBUG@      -nologo -machine:$(MACHINE) -debug:full -debugtype:cv
716@LDFLAGS_OPTIMIZE@   -nologo -machine:$(MACHINE) -release -opt:ref -opt:icf,3
717@TCL_DBGX@           $(SUFX)
718@TCL_LIB_FILE@       $(PROJECT)$(VERSION)$(SUFX).lib
719@TCL_NEEDS_EXP_FILE@
720@LIBS@               $(baselibs)
721@prefix@             $(_INSTALLDIR)
722@exec_prefix@        $(BIN_INSTALL_DIR)
723@SHLIB_CFLAGS@       
724@STLIB_CFLAGS@       
725@CFLAGS_WARNING@     -W3
726@EXTRA_CFLAGS@       -YX
727@SHLIB_LD@           $(link32) $(dlllflags)
728@STLIB_LD@           $(lib32) -nologo
729@SHLIB_LD_LIBS@      $(baselibs)
730@SHLIB_SUFFIX@       .dll
731@DL_LIBS@
732@LDFLAGS@
733@TCL_LD_SEARCH_FLAGS@
734@LIBOBJS@
735@RANLIB@
736@TCL_LIB_FLAG@
737@TCL_BUILD_LIB_SPEC@
738@TCL_LIB_SPEC@       $(LIB_INSTALL_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
739@TCL_INCLUDE_SPEC@   -I$(INCLUDE_INSTALL_DIR)
740@TCL_LIB_VERSIONS_OK@
741@TCL_SRC_DIR@        $(ROOT)
742@TCL_PACKAGE_PATH@   
743@TCL_STUB_LIB_FILE@  $(TCLSTUBLIBNAME)
744@TCL_STUB_LIB_FLAG@  $(TCLSTUBLIBNAME)
745@TCL_STUB_LIB_SPEC@  -L$(LIB_INSTALL_DIR) $(TCLSTUBLIBNAME)
746@TCL_THREADS@        $(TCL_THREADS)
747@TCL_BUILD_STUB_LIB_SPEC@ -L$(OUT_DIR) $(TCLSTUBLIBNAME)
748@TCL_BUILD_STUB_LIB_PATH@ $(TCLSTUBLIB)
749@TCL_STUB_LIB_PATH@  $(LIB_INSTALL_DIR)\$(TCLSTUBLIBNAME)
750@CFG_TCL_EXPORT_FILE_SUFFIX@  $(VERSION)$(SUFX).lib
751@CFG_TCL_SHARED_LIB_SUFFIX@   $(VERSION)$(SUFX).dll
752@CFG_TCL_UNSHARED_LIB_SUFFIX@ $(VERSION)$(SUFX).lib
753!if $(STATIC_BUILD)
754@TCL_SHARED_BUILD@   0
755!else
756@TCL_SHARED_BUILD@   1
757!endif
758<<
759
760
761#---------------------------------------------------------------------
762# The following target generates the file generic/tclDate.c
763# from the yacc grammar found in generic/tclGetDate.y.  This is
764# only run by hand as yacc is not available in all environments.
765# The name of the .c file is different than the name of the .y file
766# so that make doesn't try to automatically regenerate the .c file.
767#---------------------------------------------------------------------
768
769gendate:
770        bison --output-file=$(GENERICDIR)/tclDate.c \
771        --name-prefix=TclDate \
772        $(GENERICDIR)/tclGetDate.y
773
774#---------------------------------------------------------------------
775# Special case object file targets
776#---------------------------------------------------------------------
777
778$(TMP_DIR)\testMain.obj: $(WINDIR)\tclAppInit.c
779        $(cc32) $(TCL_CFLAGS) -DTCL_TEST \
780            -DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \
781            -Fo$@ $?
782
783$(TMP_DIR)\tclTest.obj: $(GENERICDIR)\tclTest.c
784        $(cc32) $(TCL_CFLAGS) -Fo$@ $?
785
786$(TMP_DIR)\tclTestObj.obj: $(GENERICDIR)\tclTestObj.c
787        $(cc32) $(TCL_CFLAGS) -Fo$@ $?
788
789$(TMP_DIR)\tclWinTest.obj: $(WINDIR)\tclWinTest.c
790        $(cc32) $(TCL_CFLAGS) -Fo$@ $?
791
792$(TMP_DIR)\tclPkgConfig.obj: $(GENERICDIR)\tclPkgConfig.c
793        $(cc32) -DBUILD_tcl $(TCL_CFLAGS) \
794        -DCFG_INSTALL_LIBDIR="\"$(LIB_INSTALL_DIR:\=\\)\"" \
795        -DCFG_INSTALL_BINDIR="\"$(BIN_INSTALL_DIR:\=\\)\"" \
796        -DCFG_INSTALL_SCRDIR="\"$(SCRIPT_INSTALL_DIR:\=\\)\"" \
797        -DCFG_INSTALL_INCDIR="\"$(INCLUDE_INSTALL_DIR:\=\\)\"" \
798        -DCFG_INSTALL_DOCDIR="\"$(DOC_INSTALL_DIR:\=\\)\""      \
799        -DCFG_RUNTIME_LIBDIR="\"$(LIB_INSTALL_DIR:\=\\)\"" \
800        -DCFG_RUNTIME_BINDIR="\"$(BIN_INSTALL_DIR:\=\\)\"" \
801        -DCFG_RUNTIME_SCRDIR="\"$(SCRIPT_INSTALL_DIR:\=\\)\"" \
802        -DCFG_RUNTIME_INCDIR="\"$(INCLUDE_INSTALL_DIR:\=\\)\"" \
803        -DCFG_RUNTIME_DOCDIR="\"$(DOC_INSTALL_DIR:\=\\)\""     \
804        -Fo$@ $?
805
806$(TMP_DIR)\tclAppInit.obj: $(WINDIR)\tclAppInit.c
807        $(cc32) $(TCL_CFLAGS) \
808            -DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \
809            -Fo$@ $?
810
811### The following objects should be built using the stub interfaces
812### *ALL* extensions need to built with -DTCL_THREADS=1
813
814$(TMP_DIR)\tclWinReg.obj: $(WINDIR)\tclWinReg.c
815!if $(STATIC_BUILD)
816        $(cc32) $(TCL_CFLAGS) -DTCL_THREADS=1 -DSTATIC_BUILD -Fo$@ $?
817!else
818        $(cc32) $(TCL_CFLAGS) -DTCL_THREADS=1 -DUSE_TCL_STUBS -Fo$@ $?
819!endif
820
821
822$(TMP_DIR)\tclWinDde.obj: $(WINDIR)\tclWinDde.c
823!if $(STATIC_BUILD)
824        $(cc32) $(TCL_CFLAGS) -DTCL_THREADS=1 -DSTATIC_BUILD -Fo$@ $?
825!else
826        $(cc32) $(TCL_CFLAGS) -DTCL_THREADS=1 -DUSE_TCL_STUBS -Fo$@ $?
827!endif
828
829
830### The following objects are part of the stub library and should not
831### be built as DLL objects.  -Zl is used to avoid a dependency on any
832### specific C run-time.
833
834$(TMP_DIR)\tclStubLib.obj: $(GENERICDIR)\tclStubLib.c
835        $(cc32) $(STUB_CFLAGS) -Zl -DSTATIC_BUILD $(TCL_INCLUDES) -Fo$@ $?
836
837#---------------------------------------------------------------------
838# Generate the source dependencies.  Having dependency rules will
839# improve incremental build accuracy without having to resort to a
840# full rebuild just because some non-global header file like
841# tclCompile.h was changed.  These rules aren't needed when building
842# from scratch.
843#---------------------------------------------------------------------
844
845depend:
846!if !exist($(TCLSH))
847        @echo Build tclsh first!
848!else
849        $(TCLSH) $(TOOLSDIR:\=/)/mkdepend.tcl -vc32 -out:"$(OUT_DIR)\depend.mk" \
850                -passthru:"-DBUILD_tcl $(TCL_INCLUDES)" $(GENERICDIR),$$(GENERICDIR) \
851                $(COMPATDIR),$$(COMPATDIR) $(TOMMATHDIR),$$(TOMMATHDIR) $(WINDIR),$$(WINDIR) @<<
852$(TCLOBJS)
853<<
854!endif
855
856#---------------------------------------------------------------------
857# Dependency rules
858#---------------------------------------------------------------------
859
860!if exist("$(OUT_DIR)\depend.mk")
861!include "$(OUT_DIR)\depend.mk"
862!message *** Dependency rules in use.
863!else
864!message *** Dependency rules are not being used.
865!endif
866
867### add a spacer in the output
868!message
869
870
871#---------------------------------------------------------------------
872# Implicit rules
873#---------------------------------------------------------------------
874
875{$(WINDIR)}.c{$(TMP_DIR)}.obj::
876        $(cc32) $(TCL_CFLAGS) -DBUILD_tcl -Fo$(TMP_DIR)\ @<<
877$<
878<<
879
880{$(TOMMATHDIR)}.c{$(TMP_DIR)}.obj::
881        $(cc32) $(TCL_CFLAGS) -DBUILD_tcl -Fo$(TMP_DIR)\ @<<
882$<
883<<
884
885{$(GENERICDIR)}.c{$(TMP_DIR)}.obj::
886        $(cc32) $(TCL_CFLAGS) -DBUILD_tcl -Fo$(TMP_DIR)\ @<<
887$<
888<<
889
890{$(COMPATDIR)}.c{$(TMP_DIR)}.obj::
891        $(cc32) $(TCL_CFLAGS) -DBUILD_tcl -Fo$(TMP_DIR)\ @<<
892$<
893<<
894
895{$(WINDIR)}.rc{$(TMP_DIR)}.res:
896        $(rc32) -fo $@ -r -i "$(GENERICDIR)" \
897            -d DEBUG=$(DEBUG) -d UNCHECKED=$(UNCHECKED) \
898            -d TCL_THREADS=$(TCL_THREADS) \
899            -d STATIC_BUILD=$(STATIC_BUILD) \
900            $<
901
902.SUFFIXES:
903.SUFFIXES:.c .rc
904
905
906#---------------------------------------------------------------------
907# Installation.
908#---------------------------------------------------------------------
909
910install-binaries:
911        @echo Installing to '$(_INSTALLDIR)'
912        @echo Installing $(TCLLIBNAME)
913!if "$(TCLLIB)" != "$(TCLIMPLIB)"
914        @$(CPY) "$(TCLLIB)" "$(BIN_INSTALL_DIR)\"
915!endif
916        @$(CPY) "$(TCLIMPLIB)" "$(LIB_INSTALL_DIR)\"
917!if exist($(TCLSH))
918        @echo Installing $(TCLSHNAME)
919        @$(CPY) "$(TCLSH)" "$(BIN_INSTALL_DIR)\"
920!endif
921!if exist($(TCLPIPEDLL))
922        @echo Installing $(TCLPIPEDLLNAME)
923        @$(CPY) "$(TCLPIPEDLL)" "$(BIN_INSTALL_DIR)\"
924!endif
925        @echo Installing $(TCLSTUBLIBNAME)
926        @$(CPY) "$(TCLSTUBLIB)" "$(LIB_INSTALL_DIR)\"
927
928#" emacs fix
929
930install-libraries: tclConfig install-msgs install-tzdata
931        @if not exist "$(SCRIPT_INSTALL_DIR)$(NULL)" \
932                $(MKDIR) "$(SCRIPT_INSTALL_DIR)"
933        @if not exist "$(SCRIPT_INSTALL_DIR)\..\tcl8$(NULL)" \
934                $(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8"
935        @if not exist "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.2$(NULL)" \
936                $(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.2"
937        @if not exist "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.3$(NULL)" \
938                $(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.3"
939        @if not exist "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4$(NULL)" \
940                $(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4"
941        @if not exist "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\platform$(NULL)" \
942                $(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\platform"
943        @if not exist "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5$(NULL)" \
944                $(MKDIR) "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5"
945        @echo Installing header files
946        @$(CPY) "$(GENERICDIR)\tcl.h"             "$(INCLUDE_INSTALL_DIR)\"
947        @$(CPY) "$(GENERICDIR)\tclDecls.h"        "$(INCLUDE_INSTALL_DIR)\"
948        @$(CPY) "$(GENERICDIR)\tclPlatDecls.h"    "$(INCLUDE_INSTALL_DIR)\"
949        @$(CPY) "$(GENERICDIR)\tclTomMath.h"      "$(INCLUDE_INSTALL_DIR)\"
950        @$(CPY) "$(GENERICDIR)\tclTomMathDecls.h" "$(INCLUDE_INSTALL_DIR)\"
951        @$(CPY) "$(TOMMATHDIR)\tommath_class.h"   "$(INCLUDE_INSTALL_DIR)\"
952        @$(CPY) "$(TOMMATHDIR)\tommath_superclass.h" "$(INCLUDE_INSTALL_DIR)\"
953        @echo Installing library files to $(SCRIPT_INSTALL_DIR)
954        @$(CPY) "$(ROOT)\library\history.tcl"     "$(SCRIPT_INSTALL_DIR)\"
955        @$(CPY) "$(ROOT)\library\init.tcl"        "$(SCRIPT_INSTALL_DIR)\"
956        @$(CPY) "$(ROOT)\library\clock.tcl"       "$(SCRIPT_INSTALL_DIR)\"
957        @$(CPY) "$(ROOT)\library\tm.tcl"          "$(SCRIPT_INSTALL_DIR)\"
958        @$(CPY) "$(ROOT)\library\parray.tcl"      "$(SCRIPT_INSTALL_DIR)\"
959        @$(CPY) "$(ROOT)\library\safe.tcl"        "$(SCRIPT_INSTALL_DIR)\"
960        @$(CPY) "$(ROOT)\library\tclIndex"        "$(SCRIPT_INSTALL_DIR)\"
961        @$(CPY) "$(ROOT)\library\package.tcl"     "$(SCRIPT_INSTALL_DIR)\"
962        @$(CPY) "$(ROOT)\library\word.tcl"        "$(SCRIPT_INSTALL_DIR)\"
963        @$(CPY) "$(ROOT)\library\auto.tcl"        "$(SCRIPT_INSTALL_DIR)\"
964        @$(CPY) "$(OUT_DIR)\tclConfig.sh"         "$(LIB_INSTALL_DIR)\"
965        @echo Installing library http1.0 directory
966        @$(CPY) "$(ROOT)\library\http1.0\*.tcl" \
967            "$(SCRIPT_INSTALL_DIR)\http1.0\"
968        @echo Installing library opt0.4 directory
969        @$(CPY) "$(ROOT)\library\opt\*.tcl" \
970            "$(SCRIPT_INSTALL_DIR)\opt0.4\"
971        @echo Installing package http $(PKG_HTTP_VER) as a Tcl Module
972        @$(COPY) "$(ROOT)\library\http\http.tcl" \
973            "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\http-$(PKG_HTTP_VER).tm"
974        @echo Installing package msgcat $(PKG_MSGCAT_VER) as a Tcl Module
975        @$(COPY) "$(ROOT)\library\msgcat\msgcat.tcl" \
976            "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5\msgcat-$(PKG_MSGCAT_VER).tm"
977        @echo Installing package tcltest $(PKG_TCLTEST_VER) as a Tcl Module
978        @$(COPY) "$(ROOT)\library\tcltest\tcltest.tcl" \
979            "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.5\tcltest-$(PKG_TCLTEST_VER).tm"
980        @echo Installing package platform $(PKG_PLATFORM_VER) as a Tcl Module
981        @$(COPY) "$(ROOT)\library\platform\platform.tcl" \
982            "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\platform-$(PKG_PLATFORM_VER).tm"
983        @echo Installing package platform::shell $(PKG_SHELL_VER) as a Tcl Module
984        @$(COPY) "$(ROOT)\library\platform\shell.tcl" \
985            "$(SCRIPT_INSTALL_DIR)\..\tcl8\8.4\platform\shell-$(PKG_SHELL_VER).tm"
986        @echo Installing $(TCLDDELIBNAME)
987!if $(STATIC_BUILD)
988        @$(CPY) "$(TCLDDELIB)" "$(LIB_INSTALL_DIR)\"
989!else
990        @$(CPY) "$(TCLDDELIB)" "$(LIB_INSTALL_DIR)\dde$(DDEDOTVERSION)\"
991        @$(CPY) "$(ROOT)\library\dde\pkgIndex.tcl" \
992            "$(LIB_INSTALL_DIR)\dde$(DDEDOTVERSION)\"
993!endif
994        @echo Installing $(TCLREGLIBNAME)
995!if $(STATIC_BUILD)
996        @$(CPY) "$(TCLREGLIB)" "$(LIB_INSTALL_DIR)\"
997!else
998        @$(CPY) "$(TCLREGLIB)" "$(LIB_INSTALL_DIR)\reg$(REGDOTVERSION)\"
999        @$(CPY) "$(ROOT)\library\reg\pkgIndex.tcl" \
1000            "$(LIB_INSTALL_DIR)\reg$(REGDOTVERSION)\"
1001!endif
1002        @echo Installing encodings
1003        @$(CPY) "$(ROOT)\library\encoding\*.enc" \
1004                "$(SCRIPT_INSTALL_DIR)\encoding\"
1005
1006#" emacs fix
1007
1008install-tzdata:
1009        @echo Installing time zone data
1010        @set TCL_LIBRARY=$(ROOT)/library
1011        @$(TCLSH) "$(ROOT)/tools/installData.tcl" \
1012            "$(ROOT)/library/tzdata" "$(SCRIPT_INSTALL_DIR)/tzdata"
1013
1014install-msgs:
1015        @echo Installing message catalogs
1016        @set TCL_LIBRARY=$(ROOT)/library
1017        @$(TCLSH) "$(ROOT)/tools/installData.tcl" \
1018            "$(ROOT)/library/msgs" "$(SCRIPT_INSTALL_DIR)/msgs"
1019
1020#---------------------------------------------------------------------
1021# Clean up
1022#---------------------------------------------------------------------
1023
1024tidy:
1025!if "$(TCLLIB)" != "$(TCLIMPLIB)"
1026        @echo Removing $(TCLLIB) ...
1027        @if exist $(TCLLIB) del $(TCLLIB)
1028!endif
1029        @echo Removing $(TCLIMPLIB) ...
1030        @if exist $(TCLIMPLIB) del $(TCLIMPLIB)
1031        @echo Removing $(TCLSH) ...
1032        @if exist $(TCLSH) del $(TCLSH)
1033        @echo Removing $(TCLTEST) ...
1034        @if exist $(TCLTEST) del $(TCLTEST)
1035        @echo Removing $(TCLDDELIB) ...
1036        @if exist $(TCLDDELIB) del $(TCLDDELIB)
1037        @echo Removing $(TCLREGLIB) ...
1038        @if exist $(TCLREGLIB) del $(TCLREGLIB)
1039
1040clean:
1041        @echo Cleaning $(TMP_DIR)\* ...
1042        @if exist $(TMP_DIR)\nul $(RMDIR) $(TMP_DIR)
1043        @echo Cleaning $(WINDIR)\nmakehlp.obj ...
1044        @if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj
1045        @echo Cleaning $(WINDIR)\nmakehlp.exe ...
1046        @if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
1047        @echo Cleaning $(WINDIR)\_junk.pch ...
1048        @if exist $(WINDIR)\_junk.pch del $(WINDIR)\_junk.pch
1049        @echo Cleaning $(WINDIR)\vercl.x ...
1050        @if exist $(WINDIR)\vercl.x del $(WINDIR)\vercl.x
1051        @echo Cleaning $(WINDIR)\vercl.i ...
1052        @if exist $(WINDIR)\vercl.i del $(WINDIR)\vercl.i
1053        @echo Cleaning $(WINDIR)\versions.vc ...
1054        @if exist $(WINDIR)\versions.vc del $(WINDIR)\versions.vc
1055
1056hose:
1057        @echo Hosing $(OUT_DIR)\* ...
1058        @if exist $(OUT_DIR)\nul $(RMDIR) $(OUT_DIR)
1059
Note: See TracBrowser for help on using the repository browser.