1 | # |
---|
2 | # Makefile for Borland C++ 5.5 (or C++ Builder 5), adapted from the makefile |
---|
3 | # for Visual C++ that came with tcl 8.3.3 |
---|
4 | # |
---|
5 | # See the file "license.terms" for information on usage and redistribution |
---|
6 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
7 | # |
---|
8 | # Copyright (c) 1995-1996 Sun Microsystems, Inc. |
---|
9 | # Copyright (c) 1998-1999 by Scriptics Corporation. |
---|
10 | |
---|
11 | # TIP #59 information. |
---|
12 | # |
---|
13 | # This makefile does not set the following configuration cpp |
---|
14 | # defines. Behind the defines are the makefile variables listed to set |
---|
15 | # to -D... when that feature is enabled. |
---|
16 | # |
---|
17 | # - TCL_CFG_PROFILED PROFDEFINES |
---|
18 | # - TCL_CFG_OPTIMIZED OPTDEFINES |
---|
19 | # - TCL_CFG_DO64BIT SIXFOURDEFINES |
---|
20 | |
---|
21 | # Have a look at the complete description on how to build and test Tcl with |
---|
22 | # the current Borland compilers at www.ratiosoft.com/tcl/borland. |
---|
23 | # |
---|
24 | # Usage: |
---|
25 | # - Adapt the paths below to match your compiler's location |
---|
26 | # - Make sure the compiler's bin directory is on your path |
---|
27 | # - Open a console |
---|
28 | # - To make a debug version enter |
---|
29 | # make -fmakefile.bc -DNODEBUG=0 xxx |
---|
30 | # where 'xxx' is the target you want (e.g. 'all', 'test', ...) |
---|
31 | # Please note: I omitted the 'd' suffix for debug versions because Tcl |
---|
32 | # will always call tclpip83.dll and not tclpip83d.dll, causing an error. |
---|
33 | # ^ |
---|
34 | # Besides, the debug version goes into a separate directory, so there |
---|
35 | # should be no problem having DLLs and EXEs with the same name. |
---|
36 | # If you prefer your debug version having the 'd' suffix just uncomment |
---|
37 | # the line |
---|
38 | # #DBGX = d |
---|
39 | # |
---|
40 | # - To make a 'normal' version enter |
---|
41 | # make -fmakefile.bc xxx |
---|
42 | # where 'xxx' is the target you want (e.g. 'all', 'test', ...) |
---|
43 | # |
---|
44 | # DISCLAIMER: |
---|
45 | # This makefile has an experimental status - that is those targets which |
---|
46 | # have been modified do in fact compile and link with Borland's C++ |
---|
47 | # Builder 5 and with the free Borland compiler (Borland C++ 5.5). |
---|
48 | # However the author assumes no responsiblity for any effect which the use of |
---|
49 | # this makefile or of the resulting programs might have on your system. |
---|
50 | # |
---|
51 | # Not yet modified: |
---|
52 | # - The 'plug-in-DLL' and the associated shell. |
---|
53 | # - The programs to create the windows help files. |
---|
54 | # |
---|
55 | # Suggestions and / or improvements are always welcome. |
---|
56 | # |
---|
57 | # May 2001, H. Giese (hgiese@ratiosoft.com) |
---|
58 | # |
---|
59 | |
---|
60 | # Does not depend on the presence of any environment variables in |
---|
61 | # order to compile tcl; all needed information is derived from |
---|
62 | # location of the compiler directories. |
---|
63 | |
---|
64 | # |
---|
65 | # Project directories |
---|
66 | # |
---|
67 | # ROOT = top of source tree |
---|
68 | # |
---|
69 | # TOOLS32 = location of Borland development tools. |
---|
70 | # |
---|
71 | # INSTALLDIR = where the install-targets should copy the binaries and |
---|
72 | # support files |
---|
73 | # |
---|
74 | |
---|
75 | ROOT = .. |
---|
76 | INSTALLDIR = c:\program files\tcl |
---|
77 | |
---|
78 | # If you have C++ Builder 5 or the free Borland C++ 5.5 compiler |
---|
79 | # adapt the following paths as appropriate for your system |
---|
80 | TOOLS32 = c:\dev\bcc55 |
---|
81 | TOOLS32_rc = c:\dev\bcc55 |
---|
82 | #TOOLS32 = c:\bc55 |
---|
83 | #TOOLS32_rc = c:\bc55 |
---|
84 | |
---|
85 | cc32 = "$(TOOLS32)\bin\bcc32.exe" |
---|
86 | link32 = "$(TOOLS32)\bin\ilink32.exe" |
---|
87 | lib32 = "$(TOOLS32)\bin\tlib.exe" |
---|
88 | rc32 = "$(TOOLS32_rc)\bin\brcc32.exe" |
---|
89 | include32 = -I"$(TOOLS32)\include" |
---|
90 | libpath32 = -L"$(TOOLS32)\lib" |
---|
91 | |
---|
92 | # Uncomment the following line to compile with thread support |
---|
93 | #THREADDEFINES = -DTCL_THREADS=1 |
---|
94 | |
---|
95 | # Allow definition of NDEBUG via command line |
---|
96 | # Set NODEBUG to 0 to compile with symbols |
---|
97 | !if !defined(NODEBUG) |
---|
98 | NODEBUG = 1 |
---|
99 | !endif |
---|
100 | |
---|
101 | # CFG_ENCODING=encoding |
---|
102 | # name of encoding for configuration information. Defaults |
---|
103 | # to cp1252 |
---|
104 | !if !defined(CFG_ENCODING) |
---|
105 | CFG_ENCODING = \"cp1252\" |
---|
106 | !endif |
---|
107 | |
---|
108 | # The following defines can be used to control the amount of debugging |
---|
109 | # code that is added to the compilation. |
---|
110 | # |
---|
111 | # -DTCL_MEM_DEBUG Enables the debugging memory allocator. |
---|
112 | # -DTCL_COMPILE_DEBUG Enables byte compilation logging. |
---|
113 | # -DTCL_COMPILE_STATS Enables byte compilation statistics gathering. |
---|
114 | # -DUSE_TCLALLOC=0 Disables the Tcl memory allocator in favor |
---|
115 | # of the native malloc implementation. This is |
---|
116 | # needed when using Purify. |
---|
117 | # |
---|
118 | #DEBUGDEFINES = -DTCL_MEM_DEBUG -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS |
---|
119 | #DEBUGDEFINES = -DUSE_TCLALLOC=0 |
---|
120 | |
---|
121 | ###################################################################### |
---|
122 | # Do not modify below this line |
---|
123 | ###################################################################### |
---|
124 | |
---|
125 | NAMEPREFIX = tcl |
---|
126 | STUBPREFIX = $(NAMEPREFIX)stub |
---|
127 | DOTVERSION = 8.5 |
---|
128 | VERSION = 85 |
---|
129 | |
---|
130 | DDEVERSION = 13 |
---|
131 | DDEDOTVERSION = 1.3 |
---|
132 | |
---|
133 | REGVERSION = 12 |
---|
134 | REGDOTVERSION = 1.2 |
---|
135 | |
---|
136 | BINROOT = .. |
---|
137 | !IF "$(NODEBUG)" == "1" |
---|
138 | TMPDIRNAME = Release |
---|
139 | DBGX = |
---|
140 | SYMDEFINES = |
---|
141 | !ELSE |
---|
142 | TMPDIRNAME = Debug |
---|
143 | #DBGX = d |
---|
144 | DBGX = |
---|
145 | SYMDEFINES = -DTCL_CFG_DEBUG |
---|
146 | !ENDIF |
---|
147 | TMPDIR = $(BINROOT)\$(TMPDIRNAME) |
---|
148 | OUTDIRNAME = $(TMPDIRNAME) |
---|
149 | OUTDIR = $(TMPDIR) |
---|
150 | |
---|
151 | TCLLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)$(DBGX).lib |
---|
152 | TCLDLLNAME = $(NAMEPREFIX)$(VERSION)$(DBGX).dll |
---|
153 | TCLDLL = $(OUTDIR)\$(TCLDLLNAME) |
---|
154 | |
---|
155 | TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION)$(DBGX).lib |
---|
156 | TCLSTUBLIB = $(OUTDIR)\$(TCLSTUBLIBNAME) |
---|
157 | |
---|
158 | TCLPLUGINLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)p$(DBGX).lib |
---|
159 | TCLPLUGINDLLNAME = $(NAMEPREFIX)$(VERSION)p$(DBGX).dll |
---|
160 | TCLPLUGINDLL = $(OUTDIR)\$(TCLPLUGINDLLNAME) |
---|
161 | TCLSH = $(OUTDIR)\$(NAMEPREFIX)sh$(VERSION)$(DBGX).exe |
---|
162 | TCLSHP = $(OUTDIR)\$(NAMEPREFIX)shp$(VERSION)$(DBGX).exe |
---|
163 | TCLPIPEDLLNAME = $(NAMEPREFIX)pip$(VERSION)$(DBGX).dll |
---|
164 | TCLPIPEDLL = $(OUTDIR)\$(TCLPIPEDLLNAME) |
---|
165 | TCLREGDLLNAME = $(NAMEPREFIX)reg$(REGVERSION)$(DBGX).dll |
---|
166 | TCLREGDLL = $(OUTDIR)\$(TCLREGDLLNAME) |
---|
167 | TCLDDEDLLNAME = $(NAMEPREFIX)dde$(DDEVERSION)$(DBGX).dll |
---|
168 | TCLDDEDLL = $(OUTDIR)\$(TCLDDEDLLNAME) |
---|
169 | TCLTEST = $(OUTDIR)\$(NAMEPREFIX)test.exe |
---|
170 | CAT32 = $(TMPDIR)\cat32.exe |
---|
171 | RMDIR = .\rmd.bat |
---|
172 | MKDIR = .\mkd.bat |
---|
173 | RM = del |
---|
174 | |
---|
175 | LIB_INSTALL_DIR = $(INSTALLDIR)\lib |
---|
176 | BIN_INSTALL_DIR = $(INSTALLDIR)\bin |
---|
177 | SCRIPT_INSTALL_DIR = $(INSTALLDIR)\lib\tcl$(DOTVERSION) |
---|
178 | INCLUDE_INSTALL_DIR = $(INSTALLDIR)\include |
---|
179 | |
---|
180 | TCLSHOBJS = \ |
---|
181 | $(TMPDIR)\tclAppInit.obj |
---|
182 | |
---|
183 | TCLTESTOBJS = \ |
---|
184 | $(TMPDIR)\tclTest.obj \ |
---|
185 | $(TMPDIR)\tclTestObj.obj \ |
---|
186 | $(TMPDIR)\tclTestProcBodyObj.obj \ |
---|
187 | $(TMPDIR)\tclThreadTest.obj \ |
---|
188 | $(TMPDIR)\tclWinTest.obj \ |
---|
189 | $(TMPDIR)\testMain.obj |
---|
190 | |
---|
191 | TCLOBJS = \ |
---|
192 | $(TMPDIR)\regcomp.obj \ |
---|
193 | $(TMPDIR)\regexec.obj \ |
---|
194 | $(TMPDIR)\regfree.obj \ |
---|
195 | $(TMPDIR)\regerror.obj \ |
---|
196 | $(TMPDIR)\tclAlloc.obj \ |
---|
197 | $(TMPDIR)\tclAsync.obj \ |
---|
198 | $(TMPDIR)\tclBasic.obj \ |
---|
199 | $(TMPDIR)\tclBinary.obj \ |
---|
200 | $(TMPDIR)\tclCkalloc.obj \ |
---|
201 | $(TMPDIR)\tclClock.obj \ |
---|
202 | $(TMPDIR)\tclCmdAH.obj \ |
---|
203 | $(TMPDIR)\tclCmdIL.obj \ |
---|
204 | $(TMPDIR)\tclCmdMZ.obj \ |
---|
205 | $(TMPDIR)\tclCompCmds.obj \ |
---|
206 | $(TMPDIR)\tclCompExpr.obj \ |
---|
207 | $(TMPDIR)\tclCompile.obj \ |
---|
208 | $(TMPDIR)\tclConfig.obj \ |
---|
209 | $(TMPDIR)\tclDate.obj \ |
---|
210 | $(TMPDIR)\tclDictObj.obj \ |
---|
211 | $(TMPDIR)\tclEncoding.obj \ |
---|
212 | $(TMPDIR)\tclEnv.obj \ |
---|
213 | $(TMPDIR)\tclEvent.obj \ |
---|
214 | $(TMPDIR)\tclExecute.obj \ |
---|
215 | $(TMPDIR)\tclFCmd.obj \ |
---|
216 | $(TMPDIR)\tclFileName.obj \ |
---|
217 | $(TMPDIR)\tclGet.obj \ |
---|
218 | $(TMPDIR)\tclHash.obj \ |
---|
219 | $(TMPDIR)\tclHistory.obj \ |
---|
220 | $(TMPDIR)\tclIndexObj.obj \ |
---|
221 | $(TMPDIR)\tclInterp.obj \ |
---|
222 | $(TMPDIR)\tclIO.obj \ |
---|
223 | $(TMPDIR)\tclIOCmd.obj \ |
---|
224 | $(TMPDIR)\tclIOGT.obj \ |
---|
225 | $(TMPDIR)\tclIOSock.obj \ |
---|
226 | $(TMPDIR)\tclIOUtil.obj \ |
---|
227 | $(TMPDIR)\tclLink.obj \ |
---|
228 | $(TMPDIR)\tclLiteral.obj \ |
---|
229 | $(TMPDIR)\tclListObj.obj \ |
---|
230 | $(TMPDIR)\tclLoad.obj \ |
---|
231 | $(TMPDIR)\tclMain.obj \ |
---|
232 | $(TMPDIR)\tclNamesp.obj \ |
---|
233 | $(TMPDIR)\tclNotify.obj \ |
---|
234 | $(TMPDIR)\tclObj.obj \ |
---|
235 | $(TMPDIR)\tclPanic.obj \ |
---|
236 | $(TMPDIR)\tclParse.obj \ |
---|
237 | $(TMPDIR)\tclPipe.obj \ |
---|
238 | $(TMPDIR)\tclPkg.obj \ |
---|
239 | $(TMPDIR)\tclPkgConfig.obj \ |
---|
240 | $(TMPDIR)\tclPosixStr.obj \ |
---|
241 | $(TMPDIR)\tclPreserve.obj \ |
---|
242 | $(TMPDIR)\tclProc.obj \ |
---|
243 | $(TMPDIR)\tclRegexp.obj \ |
---|
244 | $(TMPDIR)\tclResolve.obj \ |
---|
245 | $(TMPDIR)\tclResult.obj \ |
---|
246 | $(TMPDIR)\tclScan.obj \ |
---|
247 | $(TMPDIR)\tclStringObj.obj \ |
---|
248 | $(TMPDIR)\tclStubInit.obj \ |
---|
249 | $(TMPDIR)\tclStubLib.obj \ |
---|
250 | $(TMPDIR)\tclThread.obj \ |
---|
251 | $(TMPDIR)\tclThreadJoin.obj \ |
---|
252 | $(TMPDIR)\tclTimer.obj \ |
---|
253 | $(TMPDIR)\tclTrace.obj \ |
---|
254 | $(TMPDIR)\tclUtf.obj \ |
---|
255 | $(TMPDIR)\tclUtil.obj \ |
---|
256 | $(TMPDIR)\tclVar.obj \ |
---|
257 | $(TMPDIR)\tclWin32Dll.obj \ |
---|
258 | $(TMPDIR)\tclWinChan.obj \ |
---|
259 | $(TMPDIR)\tclWinConsole.obj \ |
---|
260 | $(TMPDIR)\tclWinSerial.obj \ |
---|
261 | $(TMPDIR)\tclWinError.obj \ |
---|
262 | $(TMPDIR)\tclWinFCmd.obj \ |
---|
263 | $(TMPDIR)\tclWinFile.obj \ |
---|
264 | $(TMPDIR)\tclWinInit.obj \ |
---|
265 | $(TMPDIR)\tclWinLoad.obj \ |
---|
266 | $(TMPDIR)\tclWinNotify.obj \ |
---|
267 | $(TMPDIR)\tclWinPipe.obj \ |
---|
268 | $(TMPDIR)\tclWinSock.obj \ |
---|
269 | $(TMPDIR)\tclWinThrd.obj \ |
---|
270 | $(TMPDIR)\tclWinTime.obj |
---|
271 | |
---|
272 | TCLSTUBOBJS = $(TMPDIR)\tclStubLib.obj |
---|
273 | |
---|
274 | WINDIR = $(ROOT)\win |
---|
275 | GENERICDIR = $(ROOT)\generic |
---|
276 | |
---|
277 | TCL_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" |
---|
278 | TCL_DEFINES = $(DEBUGDEFINES) $(THREADDEFINES) $(SYMDEFINES) \ |
---|
279 | $(PROFDEFINES) $(OPTDEFINES) $(SIXFOURDEFINES) \ |
---|
280 | -DTCL_CFGVAL_ENCODING=${CFG_ENCODING} |
---|
281 | |
---|
282 | ###################################################################### |
---|
283 | # Compiler flags |
---|
284 | ###################################################################### |
---|
285 | |
---|
286 | !IF "$(NODEBUG)" == "1" |
---|
287 | # these macros cause maximum optimization and no symbols |
---|
288 | cdebug = -v- -vi- -O2 -D_DEBUG |
---|
289 | !ELSE |
---|
290 | # these macros enable debugging |
---|
291 | cdebug = -k -Od -r- -v -vi- -y |
---|
292 | !ENDIF |
---|
293 | |
---|
294 | SYSDEFINES = _MT;NO_STRICT;_NO_VCL |
---|
295 | |
---|
296 | # declarations common to all compiler options |
---|
297 | cbase = -c -q -3 -a4 -g0 -tWM -Ve -Vx -X- |
---|
298 | WARNINGS = -w-rch -w-pch -w-par -w-dup -w-pro -w-dpu |
---|
299 | |
---|
300 | ccons = -tWC |
---|
301 | |
---|
302 | INCLUDEPATH = $(include32) $(TCL_INCLUDES) |
---|
303 | |
---|
304 | CFLAGS = $(cdebug) $(cbase) $(INCLUDEPATH) $(WARNINGS) -D$(SYSDEFINES) |
---|
305 | TCL_CFLAGS = $(CFLAGS) $(TCL_DEFINES) |
---|
306 | CONS_CFLAGS = $(CFLAGS) $(TCL_DEFINES) $(ccons) |
---|
307 | |
---|
308 | ###################################################################### |
---|
309 | # Linker flags |
---|
310 | ###################################################################### |
---|
311 | |
---|
312 | !IF "$(NODEBUG)" == "1" |
---|
313 | ldebug = |
---|
314 | !ELSE |
---|
315 | ldebug = -v |
---|
316 | !ENDIF |
---|
317 | |
---|
318 | # declarations common to all linker options |
---|
319 | LNFLAGS = -D"" -Gn -I$(TMPDIR) -x $(ldebug) $(libpath32) |
---|
320 | # -Gi: create lib file (is -Gl in doc) |
---|
321 | # -aa: Windows app, -ap: Windows console app |
---|
322 | LNFLAGS_DLL = -ap -Gi -Tpd |
---|
323 | LNFLAGS_CONS = -ap -Tpe |
---|
324 | |
---|
325 | LNLIBS = import32 cw32mt |
---|
326 | |
---|
327 | |
---|
328 | ###################################################################### |
---|
329 | # Project specific targets |
---|
330 | ###################################################################### |
---|
331 | |
---|
332 | release: setup $(TCLSH) dlls |
---|
333 | dlls: setup $(TCLPIPEDLL) $(TCLREGDLL) $(TCLDDEDLL) |
---|
334 | all: setup $(TCLSH) dlls $(CAT32) |
---|
335 | tcltest: setup $(TCLTEST) dlls $(CAT32) |
---|
336 | plugin: setup $(TCLPLUGINDLL) $(TCLSHP) |
---|
337 | install: install-binaries install-libraries |
---|
338 | |
---|
339 | test: setup $(TCLTEST) dlls $(CAT32) |
---|
340 | set TCL_LIBRARY=$(ROOT)/library |
---|
341 | $(TCLTEST) $(ROOT)/tests/all.tcl |
---|
342 | |
---|
343 | setup: |
---|
344 | @if not exist $(OUT_DIR)\nul mkdir $(OUT_DIR) &\ |
---|
345 | echo *** Created directory '$(OUT_DIR)' |
---|
346 | @if not exist $(TMP_DIR)\nul mkdir $(TMP_DIR) &\ |
---|
347 | echo *** Created directory '$(TMP_DIR)' |
---|
348 | |
---|
349 | |
---|
350 | $(TCLLIB): $(TCLDLL) |
---|
351 | |
---|
352 | $(TCLDLL): $(TCLOBJS) $(TMPDIR)\$(NAMEPREFIX).res |
---|
353 | $(link32) $(ldebug) $(LNFLAGS) $(LNFLAGS_DLL) $(TOOLS32)\lib\c0d32 @&&! |
---|
354 | $(TCLOBJS), $@, -x, $(LNLIBS),, $(TMPDIR)\$(NAMEPREFIX).res |
---|
355 | ! |
---|
356 | |
---|
357 | $(TCLSTUBLIB): $(TCLSTUBOBJS) |
---|
358 | $(lib32) /u $@ $(TCLSTUBOBJS) |
---|
359 | |
---|
360 | $(TCLPLUGINLIB): $(TCLPLUGINDLL) |
---|
361 | |
---|
362 | $(TCLPLUGINDLL): $(TCLOBJS) $(TMPDIR)\tcl.res |
---|
363 | $(link32) $(ldebug) $(dlllflags) \ |
---|
364 | -out:$@ $(TMPDIR)\tcl.res $(guilibsdll) @&&! |
---|
365 | $(TCLOBJS) |
---|
366 | ! |
---|
367 | |
---|
368 | $(TCLSH): $(TCLSHOBJS) $(TCLLIB) $(TMPDIR)\$(NAMEPREFIX)sh.res |
---|
369 | $(link32) $(ldebug) -S:2400000 $(LNFLAGS) $(LNFLAGS_CONS) $(TOOLS32)\lib\c0x32 @&&! |
---|
370 | $(TCLSHOBJS), $@, -x, $(LNLIBS) $(TCLLIB),, $(TMPDIR)\$(NAMEPREFIX)sh.res |
---|
371 | ! |
---|
372 | |
---|
373 | $(TCLSHP): $(TCLSHOBJS) $(TCLPLUGINLIB) $(TMPDIR)\tclsh.res |
---|
374 | $(link32) $(ldebug) $(conlflags) $(TMPDIR)\tclsh.res -stack:2300000 \ |
---|
375 | -out:$@ $(conlibsdll) $(TCLPLUGINLIB) $(TCLSHOBJS) |
---|
376 | |
---|
377 | $(TCLTEST): $(TCLTESTOBJS) $(TCLLIB) $(TMPDIR)\$(NAMEPREFIX)sh.res |
---|
378 | $(link32) $(ldebug) -S:2400000 $(LNFLAGS) $(LNFLAGS_CONS) $(TOOLS32)\lib\c0x32 @&&! |
---|
379 | $(TCLTESTOBJS), $@, -x, $(LNLIBS) $(TCLLIB),, $(TMPDIR)\$(NAMEPREFIX)sh.res |
---|
380 | ! |
---|
381 | |
---|
382 | $(TCLPIPEDLL): $(WINDIR)\stub16.c |
---|
383 | $(cc32) $(CFLAGS) -o$(TMPDIR)\stub16.obj $(WINDIR)\stub16.c |
---|
384 | $(link32) $(ldebug) $(LNFLAGS) $(LNFLAGS_CONS) $(TOOLS32)\lib\c0x32 \ |
---|
385 | $(TMPDIR)\stub16.obj, $@, -x, $(LNLIBS),, $(TMPDIR)\$(NAMEPREFIX).res |
---|
386 | |
---|
387 | $(TCLDDEDLL): $(TMPDIR)\tclWinDde.obj $(TCLSTUBLIB) |
---|
388 | $(link32) $(ldebug) $(LNFLAGS) $(LNFLAGS_DLL) $(TOOLS32)\lib\c0d32 \ |
---|
389 | $(TMPDIR)\tclWinDde.obj, $@, -x, $(LNLIBS) $(TCLSTUBLIB),, \ |
---|
390 | $(TMPDIR)\$(NAMEPREFIX).res |
---|
391 | |
---|
392 | $(TCLREGDLL): $(TMPDIR)\tclWinReg.obj $(TCLSTUBLIB) |
---|
393 | $(link32) $(ldebug) $(LNFLAGS) $(LNFLAGS_DLL) $(TOOLS32)\lib\c0d32 \ |
---|
394 | $(TMPDIR)\tclWinReg.obj, $@, -x, $(LNLIBS) $(TCLSTUBLIB),, \ |
---|
395 | $(TMPDIR)\$(NAMEPREFIX).res |
---|
396 | |
---|
397 | $(CAT32): $(WINDIR)\cat.c |
---|
398 | $(cc32) $(CONS_CFLAGS) -o$(TMPDIR)\cat.obj $? |
---|
399 | $(link32) $(ldebug) $(LNFLAGS) $(LNFLAGS_CONS) $(TOOLS32)\lib\c0x32 \ |
---|
400 | $(TMPDIR)\cat.obj, $@, -x, $(LNLIBS),, |
---|
401 | |
---|
402 | install-binaries: $(TCLSH) |
---|
403 | $(MKDIR) "$(BIN_INSTALL_DIR)" |
---|
404 | $(MKDIR) "$(LIB_INSTALL_DIR)" |
---|
405 | @echo installing $(TCLDLLNAME) |
---|
406 | @copy "$(TCLDLL)" "$(BIN_INSTALL_DIR)" |
---|
407 | @copy "$(TCLLIB)" "$(LIB_INSTALL_DIR)" |
---|
408 | @echo installing "$(TCLSH)" |
---|
409 | @copy "$(TCLSH)" "$(BIN_INSTALL_DIR)" |
---|
410 | @echo installing $(TCLPIPEDLLNAME) |
---|
411 | @copy "$(TCLPIPEDLL)" "$(BIN_INSTALL_DIR)" |
---|
412 | @echo installing $(TCLSTUBLIBNAME) |
---|
413 | @copy "$(TCLSTUBLIB)" "$(LIB_INSTALL_DIR)" |
---|
414 | |
---|
415 | install-libraries: |
---|
416 | -@$(MKDIR) "$(LIB_INSTALL_DIR)" |
---|
417 | -@$(MKDIR) "$(INCLUDE_INSTALL_DIR)" |
---|
418 | -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)" |
---|
419 | @echo installing http1.0 |
---|
420 | -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\http1.0" |
---|
421 | -@copy "$(ROOT)\library\http1.0\http.tcl" "$(SCRIPT_INSTALL_DIR)\http1.0" |
---|
422 | -@copy "$(ROOT)\library\http1.0\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\http1.0" |
---|
423 | @echo installing http2.4 |
---|
424 | -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\http2.4" |
---|
425 | -@copy "$(ROOT)\library\http\http.tcl" "$(SCRIPT_INSTALL_DIR)\http2.4" |
---|
426 | -@copy "$(ROOT)\library\http\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\http2.4" |
---|
427 | @echo installing opt0.4 |
---|
428 | -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\opt0.4" |
---|
429 | -@copy "$(ROOT)\library\opt\optparse.tcl" "$(SCRIPT_INSTALL_DIR)\opt0.4" |
---|
430 | -@copy "$(ROOT)\library\opt\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\opt0.4" |
---|
431 | @echo installing msgcat1.4 |
---|
432 | -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\msgcat1.4" |
---|
433 | -@copy "$(ROOT)\library\msgcat\msgcat.tcl" "$(SCRIPT_INSTALL_DIR)\msgcat1.4" |
---|
434 | -@copy "$(ROOT)\library\msgcat\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\msgcat1.4" |
---|
435 | @echo installing tcltest2.3 |
---|
436 | -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\tcltest2.3" |
---|
437 | -@copy "$(ROOT)\library\tcltest\tcltest.tcl" "$(SCRIPT_INSTALL_DIR)\tcltest2.3" |
---|
438 | -@copy "$(ROOT)\library\tcltest\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\tcltest2.3" |
---|
439 | @echo installing platform1.0 |
---|
440 | -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\platform1.0" |
---|
441 | -@copy "$(ROOT)\library\platform\platform.tcl" "$(SCRIPT_INSTALL_DIR)\platform1.0" |
---|
442 | -@copy "$(ROOT)\library\platform\shell.tcl" "$(SCRIPT_INSTALL_DIR)\platform1.0" |
---|
443 | -@copy "$(ROOT)\library\platform\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\platform1.0" |
---|
444 | @echo installing $(TCLDDEDLLNAME) |
---|
445 | -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\dde1.3" |
---|
446 | -@copy "$(TCLDDEDLL)" "$(SCRIPT_INSTALL_DIR)\dde1.3" |
---|
447 | -@copy "$(ROOT)\library\dde\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\dde1.3" |
---|
448 | @echo installing $(TCLREGDLLNAME) |
---|
449 | -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\reg1.2" |
---|
450 | -@copy "$(TCLREGDLL)" "$(SCRIPT_INSTALL_DIR)\reg1.2" |
---|
451 | -@copy "$(ROOT)\library\reg\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\reg1.2" |
---|
452 | @echo installing encoding files |
---|
453 | -@$(MKDIR) "$(SCRIPT_INSTALL_DIR)\encoding" |
---|
454 | -@copy "$(ROOT)\library\encoding\*.enc" "$(SCRIPT_INSTALL_DIR)\encoding" |
---|
455 | @echo installing library files |
---|
456 | -@copy "$(GENERICDIR)\tcl.h" "$(INCLUDE_INSTALL_DIR)" |
---|
457 | -@copy "$(GENERICDIR)\tclDecls.h" "$(INCLUDE_INSTALL_DIR)" |
---|
458 | -@copy "$(GENERICDIR)\tclPlatDecls.h" "$(INCLUDE_INSTALL_DIR)" |
---|
459 | -@copy "$(ROOT)\library\history.tcl" "$(SCRIPT_INSTALL_DIR)" |
---|
460 | -@copy "$(ROOT)\library\init.tcl" "$(SCRIPT_INSTALL_DIR)" |
---|
461 | -@copy "$(ROOT)\library\parray.tcl" "$(SCRIPT_INSTALL_DIR)" |
---|
462 | -@copy "$(ROOT)\library\safe.tcl" "$(SCRIPT_INSTALL_DIR)" |
---|
463 | -@copy "$(ROOT)\library\tclIndex" "$(SCRIPT_INSTALL_DIR)" |
---|
464 | -@copy "$(ROOT)\library\package.tcl" "$(SCRIPT_INSTALL_DIR)" |
---|
465 | -@copy "$(ROOT)\library\word.tcl" "$(SCRIPT_INSTALL_DIR)" |
---|
466 | -@copy "$(ROOT)\library\auto.tcl" "$(SCRIPT_INSTALL_DIR)" |
---|
467 | |
---|
468 | # |
---|
469 | # Regenerate the stubs files. |
---|
470 | # |
---|
471 | |
---|
472 | genstubs: |
---|
473 | tclsh$(VERSION) $(ROOT)\tools\genStubs.tcl $(GENERICDIR) \ |
---|
474 | $(GENERICDIR)\tcl.decls $(GENERICDIR)\tclInt.decls |
---|
475 | |
---|
476 | # |
---|
477 | # Regenerate the windows help files. |
---|
478 | # |
---|
479 | |
---|
480 | TCLTOOLS = $(ROOT)/tools |
---|
481 | MAN2TCL = $(TCLTOOLS)/man2tcl |
---|
482 | TCLRTF = $(TCLTOOLS)/tcl.rtf |
---|
483 | TCLHPJ = $(TCLTOOLS)/tcl.hpj |
---|
484 | MAN2HELP = $(TCLTOOLS)/man2help.tcl |
---|
485 | HCRTF = $(TOOLS32)/bin/hcrtf.exe |
---|
486 | |
---|
487 | winhelp: $(TCLRTF) |
---|
488 | cd $(TCLTOOLS) |
---|
489 | start /wait $(HCRTF) -xn $(TCLHPJ) |
---|
490 | |
---|
491 | $(MAN2TCL).exe: $(MAN2TCL).obj |
---|
492 | cd $(TCLTOOLS) |
---|
493 | $(cc32) /nologo /G4 /ML /O2 $(MAN2TCL).c |
---|
494 | |
---|
495 | $(TCLRTF): $(MAN2TCL).exe $(TCLSH) |
---|
496 | cd $(TCLTOOLS) |
---|
497 | ..\win\$(TCLSH) $(MAN2HELP) $(NAMEPREFIX) $(VERSION) $(ROOT)/doc ../../tk$(DOTVERSION)/doc |
---|
498 | |
---|
499 | # |
---|
500 | # Special case object file targets |
---|
501 | # |
---|
502 | $(TMPDIR)\tclWinInit.obj: $(WINDIR)\tclWinInit.c |
---|
503 | $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -o$(TMPDIR)\$@ $? |
---|
504 | |
---|
505 | $(TMPDIR)\testMain.obj: $(WINDIR)\tclAppInit.c |
---|
506 | $(cc32) $(TCL_CFLAGS) -DTCL_TEST -o$(TMPDIR)\testMain.obj $? |
---|
507 | |
---|
508 | $(TMPDIR)\tclTest.obj: $(GENERICDIR)\tclTest.c |
---|
509 | $(cc32) $(TCL_CFLAGS) -o$(TMPDIR)\$@ $? |
---|
510 | |
---|
511 | $(TMPDIR)\tclTestObj.obj: $(GENERICDIR)\tclTestObj.c |
---|
512 | $(cc32) $(TCL_CFLAGS) -o$(TMPDIR)\$@ $? |
---|
513 | |
---|
514 | $(TMPDIR)\tclWinTest.obj: $(WINDIR)\tclWinTest.c |
---|
515 | $(cc32) $(TCL_CFLAGS) -o$(TMPDIR)\$@ $? |
---|
516 | |
---|
517 | $(TMP_DIR)\tclPkgConfig.obj: $(GENERICDIR)\tclPkgConfig.c |
---|
518 | $(cc32) $(TCL_CFLAGS) \ |
---|
519 | -DCFG_INSTALL_EXEC_PREFIX=\"$(INSTALL_EXEC_PREFIX)\" \ |
---|
520 | -DCFG_INSTALL_PREFIX=\"$(INSTALL_PREFIX)\" \ |
---|
521 | -DCFG_RUNTIME_EXEC_PREFIX=\"$(RUNTIME_EXEC_PREFIX)\" \ |
---|
522 | -DCFG_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ |
---|
523 | -o$(TMPDIR)\$@ $? |
---|
524 | |
---|
525 | $(TMPDIR)\tclAppInit.obj : $(WINDIR)\tclAppInit.c |
---|
526 | $(cc32) $(TCL_CFLAGS) -o$(TMPDIR)\$@ $? |
---|
527 | |
---|
528 | # The following objects should be built using the stub interfaces |
---|
529 | |
---|
530 | # tclWinReg: Produces errors in ANSI mode |
---|
531 | $(TMPDIR)\tclWinReg.obj : $(WINDIR)\tclWinReg.c |
---|
532 | $(cc32) $(TCL_CFLAGS) -DUSE_TCL_STUBS -o$(TMPDIR)\$@ $? |
---|
533 | |
---|
534 | # tclWinDde: Produces errors in ANSI mode |
---|
535 | $(TMPDIR)\tclWinDde.obj : $(WINDIR)\tclWinDde.c |
---|
536 | $(cc32) $(TCL_CFLAGS) -DUSE_TCL_STUBS -o$(TMPDIR)\$@ $? |
---|
537 | |
---|
538 | |
---|
539 | # The following objects are part of the stub library and should not |
---|
540 | # be built as DLL objects but none of the symbols should be exported |
---|
541 | |
---|
542 | $(TMPDIR)\tclStubLib.obj : $(GENERICDIR)\tclStubLib.c |
---|
543 | $(cc32) $(TCL_CFLAGS) -DSTATIC_BUILD -o$(TMPDIR)\$@ $? |
---|
544 | |
---|
545 | |
---|
546 | # Dedependency rules |
---|
547 | |
---|
548 | $(GENERICDIR)\regcomp.c: \ |
---|
549 | $(GENERICDIR)\regguts.h \ |
---|
550 | $(GENERICDIR)\regc_lex.c \ |
---|
551 | $(GENERICDIR)\regc_color.c \ |
---|
552 | $(GENERICDIR)\regc_nfa.c \ |
---|
553 | $(GENERICDIR)\regc_cvec.c \ |
---|
554 | $(GENERICDIR)\regc_locale.c |
---|
555 | |
---|
556 | $(GENERICDIR)\regcustom.h: \ |
---|
557 | $(GENERICDIR)\tclInt.h \ |
---|
558 | $(GENERICDIR)\tclPort.h \ |
---|
559 | $(GENERICDIR)\regex.h |
---|
560 | |
---|
561 | $(GENERICDIR)\regexec.c: \ |
---|
562 | $(GENERICDIR)\rege_dfa.c \ |
---|
563 | $(GENERICDIR)\regguts.h |
---|
564 | |
---|
565 | $(GENERICDIR)\regerror.c: $(GENERICDIR)\regguts.h |
---|
566 | $(GENERICDIR)\regfree.c: $(GENERICDIR)\regguts.h |
---|
567 | $(GENERICDIR)\regfronts.c: $(GENERICDIR)\regguts.h |
---|
568 | $(GENERICDIR)\regguts.h: $(GENERICDIR)\regcustom.h |
---|
569 | |
---|
570 | # |
---|
571 | # Implicit rules |
---|
572 | # |
---|
573 | |
---|
574 | {$(WINDIR)}.c{$(TMPDIR)}.obj: |
---|
575 | $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -o$@ $< |
---|
576 | |
---|
577 | {$(GENERICDIR)}.c{$(TMPDIR)}.obj: |
---|
578 | $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -o$@ $< |
---|
579 | |
---|
580 | {$(ROOT)\compat}.c{$(TMPDIR)}.obj: |
---|
581 | $(cc32) -DBUILD_tcl $(TCL_CFLAGS) -o$@ $< |
---|
582 | |
---|
583 | {$(WINDIR)}.rc{$(TMPDIR)}.res: |
---|
584 | $(rc32) $(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $< |
---|
585 | |
---|
586 | clean: |
---|
587 | -@$(RM) $(OUTDIR)\*.exp |
---|
588 | -@$(RM) $(OUTDIR)\*.lib |
---|
589 | -@$(RM) $(OUTDIR)\*.dll |
---|
590 | -@$(RM) $(OUTDIR)\*.exe |
---|
591 | -@$(RM) $(OUTDIR)\*.pdb |
---|
592 | -@$(RM) $(TMPDIR)\*.pch |
---|
593 | -@$(RM) $(TMPDIR)\*.obj |
---|
594 | -@$(RM) $(TMPDIR)\*.res |
---|
595 | -@$(RM) $(TMPDIR)\*.exe |
---|
596 | -@$(RMDIR) $(OUTDIR) |
---|
597 | -@$(RMDIR) $(TMPDIR) |
---|
598 | |
---|