1#
2# Makefile for Borland C++ 5.5 (or C++ Builder 5), adapted from the makefile
3#   for Visual C++ that came with tk 8.3.3
4#
5# Some "not so obvious" details in this makefile are preceded by a comment
6# "maintenance hint", which tries to explain what's going on. Better to
7# leave those in place.
8# Helmut Giese, July 2002
9#
10# See the file "license.terms" for information on usage and redistribution
11# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12#
13# Copyright (c) 1995-1997 Sun Microsystems, Inc.
14# Copyright (c) 1998-2000 Ajuba Solutions.
15
16# Does not depend on the presence of any environment variables in
17# order to compile tcl; all needed information is derived from
18# location of the compiler directories.
19
20#
21# Project directories
22#
23# ROOT    = top of source tree
24#
25# TMPDIR  = location where .obj files should be stored during build
26#
27# TOOLS32 = location of Borland development tools.
28#
29# TCLDIR = location of top of Tcl source hierarchy
30#
31
32ROOT        = ..
33TCLDIR      = ..\..\tcl8.4
34INSTALLDIR  = D:\tmp\tcl
35
36# If you have C++ Builder 5 or the free Borland C++ 5.5 compiler
37# adapt the following paths as appropriate for your system
38TOOLS32    = d:\cbld5
39TOOLS32_rc = d:\cbld5
40#TOOLS32    = c:\bc55
41#TOOLS32_rc = c:\bc55
42
43cc32      = "$(TOOLS32)\bin\bcc32.exe"
44link32    = "$(TOOLS32)\bin\ilink32.exe"
45lib32     = "$(TOOLS32)\bin\tlib.exe"
46rc32      = "$(TOOLS32_rc)\bin\brcc32.exe"
47include32 = -I"$(TOOLS32)\include;$(TOOLS32)\include\mfc"
48libpath32 = -L"$(TOOLS32)\lib"
49
50# Uncomment the following line to compile with thread support
51#THREADDEFINES = -DTCL_THREADS=1
52
53# Allow definition of NDEBUG via command line
54# Set NODEBUG to 0 to compile with symbols
55!if !defined(NODEBUG)
56NODEBUG = 1
57!endif
58
59# uncomment the following two lines to compile with TCL_MEM_DEBUG
60#DEBUGDEFINES =-DTCL_MEM_DEBUG
61
62######################################################################
63# Do not modify below this line
64######################################################################
65
66TCLNAMEPREFIX = tcl
67TKNAMEPREFIX = tk
68WISHNAMEPREFIX = wish
69VERSION = 84
70DOTVERSION = 8.4
71
72TCLSTUBPREFIX = $(TCLNAMEPREFIX)stub
73TKSTUBPREFIX  = $(TKNAMEPREFIX)stub
74
75
76BINROOT   = .
77!IF "$(NODEBUG)" == "1"
78TMPDIRNAME  = Release
79DBGX        =
80!ELSE
81TMPDIRNAME  = Debug
82DBGX        =
83#DBGX       = d
84!ENDIF
85TMPDIR      = $(BINROOT)\$(TMPDIRNAME)
86OUTDIRNAME  = $(TMPDIRNAME)
87OUTDIR      = $(TMPDIR)
88
89TCLLIB        = $(TCLNAMEPREFIX)$(VERSION)$(DBGX).lib
90TCLPLUGINLIB  = $(TCLNAMEPREFIX)$(VERSION)p.lib
91TCLSTUBLIB    = $(TCLSTUBPREFIX)$(VERSION)$(DBGX).lib
92TKDLLNAME     = $(TKNAMEPREFIX)$(VERSION)$(DBGX).dll
93TKDLL         = $(OUTDIR)\$(TKDLLNAME)
94TKLIB         = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)$(DBGX).lib
95TKSTUBLIBNAME = $(TKSTUBPREFIX)$(VERSION)$(DBGX).lib
96TKSTUBLIB     = $(OUTDIR)\$(TKSTUBLIBNAME)
97TKPLUGINDLLNAME = $(TKNAMEPREFIX)$(VERSION)p$(DBG).dll
98TKPLUGINDLL   = $(OUTDIR)\$(TKPLUGINDLLNAME)
99TKPLUGINLIB   = $(OUTDIR)\$(TKNAMEPREFIX)$(VERSION)p$(DBGX).lib
100
101WISH      = $(OUTDIR)\$(WISHNAMEPREFIX)$(VERSION)$(DBGX).exe
102WISHC     = $(OUTDIR)\$(WISHNAMEPREFIX)c$(VERSION)$(DBGX).exe
103WISHP     = $(OUTDIR)\$(WISHNAMEPREFIX)p$(VERSION)$(DBGX).exe
104TKTEST    = $(OUTDIR)\$(TKNAMEPREFIX)test.exe
105CAT32     = $(TMPDIR)\cat32.exe
106
107BIN_INSTALL_DIR     = $(INSTALLDIR)\bin
108INCLUDE_INSTALL_DIR = $(INSTALLDIR)\include
109LIB_INSTALL_DIR     = $(INSTALLDIR)\lib
110SCRIPT_INSTALL_DIR  = $(LIB_INSTALL_DIR)\tk$(DOTVERSION)
111
112WISHOBJS = \
113  $(TMPDIR)\winMain.obj
114
115TKTESTOBJS = \
116  $(TMPDIR)\tkTest.obj \
117  $(TMPDIR)\tkSquare.obj \
118  $(TMPDIR)\testMain.obj \
119  $(TMPDIR)\tkOldTest.obj \
120  $(TMPDIR)\tkWinTest.obj \
121  $(TCLLIBDIR)\tclThreadTest.obj
122
123XLIBOBJS = \
124  $(TMPDIR)\xcolors.obj \
125  $(TMPDIR)\xdraw.obj \
126  $(TMPDIR)\xgc.obj \
127  $(TMPDIR)\ximage.obj \
128  $(TMPDIR)\xutil.obj
129
130TKOBJS = \
131	$(TMPDIR)\tkConsole.obj \
132	$(TMPDIR)\tkUnixMenubu.obj \
133	$(TMPDIR)\tkUnixScale.obj \
134	$(XLIBOBJS) \
135	$(TMPDIR)\tkWin3d.obj \
136	$(TMPDIR)\tkWin32Dll.obj \
137	$(TMPDIR)\tkWinButton.obj \
138	$(TMPDIR)\tkWinClipboard.obj \
139	$(TMPDIR)\tkWinColor.obj \
140	$(TMPDIR)\tkWinConfig.obj \
141	$(TMPDIR)\tkWinCursor.obj \
142	$(TMPDIR)\tkWinDialog.obj \
143	$(TMPDIR)\tkWinDraw.obj \
144	$(TMPDIR)\tkWinEmbed.obj \
145	$(TMPDIR)\tkWinFont.obj \
146	$(TMPDIR)\tkWinImage.obj \
147	$(TMPDIR)\tkWinInit.obj \
148	$(TMPDIR)\tkWinKey.obj \
149	$(TMPDIR)\tkWinMenu.obj \
150	$(TMPDIR)\tkWinPixmap.obj \
151	$(TMPDIR)\tkWinPointer.obj \
152	$(TMPDIR)\tkWinRegion.obj \
153	$(TMPDIR)\tkWinScrlbr.obj \
154	$(TMPDIR)\tkWinSend.obj \
155	$(TMPDIR)\tkWinWindow.obj \
156	$(TMPDIR)\tkWinWm.obj \
157	$(TMPDIR)\tkWinX.obj \
158	$(TMPDIR)\stubs.obj \
159	$(TMPDIR)\tk3d.obj \
160	$(TMPDIR)\tkArgv.obj \
161	$(TMPDIR)\tkAtom.obj \
162	$(TMPDIR)\tkBind.obj \
163	$(TMPDIR)\tkBitmap.obj \
164	$(TMPDIR)\tkButton.obj \
165	$(TMPDIR)\tkCanvArc.obj \
166	$(TMPDIR)\tkCanvBmap.obj \
167	$(TMPDIR)\tkCanvImg.obj \
168	$(TMPDIR)\tkCanvLine.obj \
169	$(TMPDIR)\tkCanvPoly.obj \
170	$(TMPDIR)\tkCanvPs.obj \
171	$(TMPDIR)\tkCanvText.obj \
172	$(TMPDIR)\tkCanvUtil.obj \
173	$(TMPDIR)\tkCanvWind.obj \
174	$(TMPDIR)\tkCanvas.obj \
175	$(TMPDIR)\tkClipboard.obj \
176	$(TMPDIR)\tkCmds.obj \
177	$(TMPDIR)\tkColor.obj \
178	$(TMPDIR)\tkConfig.obj \
179	$(TMPDIR)\tkCursor.obj \
180	$(TMPDIR)\tkEntry.obj \
181	$(TMPDIR)\tkError.obj \
182	$(TMPDIR)\tkEvent.obj \
183	$(TMPDIR)\tkFileFilter.obj \
184	$(TMPDIR)\tkFocus.obj \
185	$(TMPDIR)\tkFont.obj \
186	$(TMPDIR)\tkFrame.obj \
187	$(TMPDIR)\tkGC.obj \
188	$(TMPDIR)\tkGeometry.obj \
189	$(TMPDIR)\tkGet.obj \
190	$(TMPDIR)\tkGrab.obj \
191	$(TMPDIR)\tkGrid.obj \
192	$(TMPDIR)\tkImage.obj \
193	$(TMPDIR)\tkImgBmap.obj \
194	$(TMPDIR)\tkImgGIF.obj \
195	$(TMPDIR)\tkImgPPM.obj \
196	$(TMPDIR)\tkImgPhoto.obj \
197	$(TMPDIR)\tkImgUtil.obj \
198	$(TMPDIR)\tkListbox.obj \
199	$(TMPDIR)\tkMacWinMenu.obj \
200	$(TMPDIR)\tkMain.obj \
201	$(TMPDIR)\tkMenu.obj \
202	$(TMPDIR)\tkMenubutton.obj \
203	$(TMPDIR)\tkMenuDraw.obj \
204	$(TMPDIR)\tkMessage.obj \
205	$(TMP_DIR)\tkPanedWindow.obj \
206	$(TMPDIR)\tkObj.obj \
207	$(TMPDIR)\tkOldConfig.obj \
208	$(TMPDIR)\tkOption.obj \
209	$(TMPDIR)\tkPack.obj \
210	$(TMPDIR)\tkPlace.obj \
211	$(TMPDIR)\tkPointer.obj \
212	$(TMPDIR)\tkRectOval.obj \
213	$(TMPDIR)\tkScale.obj \
214	$(TMPDIR)\tkScrollbar.obj \
215	$(TMPDIR)\tkSelect.obj \
216	$(TMPDIR)\tkText.obj \
217	$(TMPDIR)\tkTextBTree.obj \
218	$(TMPDIR)\tkTextDisp.obj \
219	$(TMPDIR)\tkTextImage.obj \
220	$(TMPDIR)\tkTextIndex.obj \
221	$(TMPDIR)\tkTextMark.obj \
222	$(TMPDIR)\tkTextTag.obj \
223	$(TMPDIR)\tkTextWind.obj \
224	$(TMPDIR)\tkTrig.obj \
225	$(TMPDIR)\tkUtil.obj \
226	$(TMPDIR)\tkVisual.obj \
227	$(TMPDIR)\tkStubInit.obj \
228	$(TMPDIR)\tkWindow.obj
229
230# Maintenance hint: Please have multiple members of TKSTUBOBJS be separated
231# by exactly one ' ' (see below the rule for making TKSTUBLIB)
232TKSTUBOBJS = $(TMPDIR)\tkStubLib.obj
233
234WINDIR      = $(ROOT)\win
235GENERICDIR  = $(ROOT)\generic
236XLIBDIR     = $(ROOT)\xlib
237BITMAPDIR   = $(ROOT)\bitmaps
238TCLLIBDIR   = $(TCLDIR)\win\$(OUTDIRNAME)
239RCDIR       = $(WINDIR)\rc
240
241TK_INCLUDES = -I$(WINDIR) -I$(GENERICDIR) -I$(BITMAPDIR) -I$(XLIBDIR) \
242      -I$(TCLDIR)\generic -I$(TCLDIR)\win
243
244TK_DEFINES  = -D__WIN32__ $(DEBUGDEFINES) $(THREADDEFINES) SUPPORT_CONFIG_EMBEDDED
245
246######################################################################
247# Compile flags
248######################################################################
249
250!IF "$(NODEBUG)" == "1"
251# these macros cause maximum optimization and no symbols
252cdebug = -v- -vi- -O2 -D_DEBUG
253!ELSE
254# these macros enable debugging
255cdebug = -k -Od -r- -v -vi- -y
256!ENDIF
257
258SYSDEFINES = _MT;NO_STRICT;_NO_VCL
259
260# declarations common to all compiler options
261cbase = -3 -a4 -c -g0 -tWM -Ve -Vx -X-
262WARNINGS = -w-rch -w-pch -w-par -w-dup -w-pro -w-dpu
263
264ccons = -tWC
265
266CFLAGS      = $(cdebug) $(cbase) $(WARNINGS) -D$(SYSDEFINES)
267
268CON_CFLAGS  = $(CFLAGS) $(TK_DEFINES) $(include32) $(ccons)
269WISH_CFLAGS = $(CFLAGS) $(include32) $(TK_INCLUDES) $(TK_DEFINES)
270TK_CFLAGS   = $(CFLAGS) $(include32) $(TK_INCLUDES) $(TK_DEFINES) \
271                   -DUSE_TCL_STUBS
272
273######################################################################
274# Link flags
275######################################################################
276
277!IF "$(NODEBUG)" == "1"
278ldebug =
279!ELSE
280ldebug = -v
281!ENDIF
282
283# declarations common to all linker options
284LNFLAGS = -D"" -Gn -I$(TMPDIR) -x $(ldebug) $(libpath32)
285# -Gi: create lib file (is -Gl in doc)
286# -aa: Windows app, -ap: Windows console app
287LNFLAGS_DLL  = -ap -Gi -Tpd
288LNFLAGS_CONS = -ap -Tpe
289LNFLAGS_GUI  = -aa -Tpe
290
291LNLIBS = import32 cw32mt
292
293
294######################################################################
295# Project specific targets
296######################################################################
297
298all:      setup $(WISH) $(CAT32)
299install:  install-binaries install-libraries
300plugin:   setup $(TKPLUGINDLL) $(WISHP)
301tktest:   setup $(TKTEST) $(CAT32)
302
303# Maintenance hint: We want to set environment variables before calling tktest.
304#  If we do this in the form of normal commands, they will not persist up to
305#  the call of tktest. Therfore we put all commands wanted into a batch file.
306#  The normal way of using 'echo >x.bat' and 'echo >>x.bat' does not work here
307#  because we cannot write '... > tktest.txt' this way. Hence this advanced
308#  form of loop hopping:
309#    - Have MAKE produce a temporary file with the content we want.
310#    - Use it as input to the COPY command to produce a batch file.
311#    - Run the batch file and be happy.
312#
313test:     setup $(TKTEST) $(TKLIB) $(CAT32)
314  copy &&!
315  set TCL_LIBRARY=$(TCLDIR)/library
316  set PATH=$(TCLDIR)\win\$(TMPDIRNAME);$(PATH)
317  $(TKTEST) $(ROOT)/tests/all.tcl > tktest.txt
318! _test.bat
319  _test.bat
320#  del _test.bat
321
322runtest:  setup $(TKTEST) $(TKLIB) $(CAT32)
323  echo set TCL_LIBRARY=$(TCLDIR)/library             > _test2.bat
324  echo set PATH=$(TCLDIR)\win\$(TMPDIRNAME);$(PATH) >> _test2.bat
325  echo $(TKTEST)                                    >> _test2.bat
326  _test2.bat
327#  del _test2.bat
328
329console-wish : all $(WISHC)
330
331stubs:
332  $(TCLDIR)\win\$(TMPDIRNAME)\tclsh$(VERSION)$(DBGX) \
333    $(TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \
334    $(GENERICDIR)\tk.decls $(GENERICDIR)\tkInt.decls
335
336setup:
337  @mkd $(TMPDIR)
338  @mkd $(OUTDIR)
339
340install-binaries:
341  @mkd "$(BIN_INSTALL_DIR)"
342  copy $(TKDLL) "$(BIN_INSTALL_DIR)"
343  copy $(WISH) "$(BIN_INSTALL_DIR)"
344  @mkd "$(LIB_INSTALL_DIR)"
345  copy $(TKLIB) "$(LIB_INSTALL_DIR)"
346
347install-libraries:
348  @mkd "$(INCLUDE_INSTALL_DIR)"
349  @mkd "$(INCLUDE_INSTALL_DIR)\X11"
350  copy "$(GENERICDIR)\tk.h"             "$(INCLUDE_INSTALL_DIR)"
351  copy "$(GENERICDIR)\tkDecls.h"        "$(INCLUDE_INSTALL_DIR)"
352  copy "$(GENERICDIR)\tkPlatDecls.h"    "$(INCLUDE_INSTALL_DIR)"
353  copy "$(GENERICDIR)\tkIntXlibDecls.h" "$(INCLUDE_INSTALL_DIR)"
354  xcopy "$(XLIBDIR)\X11\*.h"            "$(INCLUDE_INSTALL_DIR)\X11"
355  @mkd "$(SCRIPT_INSTALL_DIR)"
356  @mkd "$(SCRIPT_INSTALL_DIR)\images"
357  @mkd "$(SCRIPT_INSTALL_DIR)\demos"
358  @mkd "$(SCRIPT_INSTALL_DIR)\demos\images"
359  @mkd "$(SCRIPT_INSTALL_DIR)\msgs"
360  xcopy "$(ROOT)\library"		"$(SCRIPT_INSTALL_DIR)"
361  xcopy "$(ROOT)\library\images"	"$(SCRIPT_INSTALL_DIR)\images"
362  xcopy "$(ROOT)\library\demos"		"$(SCRIPT_INSTALL_DIR)\demos"
363  xcopy "$(ROOT)\library\demos\images"	"$(SCRIPT_INSTALL_DIR)\demos\images"
364  xcopy "$(ROOT)\library\msgs"		"$(SCRIPT_INSTALL_DIR)\msgs"
365
366$(TKLIB): $(TKDLL) $(TKSTUBLIB)
367
368# Maintenance hint: The macro puts a '+-' before the first member of
369#   TKSTUBOBJS, than replaces any ' ' with ' +-' - together putting '+-' in
370#   front of any member of TKSTUBOBJS (provided, they are separated in their
371#   defintion by just one space).
372#
373# The first time you *make* this target, you will get a warning
374#   tkStubLib not found in library
375# This is (probably) because of the '-' option, telling TLIB to remove
376# 'tkStubLib' when it does not yet exist. Forcing a re-make when it already
377# exists avoids this warning.
378#
379$(TKSTUBLIB): $(TKSTUBOBJS)
380    $(lib32) $@ +-$(TKSTUBOBJS: = +-)
381
382#    $(lib32) $@ @&&!
383#+-$(TKSTUBOBJS: = &^
384#+-)
385#!
386
387$(TKDLL): $(TKOBJS) $(TMPDIR)\tk.res
388    $(link32) $(ldebug) $(LNFLAGS) $(LNFLAGS_DLL) $(TOOLS32)\lib\c0d32 @&&!
389      $(TKOBJS), $@, -x, $(LNLIBS) $(TCLLIBDIR)\$(TCLSTUBLIB),, $(TMPDIR)\tk.res
390!
391
392$(TKPLUGINLIB): $(TKPLUGINDLL)
393
394#$(TKPLUGINDLL): $(TKOBJS) $(TMPDIR)\tk.res
395#        $(link32) $(ldebug) $(dlllflags) \
396#    -out:$@ $(TMPDIR)\tk.res $(TCLLIBDIR)\$(TCLPLUGINLIB) \
397#    $(guilibsdll) @<<
398#      $(TKOBJS)
399#<<
400
401$(WISH): $(WISHOBJS) $(TKLIB) $(TMPDIR)\wish.res
402  $(link32) $(ldebug) -S:2400000 $(LNFLAGS) $(LNFLAGS_GUI) $(TOOLS32)\lib\c0x32 @&&!
403    $(WISHOBJS), $@, -x, $(LNLIBS) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB),, $(TMPDIR)\wish.res
404!
405
406$(WISHC): $(WISHOBJS) $(TKLIB) $(TMPDIR)\wish.res
407  $(link32) $(ldebug) -S:2400000 $(LNFLAGS) $(LNFLAGS_CONS) $(TOOLS32)\lib\c0x32 @&&!
408    $(WISHOBJS), $@, -x, $(LNLIBS) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB),, $(TMPDIR)\wish.res
409!
410
411$(WISHP): $(WISHOBJS) $(TKPLUGINLIB) $(TMPDIR)\wish.res
412  $(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -out:$@ \
413    $(guilibsdll) $(TCLLIBDIR)\$(TCLPLUGINLIB) \
414    $(TKPLUGINLIB) $(WISHOBJS)
415
416$(TKTEST): $(TKTESTOBJS) $(TKLIB) $(TMPDIR)\wish.res
417  $(link32) $(ldebug) -S:2400000 $(LNFLAGS) $(LNFLAGS_GUI) $(TOOLS32)\lib\c0x32 @&&!
418    $(TKTESTOBJS), $@, -x, $(LNLIBS) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB),, $(TMPDIR)\wish.res
419!
420#  $(link32) $(ldebug) $(guilflags) $(TMPDIR)\wish.res -out:$@ \
421#    $(guilibsdll) $(TCLLIBDIR)\$(TCLLIB) $(TKLIB) $(TKTESTOBJS)
422
423#$(CAT32): $(TCLDIR)\win\cat.c
424#  $(cc32) $(CON_CFLAGS) -o$(TMPDIR)\cat.obj $?
425#  $(link32) $(conlflags) -out:$@ -stack:16384 $(TMPDIR)\cat.obj $(conlibs)
426
427$(CAT32): $(TCLDIR)\win\cat.c
428  $(cc32) $(CONS_CFLAGS) -o$(TMPDIR)\cat.obj $?
429  $(link32) $(ldebug) $(LNFLAGS) $(LNFLAGS_CONS) $(TOOLS32)\lib\c0x32 \
430      $(TMPDIR)\cat.obj, $@, -x, $(LNLIBS),,
431
432#
433# Regenerate the stubs files.
434#
435
436genstubs:
437  tclsh$(VERSION) $(TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \
438    $(GENERICDIR)\tk.decls $(GENERICDIR)\tkInt.decls
439
440#
441# Special case object file targets
442#
443
444$(TMPDIR)\testMain.obj: $(WINDIR)\winMain.c
445  $(cc32) $(WISH_CFLAGS) -DTK_TEST -o$@ $?
446
447$(TMPDIR)\tkTest.obj: $(GENERICDIR)\tkTest.c
448  $(cc32) $(WISH_CFLAGS) -o$@ $?
449
450$(TMPDIR)\tkOldTest.obj: $(GENERICDIR)\tkOldTest.c
451  $(cc32) $(WISH_CFLAGS) -o$@ $?
452
453$(TMPDIR)\tkWinTest.obj: $(WINDIR)\tkWinTest.c
454  $(cc32) $(WISH_CFLAGS) -o$@ $?
455
456$(TMPDIR)\tkSquare.obj: $(GENERICDIR)\tkSquare.c
457  $(cc32) $(WISH_CFLAGS) -o$@ $?
458
459$(TMPDIR)\winMain.obj: $(WINDIR)\winMain.c
460  $(cc32) $(WISH_CFLAGS) -o$@ $?
461
462$(TMPDIR)\tkStubLib.obj : $(GENERICDIR)\tkStubLib.c
463  $(cc32) $(TK_CFLAGS) -DSTATIC_BUILD -o$@ $?
464
465#
466# Implicit rules
467#
468
469{$(XLIBDIR)}.c{$(TMPDIR)}.obj:
470  $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o$@ $<
471
472{$(GENERICDIR)}.c{$(TMPDIR)}.obj:
473  $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o$@ $<
474
475{$(WINDIR)}.c{$(TMPDIR)}.obj:
476  $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o$@ $<
477
478{$(ROOT)\unix}.c{$(TMPDIR)}.obj:
479  $(cc32) -DDLL_BUILD -DBUILD_tk $(TK_CFLAGS) -o$@ $<
480
481{$(RCDIR)}.rc{$(TMPDIR)}.res:
482  $(rc32) -I"$(GENERICDIR)" -I"$(TOOLS32)\include" -I"$(TCLDIR)\generic" \
483      -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $<
484
485clean:
486  -@del $(OUTDIR)\*.exp
487  -@del $(OUTDIR)\*.lib
488  -@del $(OUTDIR)\*.dll
489  -@del $(OUTDIR)\*.exe
490  -@del $(OUTDIR)\*.pdb
491  -@del $(TMPDIR)\*.pch
492  -@del $(TMPDIR)\*.obj
493  -@del $(TMPDIR)\*.res
494  -@del $(TMPDIR)\*.exe
495  -@rmd $(OUTDIR)
496  -@rmd $(TMPDIR)
497
498# dependencies
499
500$(TMPDIR)\tk.res: \
501    $(RCDIR)\buttons.bmp \
502    $(RCDIR)\cursor*.cur \
503    $(RCDIR)\tk.ico
504
505$(GENERICDIR)/default.h: $(WINDIR)/tkWinDefault.h
506$(GENERICDIR)/tkButton.c: $(GENERICDIR)/default.h
507$(GENERICDIR)/tkCanvas.c: $(GENERICDIR)/default.h
508$(GENERICDIR)/tkEntry.c: $(GENERICDIR)/default.h
509$(GENERICDIR)/tkFrame.c: $(GENERICDIR)/default.h
510$(GENERICDIR)/tkListbox.c: $(GENERICDIR)/default.h
511$(GENERICDIR)/tkMenu.c: $(GENERICDIR)/default.h
512$(GENERICDIR)/tkMenubutton.c: $(GENERICDIR)/default.h
513$(GENERICDIR)/tkMessage.c: $(GENERICDIR)/default.h
514$(GENERICDIR)/tkScale.c: $(GENERICDIR)/default.h
515$(GENERICDIR)/tkScrollbar.c: $(GENERICDIR)/default.h
516$(GENERICDIR)/tkText.c: $(GENERICDIR)/default.h
517$(GENERICDIR)/tkTextIndex.c: $(GENERICDIR)/default.h
518$(GENERICDIR)/tkTextTag.c: $(GENERICDIR)/default.h
519
520$(GENERICDIR)/tkText.c: $(GENERICDIR)/tkText.h
521$(GENERICDIR)/tkTextBTree.c: $(GENERICDIR)/tkText.h
522$(GENERICDIR)/tkTextDisp.c: $(GENERICDIR)/tkText.h
523$(GENERICDIR)/tkTextDisp.c: $(GENERICDIR)/tkText.h
524$(GENERICDIR)/tkTextImage.c: $(GENERICDIR)/tkText.h
525$(GENERICDIR)/tkTextIndex.c: $(GENERICDIR)/tkText.h
526$(GENERICDIR)/tkTextMark.c: $(GENERICDIR)/tkText.h
527$(GENERICDIR)/tkTextTag.c: $(GENERICDIR)/tkText.h
528$(GENERICDIR)/tkTextWind.c: $(GENERICDIR)/tkText.h
529
530$(GENERICDIR)/tkMacWinMenu.c: $(GENERICDIR)/tkMenu.h
531$(GENERICDIR)/tkMenu.c: $(GENERICDIR)/tkMenu.h
532$(GENERICDIR)/tkMenuDraw.c: $(GENERICDIR)/tkMenu.h
533$(WINDIR)/tkWinMenu.c: $(GENERICDIR)/tkMenu.h
534
535
536