blob: f2bd90094de414e0be356fc5fb63749a699150f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
|
# Borland C++ 4.5 makefile for Tk
#
# Copyright (c) 1995-1997 by Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# SCCS: @(#) makefile.bc 1.75 98/02/18 18:32:57
#
# Project directories
#
# ROOT = top of source tree
# TMPDIR = location where .obj files should be stored during build
# TCLDIR = location of top of Tcl source heirarchy
#
ROOT = ..
TMPDIR = .
TOOLS = c:\bc45
TCLDIR = ..\..\tcl8.1a2
# uncomment the following line to compile with symbols
#DEBUG=1
# uncomment the following line to compile with TCL_MEM_DEBUG
#DEBUGDEFINES =TCL_MEM_DEBUG
#
# Borland C++ tools
#
BORLAND = $(TOOLS)
IMPLIB = $(BORLAND)\bin\Implib
BCC32 = $(BORLAND)\bin\Bcc32
TLINK32 = $(BORLAND)\bin\tlink32
RC = $(BORLAND)\bin\brcc32
CP = copy
RM = del
INCLUDES = $(BORLAND)\include;$(ROOT)\generic;$(ROOT)\bitmaps;$(ROOT)\xlib;$(ROOT)\win;$(TCLDIR)\generic
LIBDIRS = $(BORLAND)\lib;$(ROOT)\win
TCLLIBDIR = $(TCLDIR)\win
!ifndef DEBUG
# these macros cause maximum optimization and no symbols
DEBUGLDFLAGS =
DEBUGCCFLAGS = -v- -vi- -O2
!else
# these macros enable debugging
DEBUGLDFLAGS = -v
DEBUGCCFLAGS = -k -Od -v
!endif
DEFINES = MT;_RTLDLL;STRICT;$(DEBUGDEFINES)
PROJECTCCFLAGS= $(DEBUGCCFLAGS) -w-par -w-stu
LNFLAGS_exe = -Tpe -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0w32
LNFLAGS_dll = -Tpd -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0d32
LNLIBS_exe = $(TKLIB) $(TCLLIBDIR)\$(TCLLIB) import32 cw32mti
LNLIBS_dll = $(TCLLIBDIR)\$(TCLLIB) import32 cw32mti
#
# Global makefile settings
#
.AUTODEPEND
.CACHEAUTODEPEND
.suffixes: .c .dll .lib .obj .exe
.path.c=$(ROOT)\win;$(ROOT)\generic;$(ROOT)\xlib;$(ROOT)\unix
.path.obj=$(TMPDIR)
WISHOBJS = \
$(TMPDIR)\tkConsole.obj \
$(TMPDIR)\winMain.obj
TKTESTOBJS = \
$(TMPDIR)\tkConsole.obj \
$(TMPDIR)\tkTest.obj \
$(TMPDIR)\tkSquare.obj \
$(TMPDIR)\testMain.obj
XLIBOBJS = \
$(TMPDIR)\xcolors.obj \
$(TMPDIR)\xdraw.obj \
$(TMPDIR)\xgc.obj \
$(TMPDIR)\ximage.obj \
$(TMPDIR)\xutil.obj
TKOBJS = \
$(TMPDIR)\tkUnixMenubu.obj \
$(TMPDIR)\tkUnixScale.obj \
$(XLIBOBJS) \
$(TMPDIR)\tkWin3d.obj \
$(TMPDIR)\tkWin32Dll.obj \
$(TMPDIR)\tkWinButton.obj \
$(TMPDIR)\tkWinClipboard.obj \
$(TMPDIR)\tkWinColor.obj \
$(TMPDIR)\tkWinConfig.obj \
$(TMPDIR)\tkWinCursor.obj \
$(TMPDIR)\tkWinDialog.obj \
$(TMPDIR)\tkWinDraw.obj \
$(TMPDIR)\tkWinEmbed.obj \
$(TMPDIR)\tkWinFont.obj \
$(TMPDIR)\tkWinImage.obj \
$(TMPDIR)\tkWinInit.obj \
$(TMPDIR)\tkWinKey.obj \
$(TMPDIR)\tkWinMenu.obj \
$(TMPDIR)\tkWinPixmap.obj \
$(TMPDIR)\tkWinPointer.obj \
$(TMPDIR)\tkWinRegion.obj \
$(TMPDIR)\tkWinScrlbr.obj \
$(TMPDIR)\tkWinSend.obj \
$(TMPDIR)\tkWinTest.obj \
$(TMPDIR)\tkWinWindow.obj \
$(TMPDIR)\tkWinWm.obj \
$(TMPDIR)\tkWinX.obj \
$(TMPDIR)\stubs.obj \
$(TMPDIR)\tk3d.obj \
$(TMPDIR)\tkArgv.obj \
$(TMPDIR)\tkAtom.obj \
$(TMPDIR)\tkBind.obj \
$(TMPDIR)\tkBitmap.obj \
$(TMPDIR)\tkButton.obj \
$(TMPDIR)\tkCanvArc.obj \
$(TMPDIR)\tkCanvBmap.obj \
$(TMPDIR)\tkCanvImg.obj \
$(TMPDIR)\tkCanvLine.obj \
$(TMPDIR)\tkCanvPoly.obj \
$(TMPDIR)\tkCanvPs.obj \
$(TMPDIR)\tkCanvText.obj \
$(TMPDIR)\tkCanvUtil.obj \
$(TMPDIR)\tkCanvWind.obj \
$(TMPDIR)\tkCanvas.obj \
$(TMPDIR)\tkClipboard.obj \
$(TMPDIR)\tkCmds.obj \
$(TMPDIR)\tkColor.obj \
$(TMPDIR)\tkConfig.obj \
$(TMPDIR)\tkCursor.obj \
$(TMPDIR)\tkEntry.obj \
$(TMPDIR)\tkError.obj \
$(TMPDIR)\tkEvent.obj \
$(TMPDIR)\tkFileFilter.obj \
$(TMPDIR)\tkFocus.obj \
$(TMPDIR)\tkFont.obj \
$(TMPDIR)\tkFrame.obj \
$(TMPDIR)\tkGC.obj \
$(TMPDIR)\tkGeometry.obj \
$(TMPDIR)\tkGet.obj \
$(TMPDIR)\tkGrab.obj \
$(TMPDIR)\tkGrid.obj \
$(TMPDIR)\tkImage.obj \
$(TMPDIR)\tkImgBmap.obj \
$(TMPDIR)\tkImgGIF.obj \
$(TMPDIR)\tkImgPPM.obj \
$(TMPDIR)\tkImgPhoto.obj \
$(TMPDIR)\tkImgUtil.obj \
$(TMPDIR)\tkListbox.obj \
$(TMPDIR)\tkMacWinMenu.obj \
$(TMPDIR)\tkMain.obj \
$(TMPDIR)\tkMenu.obj \
$(TMPDIR)\tkMenubutton.obj \
$(TMPDIR)\tkMenuDraw.obj \
$(TMPDIR)\tkMessage.obj \
$(TMPDIR)\tkObj.obj \
$(TMPDIR)\tkOldConfig.obj \
$(TMPDIR)\tkOption.obj \
$(TMPDIR)\tkPack.obj \
$(TMPDIR)\tkPlace.obj \
$(TMPDIR)\tkPointer.obj \
$(TMPDIR)\tkRectOval.obj \
$(TMPDIR)\tkScale.obj \
$(TMPDIR)\tkScrollbar.obj \
$(TMPDIR)\tkSelect.obj \
$(TMPDIR)\tkText.obj \
$(TMPDIR)\tkTextBTree.obj \
$(TMPDIR)\tkTextDisp.obj \
$(TMPDIR)\tkTextImage.obj \
$(TMPDIR)\tkTextIndex.obj \
$(TMPDIR)\tkTextMark.obj \
$(TMPDIR)\tkTextTag.obj \
$(TMPDIR)\tkTextWind.obj \
$(TMPDIR)\tkTrig.obj \
$(TMPDIR)\tkUtil.obj \
$(TMPDIR)\tkVisual.obj \
$(TMPDIR)\tkWindow.obj
TCLDLL = tcl81.dll
TCLLIB = tcl81.lib
TKDLL = tk81.dll
TKLIB = tk81.lib
WISH = wish81.exe
TKTEST = tktest.exe
#
# Targets
#
all: cfgdll $(TKDLL) cfgexe $(WISH) cfgcln
tktest: cfgdll $(TKDLL) cfgtest $(TKTEST) cfgcln
test: tktest
$(TKTEST) &&|
cd ../tests
console show
update
source all
|
# Implicit Targets
.c.obj:
@$(BCC32) {$< }
.dll.lib:
$(IMPLIB) -c $@ $<
.rc.res:
$(RC) -i$(INCLUDES) $<
#
# Special case object file targets
#
$(TMPDIR)\testMain.obj : $(ROOT)\win\winMain.c
$(BCC32) -c -o$@ $(ROOT)\win\winMain.c
#
# Configuration file targets - these files are implicitly used by the compiler
#
cfgdll:
@$(CP) &&|
-n$(TMPDIR) -I$(INCLUDES) -c -WM
-D$(DEFINES) -3 -d $(PROJECTCCFLAGS)
| bcc32.cfg >NUL
cfgexe:
@$(CP) &&|
-n$(TMPDIR) -I$(INCLUDES) -c -W
-D$(DEFINES) -3 -d $(PROJECTCCFLAGS)
| bcc32.cfg >NUL
cfgtest:
@$(CP) &&|
-n$(TMPDIR) -I$(INCLUDES) -c -W
-D$(DEFINES);TK_TEST -3 -d $(PROJECTCCFLAGS)
| bcc32.cfg >NUL
cfgcln:
@$(RM) bcc32.cfg
#
# Executable targets
#
$(TKDLL): $(TKOBJS) tk.def rc\tk.res
$(TLINK32) @&&|
$(LNFLAGS_dll) $(TKOBJS)
$@
-x
$(LNLIBS_dll)
tk.def
rc\tk.res
|
$(WISH): $(WISHOBJS) $(TKLIB) rc\wish.res
$(TLINK32) @&&|
$(LNFLAGS_exe) $(WISHOBJS)
$@
-x
$(LNLIBS_exe)
|, &&|
EXETYPE WINDOWS
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
|, rc\wish.res
$(TKTEST): $(TKTESTOBJS) $(TKLIB)
$(TLINK32) $(LNFLAGS_exe) @&&|
$(TKTESTOBJS)
$@
-x
$(LNLIBS_exe)
|, &&|
EXETYPE WINDOWS
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE MULTIPLE
|,
#
# Other dependencies
#
rc\wish.res: rc\wish.ico
rc\tk.res: rc\tk.ico rc\*.cur
# The following rule automatically generates a tk.def file containing
# an export entry for every public symbol in the $(TKDLL) library.
tk.def: $(TKOBJS)
$(TCLLIBDIR)\dumpexts.exe -o $@ $(TKDLL) @&&|
$(TKOBJS)
|
# rule to build library object files
# debugging rules, the .dll and .exe files must be in the same
# directory as the object files for debugging purposes
$(TMPDIR)\$(TKDLL): $(TKDLL)
$(CP) $(TKDLL) $(TMPDIR)
$(TMPDIR)\$(TCLDLL): $(TCLLIBDIR)\$(TCLDLL)
$(CP) $(TCLLIBDIR)\$(TCLDLL) $(TMPDIR)
$(TMPDIR)\$(WISH): $(WISH)
$(CP) $(WISH) $(TMPDIR)
$(TMPDIR)\$(TKTEST): $(TKTEST)
$(CP) $(TKTEST) $(TMPDIR)
debug: $(TMPDIR)\$(TKDLL) $(TMPDIR)\$(TCLDLL) $(TMPDIR)\$(TKTEST)
# remove all generated files
clean:
$(RM) $(WISH)
$(RM) $(TKTEST)
$(RM) $(TKLIB)
$(RM) $(TKDLL)
$(RM) rc\*.res
$(RM) tk.def
$(RM) $(TMPDIR)\*.obj
$(RM) *.cfg
|