root/tk-8.0/tags/rat_4_1_8/unix/Makefile.in @ 1274

Revision 1274, 39.7 KB (checked in by anonymous, 14 years ago)

This commit was manufactured by cvs2svn to create tag 'rat_4_1_8'.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#
2# This file is a Makefile for Tk.  If it has the name "Makefile.in"
3# then it is a template for a Makefile;  to generate the actual Makefile,
4# run "./configure", which is a configuration script generated by the
5# "autoconf" program (constructs like "@foo@" will get replaced in the
6# actual Makefile.
7#
8# SCCS: @(#) Makefile.in 1.146 97/11/05 11:10:45
9
10# Current Tk version;  used in various names.
11
12TCLVERSION = @TCL_VERSION@
13VERSION = @TK_VERSION@
14
15#----------------------------------------------------------------
16# Things you can change to personalize the Makefile for your own
17# site (you can make these changes in either Makefile.in or
18# Makefile, but changes to Makefile will get lost if you re-run
19# the configuration script).
20#----------------------------------------------------------------
21
22# Default top-level directories in which to install architecture-
23# specific files (exec_prefix) and machine-independent files such
24# as scripts (prefix).  The values specified here may be overridden
25# at configure-time with the --exec-prefix and --prefix options
26# to the "configure" script.
27
28prefix =                @prefix@
29exec_prefix =           @exec_prefix@
30
31# The following definition can be set to non-null for special systems
32# like AFS with replication.  It allows the pathnames used for installation
33# to be different than those used for actually reference files at
34# run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
35# when installing files.
36INSTALL_ROOT =
37
38# Directory from which applications will reference the library of Tcl
39# scripts (note: you can set the TK_LIBRARY environment variable at
40# run-time to override the compiled-in location):
41TK_LIBRARY =            $(prefix)/lib/tk$(VERSION)
42
43# Path name to use when installing library scripts:
44SCRIPT_INSTALL_DIR =    $(INSTALL_ROOT)$(TK_LIBRARY)
45
46# Directory in which to install the .a or .so binary for the Tk library:
47LIB_INSTALL_DIR =       $(INSTALL_ROOT)$(exec_prefix)/lib
48
49# Path to use at runtime to refer to LIB_INSTALL_DIR:
50LIB_RUNTIME_DIR =       $(exec_prefix)/lib
51
52# Directory in which to install the program wish:
53BIN_INSTALL_DIR =       $(INSTALL_ROOT)$(exec_prefix)/bin
54
55# Directory from which the program wish should be referenced by scripts:
56BIN_DIR =               $(exec_prefix)/bin
57
58# Directory in which to install the include file tk.h:
59INCLUDE_INSTALL_DIR =   $(INSTALL_ROOT)$(prefix)/include
60
61# Top-level directory for manual entries:
62MAN_INSTALL_DIR =       $(INSTALL_ROOT)$(prefix)/man
63
64# Directory in which to install manual entry for wish:
65MAN1_INSTALL_DIR =      $(MAN_INSTALL_DIR)/man1
66
67# Directory in which to install manual entries for Tk's C library
68# procedures:
69MAN3_INSTALL_DIR =      $(MAN_INSTALL_DIR)/man3
70
71# Directory in which to install manual entries for the built-in
72# Tcl commands implemented by Tk:
73MANN_INSTALL_DIR =      $(MAN_INSTALL_DIR)/mann
74
75# The directory containing the Tcl sources and headers appropriate
76# for this version of Tk ("srcdir" will be replaced or has already
77# been replaced by the configure script):
78TCL_GENERIC_DIR =       @TCL_SRC_DIR@/generic
79
80# The directory containing the Tcl library archive file appropriate
81# for this version of Tk:
82TCL_BIN_DIR =           @TCL_BIN_DIR@
83
84# Libraries built with optimization switches have this additional extension
85TK_DBGX =               @TK_DBGX@
86TCL_DBGX =              @TCL_DBGX@
87
88# warning flags
89CFLAGS_WARNING =        @CFLAGS_WARNING@
90
91# The default switches for optimization or debugging
92CFLAGS_DEBUG =          @CFLAGS_DEBUG@
93CFLAGS_OPTIMIZE =       @CFLAGS_OPTIMIZE@
94
95# To change the compiler switches, for example to change from optimization to
96# debugging symbols, change the following line:
97#CFLAGS =               $(CFLAGS_DEBUG)
98#CFLAGS =               $(CFLAGS_OPTIMIZE)
99#CFLAGS =               $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
100CFLAGS =                $(@CFLAGS_DEFAULT@)
101
102# A "-I" switch that can be used when compiling to make all of the
103# X11 include files accessible (the configure script will try to
104# set this value, and will cause it to be an empty string if the
105# include files are accessible via /usr/include).
106X11_INCLUDES =          @XINCLUDES@
107
108# Linker switch(es) to use to link with the X11 library archive (the
109# configure script will try to set this value automatically, but you
110# can override it).
111X11_LIB_SWITCHES =      @XLIBSW@
112
113# Libraries to use when linking.  This definition is determined by the
114# configure script.
115LIBS = @TCL_BUILD_LIB_SPEC@ @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc
116
117# To turn off the security checks that disallow incoming sends when
118# the X server appears to be insecure, reverse the comments on the
119# following lines:
120SECURITY_FLAGS =
121#SECURITY_FLAGS = -DTK_NO_SECURITY
122
123# To disable ANSI-C procedure prototypes reverse the comment characters
124# on the following lines:
125PROTO_FLAGS =
126#PROTO_FLAGS = -DNO_PROTOTYPE
127
128# To enable memory debugging reverse the comment characters on the following
129# lines.  Warning:  if you enable memory debugging, you must do it
130# *everywhere*, including all the code that calls Tcl, and you must use
131# ckalloc and ckfree everywhere instead of malloc and free.
132MEM_DEBUG_FLAGS =
133#MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
134
135# If your X server is X11R4 or earlier, then you may wish to reverse
136# the comment characters on the following two lines.  This will enable
137# extra code to speed up XStringToKeysym.  In X11R5 and later releases
138# XStringToKeysym is plenty fast, so you needn't define REDO_KEYSYM_LOOKUP.
139KEYSYM_FLAGS =
140#KEYSYM_FLAGS = -DREDO_KEYSYM_LOOKUP
141
142# Some versions of make, like SGI's, use the following variable to
143# determine which shell to use for executing commands:
144SHELL =         /bin/sh
145
146# Tk used to let the configure script choose which program to use
147# for installing, but there are just too many different versions of
148# "install" around;  better to use the install-sh script that comes
149# with the distribution, which is slower but guaranteed to work.
150
151INSTALL = @srcdir@/install-sh -c
152INSTALL_PROGRAM =       ${INSTALL}
153INSTALL_DATA =          ${INSTALL} -m 644
154
155
156# The symbols below provide support for dynamic loading and shared
157# libraries.  The values of the symbols are normally set by the
158# configure script.  You shouldn't normally need to modify any of
159# these definitions by hand.
160
161TK_SHLIB_CFLAGS = @TK_SHLIB_CFLAGS@
162
163TK_LIB_FILE = @TK_LIB_FILE@
164#TK_LIB_FILE = libtk.a
165
166TK_LIB_FLAG = @TK_LIB_FLAG@
167#TK_LIB_FLAG = -ltk
168
169TCL_LIB_FLAG = @TCL_LIB_FLAG@
170#TCL_LIB_FLAG = -ltcl
171
172# The symbol below provides support for dynamic loading and shared
173# libraries.  See configure.in for a description of what it means.
174# The values of the symbolis normally set by the configure script.
175
176SHLIB_LD = @SHLIB_LD@
177
178# Additional search flags needed to find the various shared libraries
179# at run-time.  The first symbol is for use when creating a binary
180# with cc, and the second is for use when running ld directly.
181TK_CC_SEARCH_FLAGS = @TK_CC_SEARCH_FLAGS@
182TK_LD_SEARCH_FLAGS = @TK_LD_SEARCH_FLAGS@
183
184#----------------------------------------------------------------
185# The information below is modified by the configure script when
186# Makefile is generated from Makefile.in.  You shouldn't normally
187# modify any of this stuff by hand.
188#----------------------------------------------------------------
189
190AC_FLAGS =              @DEFS@
191RANLIB =                @RANLIB@
192SRC_DIR =               @srcdir@/..
193TOP_DIR =               @srcdir@/..
194GENERIC_DIR =           $(TOP_DIR)/generic
195UNIX_DIR =              @srcdir@
196BMAP_DIR =              $(TOP_DIR)/bitmaps
197TOOL_DIR =              @TCL_SRC_DIR@/tools
198
199#----------------------------------------------------------------
200# The information below should be usable as is.  The configure
201# script won't modify it and you shouldn't need to modify it
202# either.
203#----------------------------------------------------------------
204
205
206CC =            @CC@
207CC_SWITCHES =   ${CFLAGS} ${CFLAGS_WARNING} ${TK_SHLIB_CFLAGS} \
208-I${UNIX_DIR} -I${GENERIC_DIR} \
209-I${BMAP_DIR} -I${TCL_GENERIC_DIR} ${X11_INCLUDES} ${AC_FLAGS} ${PROTO_FLAGS} \
210${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS}
211
212DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \
213-I${BMAP_DIR} \
214-I${TCL_GENERIC_DIR} ${X11_INCLUDES} \
215${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} \
216${KEYSYM_FLAGS}
217
218WISH_OBJS = tkAppInit.o
219
220TKTEST_OBJS = tkTestInit.o tkTest.o tkSquare.o
221
222WIDGOBJS = tkButton.o tkEntry.o tkFrame.o tkListbox.o \
223        tkMenu.o tkMenubutton.o tkMenuDraw.o tkMessage.o tkScale.o \
224        tkScrollbar.o
225
226CANVOBJS = tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvImg.o \
227        tkCanvLine.o tkCanvPoly.o tkCanvPs.o tkCanvText.o \
228        tkCanvUtil.o tkCanvWind.o tkRectOval.o tkTrig.o
229
230IMAGEOBJS = tkImage.o tkImgBmap.o tkImgGIF.o tkImgPPM.o tkImgPhoto.o
231
232TEXTOBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o \
233        tkTextMark.o tkTextTag.o tkTextWind.o
234
235UNIXOBJS = tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixCursor.o \
236        tkUnixDialog.o tkUnixDraw.o \
237        tkUnixEmbed.o tkUnixEvent.o tkUnixFocus.o tkUnixFont.o tkUnixInit.o \
238        tkUnixMenu.o tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o \
239        tkUnixSelect.o tkUnixSend.o tkUnixWm.o tkUnixXId.o
240
241LIBRARY_OBJS = $(UNIX_DIR)/lib_bgerror.o $(UNIX_DIR)/lib_dialog.o $(UNIX_DIR)/lib_msgbox.o $(UNIX_DIR)/lib_scale.o $(UNIX_DIR)/lib_tkfbox.o \
242        $(UNIX_DIR)/lib_button.o $(UNIX_DIR)/lib_entry.o $(UNIX_DIR)/lib_obsolete.o $(UNIX_DIR)/lib_scrlbar.o $(UNIX_DIR)/lib_xmfbox.o \
243        $(UNIX_DIR)/lib_clrpick.o $(UNIX_DIR)/lib_focus.o $(UNIX_DIR)/lib_optMenu.o $(UNIX_DIR)/lib_tearoff.o $(UNIX_DIR)/lib_comdlg.o \
244        $(UNIX_DIR)/lib_listbox.o $(UNIX_DIR)/lib_palette.o $(UNIX_DIR)/lib_text.o $(UNIX_DIR)/lib_console.o $(UNIX_DIR)/lib_menu.o \
245        $(UNIX_DIR)/lib_safetk.o $(UNIX_DIR)/lib_tk.o
246
247OBJS =  tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkClipboard.o tkCmds.o \
248        tkColor.o tkConfig.o tkCursor.o tkError.o tkEvent.o \
249        tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o tkGrid.o \
250        tkMain.o tkOption.o tkPack.o tkPlace.o \
251        tkSelect.o tkUtil.o tkVisual.o tkWindow.o \
252        $(UNIXOBJS) $(WIDGOBJS) $(CANVOBJS) $(IMAGEOBJS) $(TEXTOBJS) $(LIBRARY_OBJS)
253
254SRCS = \
255        $(GENERIC_DIR)/tk3d.c $(GENERIC_DIR)/tkArgv.c \
256        $(GENERIC_DIR)/tkAtom.c $(GENERIC_DIR)/tkBind.c \
257        $(GENERIC_DIR)/tkBitmap.c $(GENERIC_DIR)/tkClipboard.c \
258        $(GENERIC_DIR)/tkCmds.c $(GENERIC_DIR)/tkColor.c \
259        $(GENERIC_DIR)/tkConfig.c $(GENERIC_DIR)/tkCursor.c \
260        $(GENERIC_DIR)/tkError.c $(GENERIC_DIR)/tkEvent.c \
261        $(GENERIC_DIR)/tkFocus.c $(GENERIC_DIR)/tkFont.c \
262        $(GENERIC_DIR)/tkGet.c $(GENERIC_DIR)/tkGC.c \
263        $(GENERIC_DIR)/tkGeometry.c $(GENERIC_DIR)/tkGrab.c \
264        $(GENERIC_DIR)/tkGrid.c \
265        $(GENERIC_DIR)/tkMain.c $(GENERIC_DIR)/tkOption.c \
266        $(GENERIC_DIR)/tkPack.c $(GENERIC_DIR)/tkPlace.c \
267        $(GENERIC_DIR)/tkSelect.c $(GENERIC_DIR)/tkUtil.c \
268        $(GENERIC_DIR)/tkVisual.c $(GENERIC_DIR)/tkWindow.c \
269        $(GENERIC_DIR)/tkButton.c \
270        $(GENERIC_DIR)/tkEntry.c $(GENERIC_DIR)/tkFrame.c \
271        $(GENERIC_DIR)/tkListbox.c $(GENERIC_DIR)/tkMenu.c \
272        $(GENERIC_DIR)/tkMenubutton.c $(GENERIC_DIR)/tkMenuDraw.c \
273        $(GENERIC_DIR)/tkMessage.c \
274        $(GENERIC_DIR)/tkScale.c $(GENERIC_DIR)/tkScrollbar.c \
275        $(GENERIC_DIR)/tkCanvas.c $(GENERIC_DIR)/tkCanvArc.c \
276        $(GENERIC_DIR)/tkCanvBmap.c $(GENERIC_DIR)/tkCanvImg.c \
277        $(GENERIC_DIR)/tkCanvLine.c $(GENERIC_DIR)/tkCanvPoly.c \
278        $(GENERIC_DIR)/tkCanvPs.c $(GENERIC_DIR)/tkCanvText.c \
279        $(GENERIC_DIR)/tkCanvUtil.c \
280        $(GENERIC_DIR)/tkCanvWind.c $(GENERIC_DIR)/tkRectOval.c \
281        $(GENERIC_DIR)/tkTrig.c $(GENERIC_DIR)/tkImage.c \
282        $(GENERIC_DIR)/tkImgBmap.c $(GENERIC_DIR)/tkImgGIF.c \
283        $(GENERIC_DIR)/tkImgPPM.c \
284        $(GENERIC_DIR)/tkImgPhoto.c $(GENERIC_DIR)/tkText.c \
285        $(GENERIC_DIR)/tkTextBTree.c $(GENERIC_DIR)/tkTextDisp.c \
286        $(GENERIC_DIR)/tkTextImage.c \
287        $(GENERIC_DIR)/tkTextIndex.c $(GENERIC_DIR)/tkTextMark.c \
288        $(GENERIC_DIR)/tkTextTag.c $(GENERIC_DIR)/tkTextWind.c \
289        $(GENERIC_DIR)/tkSquare.c $(GENERIC_DIR)/tkTest.c \
290        $(UNIX_DIR)/tkAppInit.c $(UNIX_DIR)/tkUnix.c \
291        $(UNIX_DIR)/tkUnix3d.c \
292        $(UNIX_DIR)/tkUnixButton.c $(UNIX_DIR)/tkUnixColor.c \
293        $(UNIX_DIR)/tkUnixCursor.c \
294        $(UNIX_DIR)/tkUnixDialog.c $(UNIX_DIR)/tkUnixDraw.c \
295        $(UNIX_DIR)/tkUnixEmbed.c $(UNIX_DIR)/tkUnixEvent.c \
296        $(UNIX_DIR)/tkUnixFocus.c \
297        $(UNIX_DIR)/tkUnixFont.c $(UNIX_DIR)/tkUnixInit.c \
298        $(UNIX_DIR)/tkUnixMenu.c $(UNIX_DIR)/tkUnixMenubu.c \
299        $(UNIX_DIR)/tkUnixScale.c $(UNIX_DIR)/tkUnixScrlbr.c \
300        $(UNIX_DIR)/tkUnixSelect.c \
301        $(UNIX_DIR)/tkUnixSend.c $(UNIX_DIR)/tkUnixWm.c \
302        $(UNIX_DIR)/tkUnixXId.c
303
304
305HDRS = bltList.h \
306        default.h ks_names.h tkPatch.h tk.h tkButton.h tkCanvas.h tkInt.h  \
307        tkPort.h tkScrollbar.h tkText.h
308
309DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget
310
311all: ${TK_LIB_FILE} #wish
312
313# The following target is configured by autoconf to generate either
314# a shared library or non-shared library for Tk.
315${TK_LIB_FILE}: ${OBJS}
316        rm -f ${TK_LIB_FILE}
317        @MAKE_LIB@
318        $(RANLIB) ${TK_LIB_FILE}
319
320# Make target which outputs the list of the .o contained in the Tk lib
321# usefull to build a single big shared library containing Tcl/Tk and other
322# extensions.  used for the Tcl Plugin.  -- dl
323tkLibObjs:
324        @echo ${OBJS}
325# This targets actually build the objects needed for the lib in the above
326# case
327objs: ${OBJS}
328
329
330wish: $(WISH_OBJS) $(TK_LIB_FILE)
331        $(CC) @LD_FLAGS@ $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ $(LIBS) \
332                $(TK_CC_SEARCH_FLAGS) -o wish
333
334tktest: $(TKTEST_OBJS) $(TK_LIB_FILE)
335        ${CC} @LD_FLAGS@ $(TKTEST_OBJS) @TK_BUILD_LIB_SPEC@ $(LIBS) \
336                $(TK_CC_SEARCH_FLAGS) -o tktest
337
338xttest: test.o tkTest.o tkSquare.o $(TK_LIB_FILE)
339        ${CC} @LD_FLAGS@ test.o tkTest.o tkSquare.o \
340                @TK_BUILD_LIB_SPEC@ $(LIBS) \
341                @TK_LD_SEARCH_FLAGS@ -lXt -o xttest
342
343# Note, in the target below TCL_LIBRARY needs to be set or else
344# "make test" won't work in the case where the compilation directory
345# isn't the same as the source directory.
346
347test: tktest
348        LD_LIBRARY_PATH=`pwd`:${TCL_BIN_DIR}:${LD_LIBRARY_PATH}; \
349        export LD_LIBRARY_PATH; \
350        SHLIB_PATH=`pwd`:${TCL_BIN_DIR}:${SHLIB_PATH}; \
351        export SHLIB_PATH; \
352        TCL_LIBRARY=@TCL_SRC_DIR@/library; export TCL_LIBRARY; \
353        TK_LIBRARY=$(TOP_DIR)/library; export TK_LIBRARY; \
354        ( echo cd $(TOP_DIR)/tests\; source all\; exit ) \
355        | ./tktest -geometry +0+0
356
357
358# Useful target to launch a built tktest with the proper path,...
359runtest:
360        LD_LIBRARY_PATH=`pwd`:${TCL_BIN_DIR}:${LD_LIBRARY_PATH}; \
361        export LD_LIBRARY_PATH; \
362        SHLIB_PATH=`pwd`:${TCL_BIN_DIR}:${SHLIB_PATH}; \
363        export SHLIB_PATH; \
364        TCL_LIBRARY=@TCL_SRC_DIR@/library; export TCL_LIBRARY; \
365        TK_LIBRARY=$(TOP_DIR)/library; export TK_LIBRARY; \
366        ./tktest
367
368install: install-binaries install-libraries install-demos install-man
369
370# Note: before running ranlib below, must cd to target directory because
371# some ranlibs write to current directory, and this might not always be
372# possible (e.g. if installing as root).
373
374install-binaries: $(TK_LIB_FILE) wish
375        @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
376            do \
377            if [ ! -d $$i ] ; then \
378                echo "Making directory $$i"; \
379                mkdir $$i; \
380                chmod 755 $$i; \
381                else true; \
382                fi; \
383            done;
384        @echo "Installing $(TK_LIB_FILE)"
385        @$(INSTALL_DATA) $(TK_LIB_FILE) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
386        @(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TK_LIB_FILE))
387        @chmod 555 $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
388        @echo "Installing wish"
389        @$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION)
390        @echo "Installing tkConfig.sh"
391        @$(INSTALL_DATA) tkConfig.sh $(LIB_INSTALL_DIR)/tkConfig.sh
392
393install-libraries:
394        @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
395                $(SCRIPT_INSTALL_DIR) $(SCRIPT_INSTALL_DIR)/images; \
396            do \
397            if [ ! -d $$i ] ; then \
398                echo "Making directory $$i"; \
399                mkdir $$i; \
400                chmod 755 $$i; \
401                else true; \
402                fi; \
403            done;
404        @echo "Installing tk.h"
405        @$(INSTALL_DATA) $(GENERIC_DIR)/tk.h $(INCLUDE_INSTALL_DIR)/tk.h
406        for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex $(SRC_DIR)/library/prolog.ps $(UNIX_DIR)/tkAppInit.c; \
407            do \
408            echo "Installing $$i"; \
409            $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
410            done;
411        for i in $(SRC_DIR)/library/images/*; \
412            do \
413            if [ -f $$i ] ; then \
414                echo "Installing $$i"; \
415                $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/images; \
416            fi; \
417            done;
418
419install-demos:
420        @for i in $(INSTALL_ROOT)$(prefix)/lib $(SCRIPT_INSTALL_DIR) \
421                $(SCRIPT_INSTALL_DIR)/demos \
422                $(SCRIPT_INSTALL_DIR)/demos/images ; \
423            do \
424            if [ ! -d $$i ] ; then \
425                echo "Making directory $$i"; \
426                mkdir $$i; \
427                chmod 755 $$i; \
428                else true; \
429                fi; \
430            done;
431        @for i in $(SRC_DIR)/library/demos/*; \
432            do \
433            if [ -f $$i ] ; then \
434                echo "Installing $$i"; \
435                sed -e '3 s|exec wish|exec wish$(VERSION)|' \
436                        $$i > $(SCRIPT_INSTALL_DIR)/demos/`basename $$i`; \
437            fi; \
438            done;
439        @for i in $(DEMOPROGS); \
440            do \
441            chmod 755 $(SCRIPT_INSTALL_DIR)/demos/$$i; \
442            done;
443        @for i in $(SRC_DIR)/library/demos/images/*; \
444            do \
445            if [ -f $$i ] ; then \
446                echo "Installing $$i"; \
447                $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \
448                fi; \
449            done;
450
451install-man:
452        @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
453            do \
454            if [ ! -d $$i ] ; then \
455                echo "Making directory $$i"; \
456                mkdir $$i; \
457                chmod 755 $$i; \
458                else true; \
459                fi; \
460            done;
461        @cd $(SRC_DIR)/doc; for i in *.1; \
462            do \
463            echo "Installing doc/$$i"; \
464            rm -f $(MAN1_INSTALL_DIR)/$$i; \
465            sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
466                    $$i > $(MAN1_INSTALL_DIR)/$$i; \
467            chmod 444 $(MAN1_INSTALL_DIR)/$$i; \
468            done;
469        $(UNIX_DIR)/mkLinks $(MAN1_INSTALL_DIR)
470        @cd $(SRC_DIR)/doc; for i in *.3; \
471            do \
472            echo "Installing doc/$$i"; \
473            rm -f $(MAN3_INSTALL_DIR)/$$i; \
474            sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
475                    $$i > $(MAN3_INSTALL_DIR)/$$i; \
476            chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
477            done;
478        $(UNIX_DIR)/mkLinks $(MAN3_INSTALL_DIR)
479        @cd $(SRC_DIR)/doc; for i in *.n; \
480            do \
481            echo "Installing doc/$$i"; \
482            rm -f $(MANN_INSTALL_DIR)/$$i; \
483            sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
484                    $$i > $(MANN_INSTALL_DIR)/$$i; \
485            chmod 444 $(MANN_INSTALL_DIR)/$$i; \
486            done;
487        $(UNIX_DIR)/mkLinks $(MANN_INSTALL_DIR)
488
489Makefile: $(UNIX_DIR)/Makefile.in
490        $(SHELL) config.status
491
492clean:
493        rm -f *.a *.o libtk* core errs *~ \#* TAGS *.E a.out errors \
494                tktest wish config.info lib.exp tcl2c config.cache
495
496distclean: clean
497        rm -f Makefile config.status config.cache config.log tkConfig.sh \
498                $(PACKAGE).* prototype
499
500depend:
501        makedepend -- $(DEPEND_SWITCHES) -- $(SRCS)
502
503# Test binaries.  The rule for tkTestInit.o is complicated because
504# it is is compiled from tkAppInit.c.  Can't use the "-o" option
505# because this doesn't work on some strange compilers (e.g. UnixWare).
506
507tkTestInit.o: $(UNIX_DIR)/tkAppInit.c
508        @if test -f tkAppInit.o ; then \
509            rm -f tkAppInit.sav; \
510            mv tkAppInit.o tkAppInit.sav; \
511        fi;
512        $(CC) -c $(CC_SWITCHES) -DTK_TEST $(UNIX_DIR)/tkAppInit.c
513        rm -f tkTestInit.o
514        mv tkAppInit.o tkTestInit.o
515        @if test -f tkAppInit.sav ; then \
516            mv tkAppInit.sav tkAppInit.o; \
517        fi;
518
519# Libraries...
520
521$(UNIX_DIR)/tcl2c: $(GENERIC_DIR)/tcl2c.c
522        $(CC) $(GENERIC_DIR)/tcl2c.c -o $(UNIX_DIR)/tcl2c
523
524$(UNIX_DIR)/lib_bgerror.o: $(SRC_DIR)/library/bgerror.tcl $(UNIX_DIR)/tcl2c
525        $(UNIX_DIR)/tcl2c lib_bgerror < $(SRC_DIR)/library/bgerror.tcl > $(UNIX_DIR)/lib_bgerror.c
526        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_bgerror.c
527$(UNIX_DIR)/lib_dialog.o: $(SRC_DIR)/library/dialog.tcl $(UNIX_DIR)/tcl2c
528        $(UNIX_DIR)/tcl2c lib_dialog < $(SRC_DIR)/library/dialog.tcl > $(UNIX_DIR)/lib_dialog.c
529        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_dialog.c
530$(UNIX_DIR)/lib_msgbox.o: $(SRC_DIR)/library/msgbox.tcl $(UNIX_DIR)/tcl2c
531        $(UNIX_DIR)/tcl2c lib_msgbox < $(SRC_DIR)/library/msgbox.tcl > $(UNIX_DIR)/lib_msgbox.c
532        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_msgbox.c
533$(UNIX_DIR)/lib_scale.o: $(SRC_DIR)/library/scale.tcl $(UNIX_DIR)/tcl2c
534        $(UNIX_DIR)/tcl2c lib_scale < $(SRC_DIR)/library/scale.tcl > $(UNIX_DIR)/lib_scale.c
535        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_scale.c
536$(UNIX_DIR)/lib_tkfbox.o: $(SRC_DIR)/library/tkfbox.tcl $(UNIX_DIR)/tcl2c
537        $(UNIX_DIR)/tcl2c lib_tkfbox < $(SRC_DIR)/library/tkfbox.tcl > $(UNIX_DIR)/lib_tkfbox.c
538        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_tkfbox.c
539$(UNIX_DIR)/lib_button.o: $(SRC_DIR)/library/button.tcl $(UNIX_DIR)/tcl2c
540        $(UNIX_DIR)/tcl2c lib_button < $(SRC_DIR)/library/button.tcl > $(UNIX_DIR)/lib_button.c
541        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_button.c
542$(UNIX_DIR)/lib_entry.o: $(SRC_DIR)/library/entry.tcl $(UNIX_DIR)/tcl2c
543        $(UNIX_DIR)/tcl2c lib_entry < $(SRC_DIR)/library/entry.tcl > $(UNIX_DIR)/lib_entry.c
544        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_entry.c
545$(UNIX_DIR)/lib_obsolete.o: $(SRC_DIR)/library/obsolete.tcl $(UNIX_DIR)/tcl2c
546        $(UNIX_DIR)/tcl2c lib_obsolete < $(SRC_DIR)/library/obsolete.tcl > $(UNIX_DIR)/lib_obsolete.c
547        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_obsolete.c
548$(UNIX_DIR)/lib_scrlbar.o: $(SRC_DIR)/library/scrlbar.tcl $(UNIX_DIR)/tcl2c
549        $(UNIX_DIR)/tcl2c lib_scrlbar < $(SRC_DIR)/library/scrlbar.tcl > $(UNIX_DIR)/lib_scrlbar.c
550        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_scrlbar.c
551$(UNIX_DIR)/lib_xmfbox.o: $(SRC_DIR)/library/xmfbox.tcl $(UNIX_DIR)/tcl2c
552        $(UNIX_DIR)/tcl2c lib_xmfbox < $(SRC_DIR)/library/xmfbox.tcl > $(UNIX_DIR)/lib_xmfbox.c
553        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_xmfbox.c
554$(UNIX_DIR)/lib_clrpick.o: $(SRC_DIR)/library/clrpick.tcl $(UNIX_DIR)/tcl2c
555        $(UNIX_DIR)/tcl2c lib_clrpick < $(SRC_DIR)/library/clrpick.tcl > $(UNIX_DIR)/lib_clrpick.c
556        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_clrpick.c
557$(UNIX_DIR)/lib_focus.o: $(SRC_DIR)/library/focus.tcl $(UNIX_DIR)/tcl2c
558        $(UNIX_DIR)/tcl2c lib_focus < $(SRC_DIR)/library/focus.tcl > $(UNIX_DIR)/lib_focus.c
559        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_focus.c
560$(UNIX_DIR)/lib_optMenu.o: $(SRC_DIR)/library/optMenu.tcl $(UNIX_DIR)/tcl2c
561        $(UNIX_DIR)/tcl2c lib_optMenu < $(SRC_DIR)/library/optMenu.tcl > $(UNIX_DIR)/lib_optMenu.c
562        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_optMenu.c
563$(UNIX_DIR)/lib_tearoff.o: $(SRC_DIR)/library/tearoff.tcl $(UNIX_DIR)/tcl2c
564        $(UNIX_DIR)/tcl2c lib_tearoff < $(SRC_DIR)/library/tearoff.tcl > $(UNIX_DIR)/lib_tearoff.c
565        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_tearoff.c
566$(UNIX_DIR)/lib_comdlg.o: $(SRC_DIR)/library/comdlg.tcl $(UNIX_DIR)/tcl2c
567        $(UNIX_DIR)/tcl2c lib_comdlg < $(SRC_DIR)/library/comdlg.tcl > $(UNIX_DIR)/lib_comdlg.c
568        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_comdlg.c
569$(UNIX_DIR)/lib_listbox.o: $(SRC_DIR)/library/listbox.tcl $(UNIX_DIR)/tcl2c
570        $(UNIX_DIR)/tcl2c lib_listbox < $(SRC_DIR)/library/listbox.tcl > $(UNIX_DIR)/lib_listbox.c
571        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_listbox.c
572$(UNIX_DIR)/lib_palette.o: $(SRC_DIR)/library/palette.tcl $(UNIX_DIR)/tcl2c
573        $(UNIX_DIR)/tcl2c lib_palette < $(SRC_DIR)/library/palette.tcl > $(UNIX_DIR)/lib_palette.c
574        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_palette.c
575$(UNIX_DIR)/lib_text.o: $(SRC_DIR)/library/text.tcl $(UNIX_DIR)/tcl2c
576        $(UNIX_DIR)/tcl2c lib_text < $(SRC_DIR)/library/text.tcl > $(UNIX_DIR)/lib_text.c
577        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_text.c
578$(UNIX_DIR)/lib_console.o: $(SRC_DIR)/library/console.tcl $(UNIX_DIR)/tcl2c
579        $(UNIX_DIR)/tcl2c lib_console < $(SRC_DIR)/library/console.tcl > $(UNIX_DIR)/lib_console.c
580        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_console.c
581$(UNIX_DIR)/lib_menu.o: $(SRC_DIR)/library/menu.tcl $(UNIX_DIR)/tcl2c
582        $(UNIX_DIR)/tcl2c lib_menu < $(SRC_DIR)/library/menu.tcl > $(UNIX_DIR)/lib_menu.c
583        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_menu.c
584$(UNIX_DIR)/lib_safetk.o: $(SRC_DIR)/library/safetk.tcl $(UNIX_DIR)/tcl2c
585        $(UNIX_DIR)/tcl2c lib_safetk < $(SRC_DIR)/library/safetk.tcl > $(UNIX_DIR)/lib_safetk.c
586        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_safetk.c
587$(UNIX_DIR)/lib_tk.o: $(SRC_DIR)/library/tk.tcl $(UNIX_DIR)/tcl2c
588        $(UNIX_DIR)/tcl2c lib_tk < $(SRC_DIR)/library/tk.tcl > $(UNIX_DIR)/lib_tk.c
589        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/lib_tk.c
590
591#
592
593tk3d.o: $(GENERIC_DIR)/tk3d.c
594        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tk3d.c
595
596tkAppInit.o: $(UNIX_DIR)/tkAppInit.c
597        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkAppInit.c
598
599tkArgv.o: $(GENERIC_DIR)/tkArgv.c
600        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkArgv.c
601
602tkAtom.o: $(GENERIC_DIR)/tkAtom.c
603        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkAtom.c
604
605tkBind.o: $(GENERIC_DIR)/tkBind.c
606        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkBind.c
607
608tkBitmap.o: $(GENERIC_DIR)/tkBitmap.c
609        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkBitmap.c
610
611tkClipboard.o: $(GENERIC_DIR)/tkClipboard.c
612        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkClipboard.c
613
614tkCmds.o: $(GENERIC_DIR)/tkCmds.c
615        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCmds.c
616
617tkColor.o: $(GENERIC_DIR)/tkColor.c
618        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkColor.c
619
620tkConfig.o: $(GENERIC_DIR)/tkConfig.c
621        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkConfig.c
622
623tkCursor.o: $(GENERIC_DIR)/tkCursor.c
624        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCursor.c
625
626tkError.o: $(GENERIC_DIR)/tkError.c
627        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkError.c
628
629tkEvent.o: $(GENERIC_DIR)/tkEvent.c
630        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkEvent.c
631
632tkFocus.o: $(GENERIC_DIR)/tkFocus.c
633        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkFocus.c
634
635tkFont.o: $(GENERIC_DIR)/tkFont.c
636        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkFont.c
637
638tkGet.o: $(GENERIC_DIR)/tkGet.c
639        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGet.c
640
641tkGC.o: $(GENERIC_DIR)/tkGC.c
642        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGC.c
643
644tkGeometry.o: $(GENERIC_DIR)/tkGeometry.c
645        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGeometry.c
646
647tkGrab.o: $(GENERIC_DIR)/tkGrab.c
648        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGrab.c
649
650tkGrid.o: $(GENERIC_DIR)/tkGrid.c
651        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkGrid.c
652
653tkMain.o: $(GENERIC_DIR)/tkMain.c
654        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMain.c
655
656tkOption.o: $(GENERIC_DIR)/tkOption.c
657        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkOption.c
658
659tkPack.o: $(GENERIC_DIR)/tkPack.c
660        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPack.c
661
662tkPlace.o: $(GENERIC_DIR)/tkPlace.c
663        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkPlace.c
664
665tkSelect.o: $(GENERIC_DIR)/tkSelect.c
666        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkSelect.c
667
668tkUtil.o: $(GENERIC_DIR)/tkUtil.c
669        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkUtil.c
670
671tkVisual.o: $(GENERIC_DIR)/tkVisual.c
672        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkVisual.c
673
674tkWindow.o: $(GENERIC_DIR)/tkWindow.c
675        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkWindow.c
676
677tkButton.o: $(GENERIC_DIR)/tkButton.c
678        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkButton.c
679
680tkEntry.o: $(GENERIC_DIR)/tkEntry.c
681        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkEntry.c
682
683tkFrame.o: $(GENERIC_DIR)/tkFrame.c
684        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkFrame.c
685
686tkListbox.o: $(GENERIC_DIR)/tkListbox.c
687        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkListbox.c
688
689tkMenu.o: $(GENERIC_DIR)/tkMenu.c
690        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMenu.c
691
692tkMenubutton.o: $(GENERIC_DIR)/tkMenubutton.c
693        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMenubutton.c
694
695tkMenuDraw.o: $(GENERIC_DIR)/tkMenuDraw.c
696        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMenuDraw.c
697
698tkMessage.o: $(GENERIC_DIR)/tkMessage.c
699        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMessage.c
700
701tkScale.o: $(GENERIC_DIR)/tkScale.c
702        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkScale.c
703
704tkScrollbar.o: $(GENERIC_DIR)/tkScrollbar.c
705        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkScrollbar.c
706
707tkSquare.o: $(GENERIC_DIR)/tkSquare.c
708        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkSquare.c
709
710tkCanvas.o: $(GENERIC_DIR)/tkCanvas.c
711        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvas.c
712
713tkCanvArc.o: $(GENERIC_DIR)/tkCanvArc.c
714        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvArc.c
715
716tkCanvBmap.o: $(GENERIC_DIR)/tkCanvBmap.c
717        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvBmap.c
718
719tkCanvImg.o: $(GENERIC_DIR)/tkCanvImg.c
720        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvImg.c
721
722tkCanvLine.o: $(GENERIC_DIR)/tkCanvLine.c
723        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvLine.c
724
725tkCanvPoly.o: $(GENERIC_DIR)/tkCanvPoly.c
726        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvPoly.c
727
728tkCanvPs.o: $(GENERIC_DIR)/tkCanvPs.c
729        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvPs.c
730
731tkCanvText.o: $(GENERIC_DIR)/tkCanvText.c
732        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvText.c
733
734tkCanvUtil.o: $(GENERIC_DIR)/tkCanvUtil.c
735        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvUtil.c
736
737tkCanvWind.o: $(GENERIC_DIR)/tkCanvWind.c
738        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvWind.c
739
740tkRectOval.o: $(GENERIC_DIR)/tkRectOval.c
741        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkRectOval.c
742
743tkTrig.o: $(GENERIC_DIR)/tkTrig.c
744        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTrig.c
745
746tkImage.o: $(GENERIC_DIR)/tkImage.c
747        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImage.c
748
749tkImgBmap.o: $(GENERIC_DIR)/tkImgBmap.c
750        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgBmap.c
751
752tkImgGIF.o: $(GENERIC_DIR)/tkImgGIF.c
753        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgGIF.c
754
755tkImgPPM.o: $(GENERIC_DIR)/tkImgPPM.c
756        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPPM.c
757
758tkImgPhoto.o: $(GENERIC_DIR)/tkImgPhoto.c
759        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPhoto.c
760
761tkTest.o: $(GENERIC_DIR)/tkTest.c
762        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTest.c
763
764tkText.o: $(GENERIC_DIR)/tkText.c
765        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkText.c
766
767tkTextBTree.o: $(GENERIC_DIR)/tkTextBTree.c
768        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextBTree.c
769
770tkTextDisp.o: $(GENERIC_DIR)/tkTextDisp.c
771        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextDisp.c
772
773tkTextImage.o: $(GENERIC_DIR)/tkTextImage.c
774        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextImage.c
775
776tkTextIndex.o: $(GENERIC_DIR)/tkTextIndex.c
777        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextIndex.c
778
779tkTextMark.o: $(GENERIC_DIR)/tkTextMark.c
780        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextMark.c
781
782tkTextTag.o: $(GENERIC_DIR)/tkTextTag.c
783        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextTag.c
784
785tkTextWind.o: $(GENERIC_DIR)/tkTextWind.c
786        $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextWind.c
787
788tkUnix.o: $(UNIX_DIR)/tkUnix.c
789        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnix.c
790
791tkUnix3d.o: $(UNIX_DIR)/tkUnix3d.c
792        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnix3d.c
793
794tkUnixButton.o: $(UNIX_DIR)/tkUnixButton.c
795        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixButton.c
796
797tkUnixColor.o: $(UNIX_DIR)/tkUnixColor.c
798        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixColor.c
799
800tkUnixCursor.o: $(UNIX_DIR)/tkUnixCursor.c
801        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixCursor.c
802
803tkUnixDialog.o: $(UNIX_DIR)/tkUnixDialog.c
804        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixDialog.c
805
806tkUnixDraw.o: $(UNIX_DIR)/tkUnixDraw.c
807        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixDraw.c
808
809tkUnixEmbed.o: $(UNIX_DIR)/tkUnixEmbed.c
810        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixEmbed.c
811
812tkUnixEvent.o: $(UNIX_DIR)/tkUnixEvent.c
813        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixEvent.c
814
815tkUnixFocus.o: $(UNIX_DIR)/tkUnixFocus.c
816        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixFocus.c
817
818tkUnixFont.o: $(UNIX_DIR)/tkUnixFont.c
819        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixFont.c
820
821tkUnixInit.o: $(UNIX_DIR)/tkUnixInit.c $(GENERIC_DIR)/tkInitScript.h tkConfig.sh
822        $(CC) -c $(CC_SWITCHES) -DTK_LIBRARY=\"${TK_LIBRARY}\" \
823            $(UNIX_DIR)/tkUnixInit.c
824
825tkUnixMenu.o: $(UNIX_DIR)/tkUnixMenu.c
826        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixMenu.c
827
828tkUnixMenubu.o: $(UNIX_DIR)/tkUnixMenubu.c
829        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixMenubu.c
830
831tkUnixScale.o: $(UNIX_DIR)/tkUnixScale.c
832        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixScale.c
833
834tkUnixScrlbr.o: $(UNIX_DIR)/tkUnixScrlbr.c
835        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixScrlbr.c
836
837tkUnixSelect.o: $(UNIX_DIR)/tkUnixSelect.c
838        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixSelect.c
839
840tkUnixSend.o: $(UNIX_DIR)/tkUnixSend.c
841        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixSend.c
842
843tkUnixWm.o: $(UNIX_DIR)/tkUnixWm.c
844        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixWm.c
845
846tkUnixXId.o: $(UNIX_DIR)/tkUnixXId.c
847        $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixXId.c
848
849.c.o:
850        $(CC) -c $(CC_SWITCHES) $<
851
852#
853# Target to check for proper usage of UCHAR macro.
854#
855
856checkuchar:
857        -egrep isalnum\|isalpha\|iscntrl\|isdigit\|islower\|isprint\|ispunct\|isspace\|isupper\|isxdigit\|toupper\|tolower $(SRCS) | grep -v UCHAR
858
859#
860# Target to make sure that only symbols with "Tk" prefixes are
861# exported.
862#
863
864checkexports: $(TK_LIB_FILE)
865        -nm -p $(TK_LIB_FILE) | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Tt]k'
866
867#
868# Target to create a proper Tk distribution from information in the
869# master source directory.  DISTDIR must be defined to indicate where
870# to put the distribution.  DISTDIR must be an absolute path name.
871#
872
873DISTROOT = /tmp/dist
874DISTNAME =      tk@TK_VERSION@@TK_PATCH_LEVEL@
875ZIPNAME =       tk@TK_MAJOR_VERSION@@TK_MINOR_VERSION@@TK_PATCH_LEVEL@.zip
876DISTDIR =       $(DISTROOT)/$(DISTNAME)
877TCLDIR =        @TCL_SRC_DIR@
878$(UNIX_DIR)/configure: $(UNIX_DIR)/configure.in
879        autoconf $(UNIX_DIR)/configure.in > $(UNIX_DIR)/configure
880
881dist:   $(UNIX_DIR)/configure
882        rm -rf $(DISTDIR)
883        mkdir $(DISTDIR)
884        mkdir $(DISTDIR)/unix
885        cp -p $(UNIX_DIR)/*.c $(UNIX_DIR)/*.h $(DISTDIR)/unix
886        cp $(TOP_DIR)/license.terms $(UNIX_DIR)/Makefile.in $(DISTDIR)/unix
887        chmod 664 $(DISTDIR)/unix/Makefile.in
888        cp $(UNIX_DIR)/configure $(UNIX_DIR)/configure.in \
889                $(UNIX_DIR)/tkConfig.sh.in $(TCLDIR)/unix/install-sh \
890                $(UNIX_DIR)/porting.notes $(UNIX_DIR)/porting.old \
891                $(UNIX_DIR)/README $(DISTDIR)/unix
892        chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.in
893        chmod +x $(DISTDIR)/unix/install-sh
894        tclsh $(TCLDIR)/unix/mkLinks.tcl $(TOP_DIR)/doc/*.[13n] \
895                > $(DISTDIR)/unix/mkLinks
896        chmod +x $(DISTDIR)/unix/mkLinks
897        mkdir $(DISTDIR)/bitmaps
898        @(cd $(TOP_DIR); for i in bitmaps/* ; do \
899            if [ -f $$i ] ; then \
900                sed -e 's/static char/static unsigned char/' \
901                       $$i > $(DISTDIR)/$$i; \
902            fi; \
903        done;)
904        mkdir $(DISTDIR)/generic
905        cp -p $(GENERIC_DIR)/*.c $(GENERIC_DIR)/*.h $(DISTDIR)/generic
906        cp -p $(GENERIC_DIR)/README $(DISTDIR)/generic
907        cp -p $(TOP_DIR)/changes $(TOP_DIR)/README $(TOP_DIR)/license.terms \
908                $(DISTDIR)
909        rm -f $(DISTDIR)/generic/blt*.[ch]
910        mkdir $(DISTDIR)/win
911        cp -p $(TOP_DIR)/win/*.c $(TOP_DIR)/win/*.h $(DISTDIR)/win
912        cp -p $(TOP_DIR)/win/*.bat $(DISTDIR)/win
913        cp -p $(TOP_DIR)/win/makefile.* $(DISTDIR)/win
914        cp -p $(TOP_DIR)/win/README $(DISTDIR)/win
915        cp -p $(TOP_DIR)/license.terms $(DISTDIR)/win
916        mkdir $(DISTDIR)/win/rc
917        cp -p $(TOP_DIR)/win/rc/*.rc $(TOP_DIR)/win/rc/*.cur \
918                $(TOP_DIR)/win/rc/*.ico $(TOP_DIR)/win/rc/*.bmp \
919                $(DISTDIR)/win/rc
920        mkdir $(DISTDIR)/mac
921        sccs edit -s $(TOP_DIR)/mac/tkMacProjects.sea.hqx
922        cp -p tkMacProjects.sea.hqx $(DISTDIR)/mac
923        sccs unedit $(TOP_DIR)/mac/tkMacProjects.sea.hqx
924        rm -f tkMacProjects.sea.hqx
925        cp -p $(TOP_DIR)/mac/*.c $(TOP_DIR)/mac/*.h $(TOP_DIR)/mac/*.r \
926                $(DISTDIR)/mac
927        cp -p $(TOP_DIR)/mac/README $(DISTDIR)/mac
928        cp -p $(TOP_DIR)/license.terms $(DISTDIR)/mac
929        cp -p $(TOP_DIR)/mac/*.pch $(DISTDIR)/mac
930        cp -p $(TOP_DIR)/mac/*.doc $(DISTDIR)/mac
931        cp -p $(TOP_DIR)/mac/*.exp $(DISTDIR)/mac
932        cp -p $(TOP_DIR)/mac/*.tcl $(DISTDIR)/mac
933        mkdir $(DISTDIR)/compat
934        cp -p $(TOP_DIR)/license.terms $(TCLDIR)/compat/unistd.h \
935                $(TCLDIR)/compat/stdlib.h $(TCLDIR)/compat/limits.h \
936                $(DISTDIR)/compat
937        mkdir $(DISTDIR)/xlib
938        cp -p $(TOP_DIR)/xlib/*.h $(TOP_DIR)/xlib/*.c $(DISTDIR)/xlib
939        cp -p $(TOP_DIR)/license.terms $(DISTDIR)/xlib
940        mkdir $(DISTDIR)/xlib/X11
941        cp -p $(TOP_DIR)/xlib/X11/*.h $(DISTDIR)/xlib/X11
942        cp -p $(TOP_DIR)/license.terms $(DISTDIR)/xlib/X11
943        mkdir $(DISTDIR)/library
944        cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/library/*.tcl \
945                $(TOP_DIR)/library/tclIndex $(TOP_DIR)/library/prolog.ps \
946                $(DISTDIR)/library
947        mkdir $(DISTDIR)/library/images
948        @(cd $(TOP_DIR); for i in library/images/* ; do \
949            if [ -f $$i ] ; then \
950                cp $$i $(DISTDIR)/$$i; \
951            fi; \
952        done;)
953        mkdir $(DISTDIR)/library/demos
954        cp -pr $(TOP_DIR)/library/demos/*.tcl \
955                $(TOP_DIR)/library/demos/tclIndex \
956                $(TOP_DIR)/library/demos/browse \
957                $(TOP_DIR)/library/demos/hello $(TOP_DIR)/library/demos/ixset \
958                $(TOP_DIR)/library/demos/rmt $(TOP_DIR)/library/demos/rolodex \
959                $(TOP_DIR)/library/demos/square \
960                $(TOP_DIR)/library/demos/tcolor \
961                $(TOP_DIR)/library/demos/timer \
962                $(TOP_DIR)/library/demos/widget \
963                $(TOP_DIR)/library/demos/README \
964                $(TOP_DIR)/license.terms $(DISTDIR)/library/demos
965        mkdir $(DISTDIR)/library/demos/images
966        @(cd $(TOP_DIR); for i in library/demos/images/* ; do \
967            if [ -f $$i ] ; then \
968                cp $$i $(DISTDIR)/$$i; \
969            fi; \
970        done;)
971        mkdir $(DISTDIR)/doc
972        cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/doc/*.[13n] \
973                $(TCLDIR)/doc/man.macros $(DISTDIR)/doc
974        mkdir $(DISTDIR)/tests
975        cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/tests/*.test \
976                $(TOP_DIR)/tests/visual $(TOP_DIR)/tests/*.tcl \
977                $(TOP_DIR)/tests/README $(TOP_DIR)/tests/all \
978                $(TOP_DIR)/tests/defs $(TOP_DIR)/tests/option.file* \
979                $(DISTDIR)/tests
980
981#
982# The following target can only be used for non-patch releases.  Use
983# the "allpatch" target below for patch releases.
984#
985
986alldist: dist
987        rm -f $(DISTROOT)/$(DISTNAME).tar.Z \
988                $(DISTROOT)/$(DISTNAME).tar.gz \
989                $(DISTROOT)/$(ZIPNAME)
990        cd $(DISTROOT); tar cf $(DISTNAME).tar $(DISTNAME); \
991                gzip -9 -c $(DISTNAME).tar > $(DISTNAME).tar.gz; \
992                compress $(DISTNAME).tar; zip -r8 $(ZIPNAME) $(DISTNAME)
993
994#
995# The target below is similar to "alldist" except it works for patch
996# releases.  It is needed because patch releases are peculiar: the
997# patch designation appears in the name of the compressed file
998# (e.g. tcl8.0p1.tar.gz) but the extracted source directory doesn't
999# include the patch designation (e.g. tcl8.0).
1000#
1001
1002allpatch: dist
1003        rm -f $(DISTROOT)/$(DISTNAME).tar.Z \
1004                $(DISTROOT)/$(DISTNAME).tar.gz \
1005                $(DISTROOT)/$(ZIPNAME)
1006        mv $(DISTROOT)/tk${VERSION} $(DISTROOT)/old
1007        mv $(DISTROOT)/$(DISTNAME) $(DISTROOT)/tk${VERSION}
1008        cd $(DISTROOT); tar cf $(DISTNAME).tar tk${VERSION}; \
1009                gzip -9 -c $(DISTNAME).tar > $(DISTNAME).tar.gz; \
1010                compress $(DISTNAME).tar; zip -r8 $(ZIPNAME) tk${VERSION}
1011        mv $(DISTROOT)/tk${VERSION} $(DISTROOT)/$(DISTNAME)
1012        mv $(DISTROOT)/old $(DISTROOT)/tk${VERSION}
1013
1014#
1015# Target to create a Macintosh version of the distribution.  This will
1016# do a normal distribution and then massage the output to prepare it
1017# for moving to the Mac platform.  This requires a few scripts and
1018# programs found only in the Tcl greoup's tool workspace.
1019#
1020
1021macdist: dist
1022        rm -f $(DISTDIR)/mac/tkMacProjects.sea.hqx
1023        tclsh $(TOOL_DIR)/man2html.tcl $(DISTDIR)/tmp ../.. tk$(VERSION)
1024        mv $(DISTDIR)/tmp/tk$(VERSION) $(DISTDIR)/html
1025        rm -rf $(DISTDIR)/doc
1026        rm -rf $(DISTDIR)/tmp
1027        tclsh $(TOOL_DIR)/cvtEOL.tcl $(DISTDIR)
1028
1029#
1030# Targets to build Solaris package of the distribution for the current
1031# architecture.  To build stream packages for both sun4 and i86pc
1032# architectures:
1033#
1034#   On the sun4 machine, execute the following:
1035#     make distclean; ./configure
1036#     make DISTDIR=<distdir> package
1037#
1038#   Once the build is complete, execute the following on the i86pc
1039#   machine:
1040#     make DISTDIR=<distdir> package-quick
1041#
1042# <distdir> is the absolute path to a directory where the build should
1043# take place.  These steps will generate the $(PACKAGE).sun4 and
1044# $(PACKAGE).i86pc stream packages.  It is important that the packages be
1045# built in this fashion in order to ensure that the architecture
1046# independent files are exactly the same, including timestamps, in
1047# both packages.
1048#
1049
1050PACKAGE=SCRPtk
1051
1052package: dist package-config package-common package-binaries package-generate
1053package-quick: package-config package-binaries package-generate
1054
1055#
1056# Configure for the current architecture in the dist directory.
1057#
1058package-config:
1059        mkdir -p $(DISTDIR)/unix/`arch`
1060        cd $(DISTDIR)/unix/`arch`; \
1061        ../configure --prefix=/opt/SUNWtcl/$(TCLVERSION) \
1062                --exec_prefix=/opt/SUNWtcl/$(TCLVERSION)/`arch` \
1063                --with-tcl=$(DISTDIR)/../tcl$(TCLVERSION)/unix/`arch` \
1064                --enable-shared
1065        mkdir -p $(DISTDIR)/SUNWtcl/$(TCLVERSION)
1066        mkdir -p $(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch`
1067
1068#
1069# Build and install the architecture independent files in the dist directory.
1070#
1071
1072package-common:
1073        cd $(DISTDIR)/unix/`arch`;\
1074        $(MAKE); \
1075        $(MAKE) install-libraries install-man \
1076                prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION) \
1077                exec_prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch`
1078        mkdir -p $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin
1079        sed -e "s/TCLVERSION/$(TCLVERSION)/g" \
1080                -e "s/TKVERSION/$(VERSION)/g" < $(UNIX_DIR)/wish.sh \
1081                > $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin/wish$(VERSION)
1082        chmod 755 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin/wish$(VERSION)
1083
1084#
1085# Build and install the architecture specific files in the dist directory.
1086#
1087
1088package-binaries:
1089        cd $(DISTDIR)/unix/`arch`; \
1090        $(MAKE); \
1091        $(MAKE) install-binaries prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION) \
1092                exec_prefix=$(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch`
1093
1094#
1095# Generate a package from the installed files in the dist directory for the
1096# current architecture.
1097#
1098
1099package-generate:
1100        pkgproto $(DISTDIR)/SUNWtcl/$(TCLVERSION)/bin=bin \
1101                 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/include=include \
1102                 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/lib=lib \
1103                 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/man=man \
1104                 $(DISTDIR)/SUNWtcl/$(TCLVERSION)/`arch`=`arch` \
1105        | tclsh $(TCLDIR)/unix/mkProto.tcl $(TCLVERSION) \
1106                $(UNIX_DIR) > prototype
1107        pkgmk -o -d . -f prototype -a `arch`
1108        pkgtrans -s . $(PACKAGE).`arch` $(PACKAGE)
1109        rm -rf $(PACKAGE)
1110
1111# DO NOT DELETE THIS LINE -- make depend depends on it.
Note: See TracBrowser for help on using the browser.