1# This file is a Makefile for Tk. If it has the name "Makefile.in" 2# then it is a template for a Makefile; to generate the actual Makefile, 3# run "./configure", which is a configuration script generated by the 4# "autoconf" program (constructs like "@foo@" will get replaced in the 5# actual Makefile. 6# 7# RCS: @(#) $Id: Makefile.in,v 1.59 2003/01/13 07:30:58 mdejong Exp $ 8 9TCLVERSION = @TCL_VERSION@ 10VERSION = @TK_VERSION@ 11 12#---------------------------------------------------------------- 13# Things you can change to personalize the Makefile for your own 14# site (you can make these changes in either Makefile.in or 15# Makefile, but changes to Makefile will get lost if you re-run 16# the configuration script). 17#---------------------------------------------------------------- 18 19# Default top-level directories in which to install architecture- 20# specific files (exec_prefix) and machine-independent files such 21# as scripts (prefix). The values specified here may be overridden 22# at configure-time with the --exec-prefix and --prefix options 23# to the "configure" script. 24 25prefix = @prefix@ 26exec_prefix = @exec_prefix@ 27bindir = @bindir@ 28libdir = @libdir@ 29includedir = @includedir@ 30mandir = @mandir@ 31 32# The following definition can be set to non-null for special systems 33# like AFS with replication. It allows the pathnames used for installation 34# to be different than those used for actually reference files at 35# run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix 36# when installing files. 37INSTALL_ROOT = 38 39# Directory from which applications will reference the library of Tk 40# scripts (note: you can set the TK_LIBRARY environment variable at 41# run-time to override this value): 42TK_LIBRARY = $(prefix)/lib/tk$(VERSION) 43 44# Path to use at runtime to refer to LIB_INSTALL_DIR: 45LIB_RUNTIME_DIR = $(libdir) 46 47# Directory in which to install the program wish: 48BIN_INSTALL_DIR = $(INSTALL_ROOT)$(bindir) 49 50# Directory in which to install the .a or .so binary for the Tk library: 51LIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir) 52 53# Path name to use when installing library scripts: 54SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TK_LIBRARY) 55 56# Directory in which to install the include file tk.h: 57INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir) 58 59# Top-level directory for manual entries: 60MAN_INSTALL_DIR = $(INSTALL_ROOT)$(mandir) 61 62# Directory in which to install manual entry for wish: 63MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1 64 65# Directory in which to install manual entries for Tk's C library 66# procedures: 67MAN3_INSTALL_DIR = $(MAN_INSTALL_DIR)/man3 68 69# Directory in which to install manual entries for the built-in 70# Tk commands: 71MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann 72 73# Libraries built with optimization switches have this additional extension 74TK_DBGX = @TK_DBGX@ 75 76# Directory in which to install the pkgIndex.tcl file for loadable Tk 77PKG_INSTALL_DIR = $(LIB_INSTALL_DIR)/tk$(VERSION)$(TK_DBGX) 78 79# Package index file for loadable Tk 80PKG_INDEX = $(PKG_INSTALL_DIR)/pkgIndex.tcl 81 82# The directory containing the Tcl source and header files. 83TCL_SRC_DIR = @TCL_SRC_DIR@ 84 85# The directory containing the Tcl library archive file appropriate 86# for this version of Tk: 87TCL_BIN_DIR = @TCL_BIN_DIR@ 88 89# The directory containing the Tcl sources and headers appropriate 90# for this version of Tk ("srcdir" will be replaced or has already 91# been replaced by the configure script): 92TCL_GENERIC_DIR = @TCL_SRC_DIR@/generic 93TCL_TOOL_DIR = @TCL_SRC_DIR@/tools 94 95# Converts a POSIX path to a Windows native path. 96CYGPATH = @CYGPATH@ 97 98# The name of the Tcl library. 99TCL_LIB_FILE = "$(shell $(CYGPATH) '@TCL_BIN_DIR@/@TCL_LIB_FILE@')" 100TCL_STUB_LIB_FILE = "$(shell $(CYGPATH) '@TCL_BIN_DIR@/@TCL_STUB_LIB_FILE@')" 101 102SRC_DIR = @srcdir@ 103ROOT_DIR = $(SRC_DIR)/.. 104WIN_DIR = $(SRC_DIR) 105UNIX_DIR = $(SRC_DIR)/../unix 106GENERIC_DIR = $(SRC_DIR)/../generic 107BITMAP_DIR = $(ROOT_DIR)/bitmaps 108XLIB_DIR = $(ROOT_DIR)/xlib 109RC_DIR = $(WIN_DIR)/rc 110 111ROOT_DIR_NATIVE = $(shell $(CYGPATH) '$(ROOT_DIR)') 112WIN_DIR_NATIVE = $(shell $(CYGPATH) '$(WIN_DIR)') 113GENERIC_DIR_NATIVE = $(shell $(CYGPATH) '$(GENERIC_DIR)') 114BITMAP_DIR_NATIVE = $(shell $(CYGPATH) '$(ROOT_DIR)/bitmaps') 115XLIB_DIR_NATIVE = $(shell $(CYGPATH) '$(ROOT_DIR)/xlib') 116TCL_GENERIC_NATIVE = $(shell $(CYGPATH) '$(TCL_GENERIC_DIR)') 117TCL_SRC_DIR_NATIVE = $(shell $(CYGPATH) '$(TCL_SRC_DIR)') 118RC_DIR_NATIVE = $(shell $(CYGPATH) '$(RC_DIR)') 119 120DLLSUFFIX = @DLLSUFFIX@ 121LIBSUFFIX = @LIBSUFFIX@ 122EXESUFFIX = @EXESUFFIX@ 123 124TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@ 125TK_LIB_FILE = @TK_LIB_FILE@ 126TK_DLL_FILE = @TK_DLL_FILE@ 127 128SHARED_LIBRARIES = $(TK_DLL_FILE) $(TK_STUB_LIB_FILE) 129STATIC_LIBRARIES = $(TK_LIB_FILE) 130 131WISH = wish$(VER)${EXESUFFIX} 132TKTEST = tktest${EXEEXT} 133CAT32 = cat32$(EXEEXT) 134MAN2TCL = man2tcl$(EXEEXT) 135 136@SET_MAKE@ 137 138# Setting the VPATH variable to a list of paths will cause the 139# makefile to look into these paths when resolving .c to .obj 140# dependencies. 141 142VPATH = $(GENERIC_DIR):$(WIN_DIR):$(UNIX_DIR):$(XLIB_DIR):$(RC_DIR) 143 144# warning flags 145CFLAGS_WARNING = @CFLAGS_WARNING@ 146 147# The default switches for optimization or debugging 148CFLAGS_DEBUG = @CFLAGS_DEBUG@ 149CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ 150 151# The default switches for optimization or debugging 152LDFLAGS_DEBUG = @LDFLAGS_DEBUG@ 153LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ 154 155# To change the compiler switches, for example to change from optimization to 156# debugging symbols, change the following line: 157#CFLAGS = $(CFLAGS_DEBUG) 158#CFLAGS = $(CFLAGS_OPTIMIZE) 159#CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) 160CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ 161 162# Special compiler flags to use when building man2tcl on Windows. 163MAN2TCLFLAGS = @MAN2TCLFLAGS@ 164 165AR = @AR@ 166RANLIB = @RANLIB@ 167CC = @CC@ 168RC = @RC@ 169RES = @RES@ 170TK_RES = @TK_RES@ 171AC_FLAGS = @EXTRA_CFLAGS@ @DEFS@ @TCL_DEFS@ 172CPPFLAGS = @CPPFLAGS@ 173LDFLAGS = @LDFLAGS@ @LDFLAGS_DEFAULT@ 174LDFLAGS_CONSOLE = @LDFLAGS_CONSOLE@ 175LDFLAGS_WINDOW = @LDFLAGS_WINDOW@ 176EXEEXT = @EXEEXT@ 177OBJEXT = @OBJEXT@ 178STLIB_LD = @STLIB_LD@ 179SHLIB_LD = @SHLIB_LD@ 180SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ $(TCL_STUB_LIB_FILE) $(LIBS) 181SHLIB_CFLAGS = @SHLIB_CFLAGS@ 182SHLIB_SUFFIX = @SHLIB_SUFFIX@ 183VER = @TK_MAJOR_VERSION@@TK_MINOR_VERSION@ 184DOTVER = @TK_MAJOR_VERSION@.@TK_MINOR_VERSION@ 185LIBS = @LIBS@ @LIBS_GUI@ 186RMDIR = rm -rf 187MKDIR = mkdir -p 188SHELL = @SHELL@ 189RM = rm -f 190COPY = cp 191 192TCLSH_PROG = @TCLSH_PROG@ 193 194# TCL_EXE is the name of a tclsh executable that is available *BEFORE* 195# running make for the first time. Certain build targets (make genstubs) 196# need it to be available on the PATH. This executable should *NOT* be 197# required just to do a normal build although it can be required to run 198# make dist. 199TCL_EXE = tclsh 200 201CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ 202-I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \ 203-I"${XLIB_DIR_NATIVE}" -I"${BITMAP_DIR_NATIVE}" \ 204 -I"${TCL_GENERIC_NATIVE}" ${AC_FLAGS} 205 206CC_OBJNAME = @CC_OBJNAME@ 207CC_EXENAME = @CC_EXENAME@ 208 209STUB_CC_SWITCHES = ${CC_SWITCHES} -DUSE_TCL_STUBS 210CON_CC_SWITCHES = ${CC_SWITCHES} -DCONSOLE 211 212# Tk used to let the configure script choose which program to use 213# for installing, but there are just too many different versions of 214# "install" around; better to use the install-sh script that comes 215# with the distribution, which is slower but guaranteed to work. 216 217INSTALL = cp 218INSTALL_PROGRAM = ${INSTALL} 219INSTALL_DATA = ${INSTALL} 220 221WISH_OBJS = \ 222 winMain.$(OBJEXT) 223 224TKTEST_OBJS = \ 225 testMain.$(OBJEXT) \ 226 tkSquare.$(OBJEXT) \ 227 tkTest.$(OBJEXT) \ 228 tkWinTest.$(OBJEXT) 229 230XLIB_OBJS = \ 231 xcolors.$(OBJEXT) \ 232 xdraw.$(OBJEXT) \ 233 xgc.$(OBJEXT) \ 234 ximage.$(OBJEXT) \ 235 xutil.$(OBJEXT) 236 237TK_OBJS = \ 238 tkConsole.$(OBJEXT) \ 239 tkUnixMenubu.$(OBJEXT) \ 240 tkUnixScale.$(OBJEXT) \ 241 $(XLIB_OBJS) \ 242 tkWin3d.$(OBJEXT) \ 243 tkWin32Dll.$(OBJEXT) \ 244 tkWinButton.$(OBJEXT) \ 245 tkWinClipboard.$(OBJEXT) \ 246 tkWinColor.$(OBJEXT) \ 247 tkWinConfig.$(OBJEXT) \ 248 tkWinCursor.$(OBJEXT) \ 249 tkWinDialog.$(OBJEXT) \ 250 tkWinDraw.$(OBJEXT) \ 251 tkWinEmbed.$(OBJEXT) \ 252 tkWinFont.$(OBJEXT) \ 253 tkWinImage.$(OBJEXT) \ 254 tkWinInit.$(OBJEXT) \ 255 tkWinKey.$(OBJEXT) \ 256 tkWinMenu.$(OBJEXT) \ 257 tkWinPixmap.$(OBJEXT) \ 258 tkWinPointer.$(OBJEXT) \ 259 tkWinRegion.$(OBJEXT) \ 260 tkWinScrlbr.$(OBJEXT) \ 261 tkWinSend.$(OBJEXT) \ 262 tkWinWindow.$(OBJEXT) \ 263 tkWinWm.$(OBJEXT) \ 264 tkWinX.$(OBJEXT) \ 265 stubs.$(OBJEXT) \ 266 tk3d.$(OBJEXT) \ 267 tkArgv.$(OBJEXT) \ 268 tkAtom.$(OBJEXT) \ 269 tkBind.$(OBJEXT) \ 270 tkBitmap.$(OBJEXT) \ 271 tkButton.$(OBJEXT) \ 272 tkCanvArc.$(OBJEXT) \ 273 tkCanvBmap.$(OBJEXT) \ 274 tkCanvImg.$(OBJEXT) \ 275 tkCanvLine.$(OBJEXT) \ 276 tkCanvPoly.$(OBJEXT) \ 277 tkCanvPs.$(OBJEXT) \ 278 tkCanvText.$(OBJEXT) \ 279 tkCanvUtil.$(OBJEXT) \ 280 tkCanvWind.$(OBJEXT) \ 281 tkCanvas.$(OBJEXT) \ 282 tkClipboard.$(OBJEXT) \ 283 tkCmds.$(OBJEXT) \ 284 tkColor.$(OBJEXT) \ 285 tkConfig.$(OBJEXT) \ 286 tkCursor.$(OBJEXT) \ 287 tkEntry.$(OBJEXT) \ 288 tkError.$(OBJEXT) \ 289 tkEvent.$(OBJEXT) \ 290 tkFileFilter.$(OBJEXT) \ 291 tkFocus.$(OBJEXT) \ 292 tkFont.$(OBJEXT) \ 293 tkFrame.$(OBJEXT) \ 294 tkGC.$(OBJEXT) \ 295 tkGeometry.$(OBJEXT) \ 296 tkGet.$(OBJEXT) \ 297 tkGrab.$(OBJEXT) \ 298 tkGrid.$(OBJEXT) \ 299 tkImage.$(OBJEXT) \ 300 tkImgBmap.$(OBJEXT) \ 301 tkImgGIF.$(OBJEXT) \ 302 tkImgPPM.$(OBJEXT) \ 303 tkImgPhoto.$(OBJEXT) \ 304 tkImgUtil.$(OBJEXT) \ 305 tkListbox.$(OBJEXT) \ 306 tkMacWinMenu.$(OBJEXT) \ 307 tkMain.$(OBJEXT) \ 308 tkMenu.$(OBJEXT) \ 309 tkMenubutton.$(OBJEXT) \ 310 tkMenuDraw.$(OBJEXT) \ 311 tkMessage.$(OBJEXT) \ 312 tkPanedWindow.$(OBJEXT) \ 313 tkObj.$(OBJEXT) \ 314 tkOldConfig.$(OBJEXT) \ 315 tkOption.$(OBJEXT) \ 316 tkPack.$(OBJEXT) \ 317 tkPlace.$(OBJEXT) \ 318 tkPointer.$(OBJEXT) \ 319 tkRectOval.$(OBJEXT) \ 320 tkScale.$(OBJEXT) \ 321 tkScrollbar.$(OBJEXT) \ 322 tkSelect.$(OBJEXT) \ 323 tkStyle.$(OBJEXT) \ 324 tkText.$(OBJEXT) \ 325 tkTextBTree.$(OBJEXT) \ 326 tkTextDisp.$(OBJEXT) \ 327 tkTextImage.$(OBJEXT) \ 328 tkTextIndex.$(OBJEXT) \ 329 tkTextMark.$(OBJEXT) \ 330 tkTextTag.$(OBJEXT) \ 331 tkTextWind.$(OBJEXT) \ 332 tkTrig.$(OBJEXT) \ 333 tkUndo.$(OBJEXT) \ 334 tkUtil.$(OBJEXT) \ 335 tkVisual.$(OBJEXT) \ 336 tkStubInit.$(OBJEXT) \ 337 tkStubLib.$(OBJEXT) \ 338 tkWindow.$(OBJEXT) 339 340STUB_OBJS = \ 341 tkStubLib.$(OBJEXT) \ 342 tkStubImg.$(OBJEXT) 343 344TCL_DOCS = "$(TCL_SRC_DIR_NATIVE)"/doc/*.[13n] 345TK_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n] 346CORE_DOCS = $(TCL_DOCS) $(TK_DOCS) 347 348DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget 349 350# Main targets. The default target -- all -- builds the binaries, 351# performs any post processing on libraries or documents. 352 353all: binaries libraries doc 354 355binaries: @LIBRARIES@ $(WISH) 356 357libraries: 358 359$(ROOT_DIR)/doc/man.macros: 360 $(INSTALL_DATA) "$(TCL_SRC_DIR)/doc/man.macros" "$(ROOT_DIR)/doc/man.macros" 361 362doc: $(ROOT_DIR)/doc/man.macros 363 364winhelp: $(TCL_SRC_DIR_NATIVE)/tools/man2help.tcl $(MAN2TCL) 365 TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/library"; export TCL_LIBRARY; \ 366 TK_LIBRARY="$(ROOT_DIR_NATIVE)/library"; export TK_LIBRARY; \ 367 PATH="$(PATH):$(TCL_BIN_DIR)"; export PATH; \ 368 $(TCLSH_PROG) "$(TCL_SRC_DIR_NATIVE)/tools/man2help.tcl" tcl "$(VER)" $(CORE_DOCS) 369 $(COPY) "$(TCL_BIN_DIR)"/tcl.hpj ./ 370 hcw /c /e tcl.hpj 371 $(COPY) ./tcl$(VER).cnt ./TCL$(VER).HLP "$(TCL_SRC_DIR_NATIVE)"/tools/ 372 373$(MAN2TCL): $(TCL_SRC_DIR_NATIVE)/tools/man2tcl.c 374 $(CC) $(CFLAGS_OPTIMIZE) $(MAN2TCLFLAGS) -o $(MAN2TCL) "$(TCL_SRC_DIR_NATIVE)"/tools/man2tcl.c 375 376# Specifying TESTFLAGS on the command line is the standard way to pass 377# args to tcltest, ie: 378# % make test TESTFLAGS="-verbose bps -file fileName.test" 379 380test: binaries $(TKTEST) 381 @TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/library"; export TCL_LIBRARY; \ 382 TK_LIBRARY="$(ROOT_DIR_NATIVE)/library"; export TK_LIBRARY; \ 383 PATH="$(PATH):$(TCL_BIN_DIR)"; export PATH; \ 384 ./$(TKTEST) "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS) \ 385 | ./$(CAT32) 386 387runtest: binaries $(TKTEST) 388 @TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/library"; export TCL_LIBRARY; \ 389 TK_LIBRARY="$(ROOT_DIR_NATIVE)/library"; export TK_LIBRARY; \ 390 PATH="$(PATH):$(TCL_BIN_DIR)"; export PATH; \ 391 ./$(TKTEST) $(TESTFLAGS) $(SCRIPT) 392 393# This target can be used to run wish from the build directory 394# via `make shell` or `make shell SCRIPT=foo.tcl` 395shell: binaries 396 @TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/library"; export TCL_LIBRARY; \ 397 TK_LIBRARY="$(ROOT_DIR_NATIVE)/library"; export TK_LIBRARY; \ 398 PATH="$(PATH):$(TCL_BIN_DIR)"; export PATH; \ 399 ./$(WISH) $(SCRIPT) 400 401# This target can be used to run wish inside either gdb or insight 402gdb: binaries 403 @echo "set env TCL_LIBRARY=$(TCL_SRC_DIR_NATIVE)/library" > gdb.run 404 @echo "set env TK_LIBRARY=$(ROOT_DIR_NATIVE)/library" >> gdb.run 405 PATH="$(PATH):$(TCL_BIN_DIR)"; export PATH; \ 406 gdb ./$(WISH) --command=gdb.run 407 @$(RM) gdb.run 408 409install: all install-binaries install-libraries install-doc install-demos 410 411install-binaries: binaries 412 @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) $(PKG_INSTALL_DIR); \ 413 do \ 414 if [ ! -d $$i ] ; then \ 415 echo "Making directory $$i"; \ 416 $(MKDIR) $$i; \ 417 chmod 755 $$i; \ 418 else true; \ 419 fi; \ 420 done; 421 @for i in $(TK_DLL_FILE) $(WISH); \ 422 do \ 423 if [ -f $$i ]; then \ 424 echo "Installing $$i to $(BIN_INSTALL_DIR)/"; \ 425 $(COPY) $$i "$(BIN_INSTALL_DIR)"; \ 426 fi; \ 427 done 428 @echo "Creating package index $(PKG_INDEX)"; 429 @$(RM) $(PKG_INDEX); 430 @(\ 431 echo "if {[package vcompare [package provide Tcl]\ 432 $(TCLVERSION)] != 0} { return }";\ 433 echo "package ifneeded Tk $(VERSION)\ 434 [list load [file join \$$dir .. .. bin $(TK_DLL_FILE)] Tk]";\ 435 ) > $(PKG_INDEX); 436 @for i in tkConfig.sh $(TK_LIB_FILE) $(TK_STUB_LIB_FILE); \ 437 do \ 438 if [ -f $$i ]; then \ 439 echo "Installing $$i to $(LIB_INSTALL_DIR)/"; \ 440 $(COPY) $$i "$(LIB_INSTALL_DIR)"; \ 441 fi; \ 442 done 443 444install-libraries: libraries 445 @for i in $(INSTALL_ROOT)$(prefix)/lib \ 446 $(INCLUDE_INSTALL_DIR) $(INCLUDE_INSTALL_DIR)/X11 \ 447 $(SCRIPT_INSTALL_DIR) $(SCRIPT_INSTALL_DIR)/images \ 448 $(SCRIPT_INSTALL_DIR)/msgs; \ 449 do \ 450 if [ ! -d $$i ] ; then \ 451 echo "Making directory $$i"; \ 452 $(MKDIR) $$i; \ 453 chmod 755 $$i; \ 454 else true; \ 455 fi; \ 456 done; 457 @echo "Installing header files to $(INCLUDE_INSTALL_DIR)/"; 458 @for i in $(GENERIC_DIR)/tk.h $(GENERIC_DIR)/tkPlatDecls.h \ 459 $(GENERIC_DIR)/tkIntXlibDecls.h $(GENERIC_DIR)/tkDecls.h ; \ 460 do \ 461 $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR); \ 462 done; 463 @for i in $(XLIB_DIR)/X11/*.h; \ 464 do \ 465 $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR)/X11; \ 466 done; 467 @echo "Installing library files to $(SCRIPT_INSTALL_DIR)"; 468 @for i in $(ROOT_DIR)/library/*.tcl $(GENERIC_DIR)/prolog.ps \ 469 $(ROOT_DIR)/library/tclIndex $(UNIX_DIR)/tkAppInit.c; \ 470 do \ 471 $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \ 472 done; 473 @echo "Installing library images directory"; 474 @for i in $(ROOT_DIR)/library/images/*; \ 475 do \ 476 if [ -f $$i ] ; then \ 477 $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/images; \ 478 fi; \ 479 done; 480 @echo "Installing translation directory"; 481 @for i in $(ROOT_DIR)/library/msgs/*.msg; \ 482 do \ 483 if [ -f $$i ] ; then \ 484 $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/msgs; \ 485 fi; \ 486 done; 487 488install-demos: 489 @for i in $(INSTALL_ROOT)$(prefix)/lib $(SCRIPT_INSTALL_DIR) \ 490 $(SCRIPT_INSTALL_DIR)/demos \ 491 $(SCRIPT_INSTALL_DIR)/demos/images ; \ 492 do \ 493 if [ ! -d $$i ] ; then \ 494 echo "Making directory $$i"; \ 495 $(MKDIR) $$i; \ 496 chmod 755 $$i; \ 497 else true; \ 498 fi; \ 499 done; 500 @echo "Installing demos to $(SCRIPT_INSTALL_DIR)/demos/"; 501 @for i in $(ROOT_DIR)/library/demos/*; \ 502 do \ 503 if [ -f $$i ] ; then \ 504 sed -e '3 s|exec $(WISH)|exec $(WISH)|' \ 505 $$i > $(SCRIPT_INSTALL_DIR)/demos/`basename $$i`; \ 506 fi; \ 507 done; 508 @for i in $(DEMOPROGS); \ 509 do \ 510 chmod 755 $(SCRIPT_INSTALL_DIR)/demos/$$i; \ 511 done; 512 @echo "Installing demo images"; 513 @for i in $(ROOT_DIR)/library/demos/images/*; \ 514 do \ 515 if [ -f $$i ] ; then \ 516 $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \ 517 fi; \ 518 done; 519 520install-doc: doc 521 522 523$(WISH): $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(WISH_OBJS) wish.$(RES) 524 $(CC) $(CFLAGS) $(WISH_OBJS) $(TCL_LIB_FILE) $(TK_LIB_FILE) $(LIBS) \ 525 wish.$(RES) $(CC_EXENAME) $(LDFLAGS_WINDOW) 526 527tktest : $(TKTEST) 528 529$(TKTEST): $(TK_LIB_FILE) $(TKTEST_OBJS) wish.$(RES) $(CAT32) 530 $(CC) $(CFLAGS) $(TKTEST_OBJS) $(TCL_LIB_FILE) \ 531 $(TK_LIB_FILE) $(LIBS) \ 532 wish.$(RES) $(CC_EXENAME) $(LDFLAGS_WINDOW) 533 534# Msys make requires this next rule for some reason. 535$(TCL_SRC_DIR)/win/cat.c: 536 537cat32.${OBJEXT}: $(TCL_SRC_DIR)/win/cat.c 538 $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) 539 540$(CAT32): cat32.${OBJEXT} 541 $(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LDFLAGS_CONSOLE) 542 543# The following targets are configured by autoconf to generate either 544# a shared library or static library 545 546${TK_STUB_LIB_FILE}: ${STUB_OBJS} 547 @$(RM) ${TK_STUB_LIB_FILE} 548 @MAKE_LIB@ ${STUB_OBJS} 549 @POST_MAKE_LIB@ 550 551${TK_DLL_FILE}: ${TK_OBJS} $(TK_RES) 552 @$(RM) ${TK_DLL_FILE} 553 @MAKE_DLL@ ${TK_OBJS} $(TK_RES) $(SHLIB_LD_LIBS) 554 555${TK_LIB_FILE}: ${TK_OBJS} 556 @$(RM) ${TK_LIB_FILE} 557 @MAKE_LIB@ ${TK_OBJS} 558 @POST_MAKE_LIB@ 559 560# Special case object file targets 561 562winMain.$(OBJEXT): winMain.c 563 $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) 564 565testMain.$(OBJEXT): winMain.c 566 $(CC) -c $(CC_SWITCHES) @DEPARG@ -DTK_TEST $(CC_OBJNAME) 567 568tkTest.$(OBJEXT): tkTest.c 569 $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) 570 571tkWinTest.$(OBJEXT): tkWinTest.c 572 $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) 573 574tkSquare.$(OBJEXT): tkSquare.c 575 $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME) 576 577# Add the object extension to the implicit rules. By default .obj is not 578# automatically added. 579 580.SUFFIXES: .${OBJEXT} 581.SUFFIXES: .$(RES) 582.SUFFIXES: .rc 583 584# Implicit rule for all object files that will end up in the Tcl library 585 586.c.$(OBJEXT): 587 $(CC) -c $(STUB_CC_SWITCHES) -DBUILD_tk @DEPARG@ $(CC_OBJNAME) 588 589.rc.$(RES): 590 $(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_DEFINES@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(TCL_GENERIC_NATIVE)" @RC_INCLUDE@ "$(RC_DIR_NATIVE)" @DEPARG@ 591 592depend: 593 594cleanhelp: 595 $(RM) *.hlp *.cnt *.hpj *.GID *.rtf man2tcl${EXEEXT} 596 597clean: cleanhelp 598 $(RM) *.lib *.a *.exp *.dll *.res *.${OBJEXT} *~ \#* TAGS a.out 599 $(RM) $(WISH) $(TKTEST) $(CAT32) 600 $(RM) *.pch *.ilk *.pdb 601 602distclean: clean 603 $(RM) Makefile config.status config.cache config.log tkConfig.sh 604 605Makefile: $(SRC_DIR)/Makefile.in 606 ./config.status 607 608# 609# Regenerate the stubs files. 610# 611 612$(GENERIC_DIR)/tkStubInit.c: $(GENERIC_DIR)/tk.decls \ 613 $(GENERIC_DIR)/tkInt.decls 614 @echo "Warning: tkStubInit.c may be out of date." 615 @echo "Developers may want to run \"make genstubs\" to regenerate." 616 @echo "This warning can be safely ignored, do not report as a bug!" 617 618genstubs: 619 $(TCL_EXE) "$(TCL_TOOL_DIR}\genStubs.tcl" \ 620 "$(GENERIC_DIR_NATIVE)" \ 621 "$(GENERIC_DIR_NATIVE)\tk.decls" \ 622 "$(GENERIC_DIR_NATIVE)\tkInt.decls" 623