home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / Makefile.in < prev    next >
Encoding:
Makefile  |  1993-07-09  |  7.4 KB  |  229 lines

  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. #----------------------------------------------------------------
  9. # Things you can change to personalize the Makefile for your own
  10. # site (you can make these changes in either Makefile.in or
  11. # Makefile, but changes to Makefile will get lost if you re-run
  12. # the configuration script).
  13. #----------------------------------------------------------------
  14.  
  15. # Default top-level directories in which to install architecture-
  16. # specific files (exec_prefix) and machine-independent files such
  17. # as scripts (prefix).  The values specified here may be overridden
  18. # at configure-time with the --exec_prefix and --prefix options
  19. # to the "configure" script.
  20.  
  21. exec_prefix =    /usr/local
  22. prefix =    /usr/local
  23.  
  24. # Directory in which to install the library of Tk scripts and demos
  25. # (note: you can set the TK_LIBRARY environment variable at run-time to
  26. # override the compiled-in location):
  27. TK_LIBRARY =    $(prefix)/lib/tk
  28.  
  29. # Directory in which to install the archive libtk.a:
  30. LIB_DIR =    $(exec_prefix)/lib
  31.  
  32. # Directory in which to install the program wish:
  33. BIN_DIR =    $(exec_prefix)/bin
  34.  
  35. # Directory in which to install the include file tk.h:
  36. INCLUDE_DIR =    $(prefix)/include
  37.  
  38. # Directory in which to install manual entry for wish:
  39. MAN1_DIR =    $(prefix)/man/man1
  40.  
  41. # Directory in which to install manual entries for Tk's C library
  42. # procedures:
  43. MAN3_DIR =    $(prefix)/man/man3
  44.  
  45. # Directory in which to install manual entries for the built-in
  46. # Tcl commands:
  47. MANN_DIR =    $(prefix)/man/mann
  48.  
  49. # The directory containing the Tcl sources and headers appropriate
  50. # for this version of Tk ("@srcdir@" will be replaced or has already
  51. # been replaced by the configure script):
  52. TCL_DIR =    @srcdir@/../tcl7.0b1
  53.  
  54. # Libraries to use when linking:  must include at least Tk, Tcl, Xlib,
  55. # and the math library (in that order).  The "@LIBS@" part will be
  56. # replaced (or has already been replaced) with relevant libraries as
  57. # determined by the configure script.
  58. LIBS = libtk.a $(TCL_DIR)/libtcl.a -lX11 -lm @LIBS@
  59.  
  60. # To change the compiler switches, for example to change from -O
  61. # to -g, change the following line:
  62. CC_SWITCHES = -O
  63.  
  64. # To compile under OpenWindows, reverse the comments on the following
  65. # lines:
  66. OW_FLAGS =
  67. #OW_FLAGS =     -I/usr/openwin/include -L/usr/openwin/lib
  68.  
  69. # To turn off the security checks that disallow incoming sends when
  70. # the X server appears to be insecure, reverse the comments on the
  71. # following lines:
  72. SECURITY_FLAGS =
  73. #SECURITY_FLAGS = -DTK_NO_SECURITY
  74.  
  75. # To disable ANSI-C procedure prototypes reverse the comment characters
  76. # on the following lines:
  77. PROTO_FLAGS =
  78. #PROTO_FLAGS = -DNO_PROTOTYPE
  79.  
  80. # To enable memory debugging reverse the comment characters on the following
  81. # lines.  Warning:  if you enable memory debugging, you must do it
  82. # *everywhere*, including all the code that calls Tcl, and you must use
  83. # ckalloc and ckfree everywhere instead of malloc and free.
  84. MEM_DEBUG_FLAGS =
  85. #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
  86.  
  87. # Some versions of make, like SGI's, use the following variable to
  88. # determine which shell to use for executing commands:
  89. SHELL =        /bin/sh
  90.  
  91. #----------------------------------------------------------------
  92. # The information below is modified by the configure script when
  93. # Makefile is generated from Makefile.in.  You shouldn't normally
  94. # modify any of this stuff by hand.
  95. #----------------------------------------------------------------
  96.  
  97. AC_FLAGS =        @DEFS@
  98. INSTALL =        @INSTALL@
  99. INSTALL_PROGRAM =    @INSTALL_PROGRAM@
  100. INSTALL_DATA =        @INSTALL_DATA@
  101. RANLIB =        @RANLIB@
  102. SRC_DIR =        @srcdir@
  103. VPATH =            @srcdir@
  104.  
  105. #----------------------------------------------------------------
  106. # The information below should be usable as is.  The configure
  107. # script won't modify it and you shouldn't need to modify it
  108. # either.
  109. #----------------------------------------------------------------
  110.  
  111.  
  112. CC =        cc
  113. CFLAGS =    ${CC_SWITCHES} -I${SRC_DIR} -I${TCL_DIR} \
  114. ${AC_FLAGS} ${OW_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} \
  115. -DTK_LIBRARY=\"${TK_LIBRARY}\"
  116.  
  117. WIDGOBJS = tkButton.o tkEntry.o tkFrame.o tkListbox.o \
  118.     tkMenu.o tkMenubutton.o tkMessage.o tkScale.o \
  119.     tkScrollbar.o
  120.  
  121. CANVOBJS = tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvLine.o \
  122.     tkCanvPoly.o tkCanvPs.o tkCanvText.o tkCanvWind.o \
  123.     tkRectOval.o tkTrig.o
  124.  
  125. TEXTOBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextIndex.o tkTextTag.o
  126.  
  127. OBJS = tk3d.o tkAppInit.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkCmds.o \
  128.     tkColor.o tkConfig.o tkCursor.o tkError.o tkEvent.o \
  129.     tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o \
  130.         tkMain.o tkOption.o tkPack.o tkPlace.o tkPreserve.o tkSelect.o \
  131.         tkSend.o tkWindow.o tkWm.o $(WIDGOBJS) \
  132.     $(CANVOBJS) $(TEXTOBJS)
  133.  
  134. all: libtk.a wish
  135.  
  136. libtk.a: $(OBJS)
  137.     rm -f libtk.a
  138.     ar cr libtk.a $(OBJS)
  139.     $(RANLIB) libtk.a
  140.  
  141. wish: libtk.a $(TCL_DIR)/libtcl.a
  142.     $(CC) $(CFLAGS) tkAppInit.o $(LIBS) -o wish
  143.  
  144. tktest: libtk.a tkTest.o $(TCL_DIR)/libtcl.a
  145.     ${CC} ${CFLAGS} tkTest.o $(LIBS) -o tktest
  146.  
  147. test: tktest
  148.     @cwd=`pwd`; \
  149.     cd $(TCL_DIR); TCL_LIBRARY=`pwd`/library; export TCL_LIBRARY; \
  150.     cd $$cwd; cd $(SRC_DIR); TK_LIBRARY=`pwd`/library; export TK_LIBRARY; \
  151.     cd $$cwd; ( echo cd tests\; source all\; exit ) | ./tktest
  152.  
  153. install: libtk.a wish
  154.     @for i in $(LIB_DIR) $(BIN_DIR) \
  155.         $(INCLUDE_DIR) $(TK_LIBRARY) $(TK_LIBRARY)/demos \
  156.         $(TK_LIBRARY)/demos/bitmaps $(MAN1_DIR) $(MAN3_DIR) \
  157.         $(MANN_DIR) ; \
  158.         do \
  159.         if [ ! -d $$i ] ; then \
  160.         echo "Making directory $$i"; \
  161.         mkdir -p $$i; \
  162.         chmod 755 $$i; \
  163.         else true; \
  164.         fi; \
  165.         done;
  166.     @echo "Installing libtk.a"
  167.     @$(INSTALL_DATA) libtk.a $(LIB_DIR)
  168.     @$(RANLIB) $(LIB_DIR)/libtk.a
  169.     @echo "Installing wish"
  170.     @$(INSTALL_PROGRAM) wish $(BIN_DIR)
  171.     @echo "Installing tk.h"
  172.     @$(INSTALL_DATA) $(SRC_DIR)/tk.h $(INCLUDE_DIR)
  173.     @cd $(SRC_DIR)/library; for i in *.tcl tclIndex prolog.ps; \
  174.         do \
  175.         echo "Installing library/$$i"; \
  176.         $(INSTALL_DATA) $$i $(TK_LIBRARY); \
  177.         done;
  178.     @cd $(SRC_DIR)/library/demos; for i in *; \
  179.         do \
  180.         if [ -f $$i ] ; then \
  181.         echo "Installing library/demos/$$i"; \
  182.         $(INSTALL_DATA) $$i $(TK_LIBRARY)/demos; \
  183.         fi; \
  184.         done;
  185.     @cd $(SRC_DIR)/library/demos/bitmaps; for i in *; \
  186.         do \
  187.         echo "Installing library/demos/bitmaps/$$i"; \
  188.         $(INSTALL_DATA) $$i $(TK_LIBRARY)/demos/bitmaps; \
  189.         done;
  190.     @cd $(SRC_DIR)/doc; for i in *.1; \
  191.         do \
  192.         echo "Installing doc/$$i"; \
  193.         rm -f $(MAN1_DIR)/$$i; \
  194.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  195.             $$i > $(MAN1_DIR)/$$i; \
  196.         chmod 444 $(MAN1_DIR)/$$i; \
  197.         done;
  198.     @cd $(SRC_DIR)/doc; for i in *.3; \
  199.         do \
  200.         echo "Installing doc/$$i"; \
  201.         rm -f $(MAN3_DIR)/$$i; \
  202.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  203.             $$i > $(MAN3_DIR)/$$i; \
  204.         chmod 444 $(MAN3_DIR)/$$i; \
  205.         done;
  206.     @cd $(SRC_DIR)/doc; for i in *.n; \
  207.         do \
  208.         echo "Installing doc/$$i"; \
  209.         rm -f $(MANN_DIR)/$$i; \
  210.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  211.             $$i > $(MANN_DIR)/$$i; \
  212.         chmod 444 $(MANN_DIR)/$$i; \
  213.         done;
  214.  
  215. Makefile: $(SRC_DIR)/Makefile.in
  216.     $(SHELL) config.status
  217.  
  218. clean:
  219.     rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tktest wish
  220.  
  221. distclean: clean
  222.     rm -f Makefile config.status
  223.  
  224. $(OBJS) tkTest.o: tk.h tkInt.h tkConfig.h
  225. $(WIDGOBJS): default.h
  226. $(CANVOBJS): default.h tkCanvas.h
  227. $(TEXTOBJS): default.h tkText.h
  228. tkWindow.o: patchlevel.h
  229.