home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcl2-73c.zip / tcl7.3 / Makefile.in < prev    next >
Makefile  |  1993-09-26  |  8KB  |  256 lines

  1. #
  2. # This file is a Makefile for Tcl.  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 Tcl scripts (note:
  25. # you can set the TCL_LIBRARY environment variable at run-time to
  26. # override the compiled-in location):
  27. TCL_LIBRARY =    $(prefix)/lib/tcl
  28.  
  29. # Directory in which to install the archive libtcl.a:
  30. LIB_DIR =    $(exec_prefix)/lib
  31.  
  32. # Directory in which to install the program tclsh:
  33. BIN_DIR =    $(exec_prefix)/bin
  34.  
  35. # Directory in which to install the include file tcl.h:
  36. INCLUDE_DIR =    $(prefix)/include
  37.  
  38. # Top-level directory for manual entries:
  39. MAN_DIR =    $(prefix)/man
  40.  
  41. # Directory in which to install manual entry for tclsh:
  42. MAN1_DIR =    $(MAN_DIR)/man1
  43.  
  44. # Directory in which to install manual entries for Tcl's C library
  45. # procedures:
  46. MAN3_DIR =    $(MAN_DIR)/man3
  47.  
  48. # Directory in which to install manual entries for the built-in
  49. # Tcl commands:
  50. MANN_DIR =    $(MAN_DIR)/mann
  51.  
  52. # To change the compiler switches, for example to change from -O
  53. # to -g, change the following line:
  54. CFLAGS = -O
  55.  
  56. # To disable ANSI-C procedure prototypes reverse the comment characters
  57. # on the following lines:
  58. PROTO_FLAGS =
  59. #PROTO_FLAGS = -DNO_PROTOTYPE
  60.  
  61. # Mathematical functions like sin and atan2 are enabled for expressions
  62. # by default.  To disable them, reverse the comment characters on the
  63. # following pairs of lines:
  64. MATH_FLAGS =
  65. #MATH_FLAGS = -DTCL_NO_MATH
  66. MATH_LIBS = -lm
  67. #MATH_LIBS =
  68.  
  69. # To compile for non-UNIX systems (so that only the non-UNIX-specific
  70. # commands are available), reverse the comment characters on the
  71. # following pairs of lines.  In addition, you'll have to provide your
  72. # own replacement for the "panic" procedure (see panic.c for what
  73. # the current one does).
  74. GENERIC_FLAGS =
  75. #GENERIC_FLAGS = -DTCL_GENERIC_ONLY
  76. UNIX_OBJS = panic.o tclEnv.o tclGlob.o tclMain.o tclUnixAZ.o \
  77.     tclUnixStr.o tclUnixUtil.o
  78. #UNIX_OBJS =
  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. COMPAT_OBJS =        @LIBOBJS@
  98. AC_FLAGS =        @DEFS@
  99. INSTALL =        @INSTALL@
  100. INSTALL_PROGRAM =    @INSTALL_PROGRAM@
  101. INSTALL_DATA =        @INSTALL_DATA@
  102. RANLIB =        @RANLIB@
  103. SRC_DIR =        @srcdir@
  104. VPATH =            @srcdir@
  105.  
  106. #----------------------------------------------------------------
  107. # The information below should be usable as is.  The configure
  108. # script won't modify it and you shouldn't need to modify it
  109. # either.
  110. #----------------------------------------------------------------
  111.  
  112.  
  113. CC =        @CC@
  114. CC_SWITCHES =    ${CFLAGS} -I. -I${SRC_DIR} ${AC_FLAGS} ${MATH_FLAGS} \
  115. ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
  116. -DTCL_LIBRARY=\"${TCL_LIBRARY}\"
  117.  
  118. GENERIC_OBJS =    regexp.o tclAsync.o tclBasic.o tclCkalloc.o \
  119.     tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclExpr.o tclGet.o \
  120.     tclHash.o tclHistory.o tclLink.o tclParse.o tclProc.o \
  121.     tclUtil.o tclVar.o
  122.  
  123. OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS}
  124.  
  125. all: libtcl.a tclsh
  126.  
  127. libtcl.a: ${OBJS}
  128.     rm -f libtcl.a
  129.     ar cr libtcl.a ${OBJS}
  130.     $(RANLIB) libtcl.a
  131.  
  132. tclsh: tclAppInit.o libtcl.a
  133.     ${CC} ${CC_SWITCHES} tclAppInit.o libtcl.a ${MATH_LIBS} -o tclsh
  134.  
  135. tcltest: tclTest.o libtcl.a
  136.     ${CC} ${CC_SWITCHES} tclTest.o libtcl.a ${MATH_LIBS} -o tcltest
  137.  
  138. test: tcltest
  139.     @cwd=`pwd`; \
  140.     cd $(SRC_DIR); TCL_LIBRARY=`pwd`/library; export TCL_LIBRARY; \
  141.     cd $$cwd; ( echo cd $(SRC_DIR)/tests\; source all ) | ./tcltest
  142.  
  143. install: install-binaries install-libraries install-man
  144.  
  145. install-binaries: libtcl.a tclsh
  146.     @for i in $(LIB_DIR) $(BIN_DIR) ; \
  147.         do \
  148.         if [ ! -d $$i ] ; then \
  149.         echo "Making directory $$i"; \
  150.         mkdir $$i; \
  151.         chmod 755 $$i; \
  152.         else true; \
  153.         fi; \
  154.         done;
  155.     @echo "Installing libtcl.a"
  156.     @$(INSTALL_DATA) libtcl.a $(LIB_DIR)
  157.     @$(RANLIB) $(LIB_DIR)/libtcl.a
  158.     @echo "Installing tclsh"
  159.     @$(INSTALL_PROGRAM) tclsh $(BIN_DIR)
  160.  
  161. install-libraries:
  162.     @for i in $(prefix)/lib $(INCLUDE_DIR) $(TCL_LIBRARY) ; \
  163.         do \
  164.         if [ ! -d $$i ] ; then \
  165.         echo "Making directory $$i"; \
  166.         mkdir $$i; \
  167.         chmod 755 $$i; \
  168.         else true; \
  169.         fi; \
  170.         done;
  171.     @echo "Installing tcl.h"
  172.     @$(INSTALL_DATA) $(SRC_DIR)/tcl.h $(INCLUDE_DIR)
  173.     @cd $(SRC_DIR)/library; for i in *.tcl tclIndex; \
  174.         do \
  175.         echo "Installing library/$$i"; \
  176.         $(INSTALL_DATA) $$i $(TCL_LIBRARY); \
  177.         done;
  178.  
  179. install-man:
  180.     @for i in $(MAN_DIR) $(MAN1_DIR) $(MAN3_DIR) $(MANN_DIR) ; \
  181.         do \
  182.         if [ ! -d $$i ] ; then \
  183.         echo "Making directory $$i"; \
  184.         mkdir $$i; \
  185.         chmod 755 $$i; \
  186.         else true; \
  187.         fi; \
  188.         done;
  189.     @cd $(SRC_DIR)/doc; for i in *.1; \
  190.         do \
  191.         echo "Installing doc/$$i"; \
  192.         rm -f $(MAN1_DIR)/$$i; \
  193.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  194.             $$i > $(MAN1_DIR)/$$i; \
  195.         chmod 444 $(MAN1_DIR)/$$i; \
  196.         done;
  197.     @cd $(SRC_DIR)/doc; for i in *.3; \
  198.         do \
  199.         echo "Installing doc/$$i"; \
  200.         rm -f $(MAN3_DIR)/$$i; \
  201.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  202.             $$i > $(MAN3_DIR)/$$i; \
  203.         chmod 444 $(MAN3_DIR)/$$i; \
  204.         done;
  205.     @cd $(SRC_DIR)/doc; for i in *.n; \
  206.         do \
  207.         echo "Installing doc/$$i"; \
  208.         rm -f $(MANN_DIR)/$$i; \
  209.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  210.             $$i > $(MANN_DIR)/$$i; \
  211.         chmod 444 $(MANN_DIR)/$$i; \
  212.         done;
  213.  
  214. Makefile: $(SRC_DIR)/Makefile.in
  215.     $(SHELL) config.status
  216.  
  217. clean:
  218.     rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tclsh tcltest
  219.  
  220. distclean: clean
  221.     rm -f Makefile config.status
  222.  
  223. getcwd.o: $(SRC_DIR)/compat/getcwd.c
  224.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/getcwd.c
  225.  
  226. opendir.o: $(SRC_DIR)/compat/opendir.c
  227.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/opendir.c
  228.  
  229. strerror.o: $(SRC_DIR)/compat/strerror.c
  230.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strerror.c
  231.  
  232. strstr.o: $(SRC_DIR)/compat/strstr.c
  233.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strstr.c
  234.  
  235. strtod.o: $(SRC_DIR)/compat/strtod.c
  236.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtod.c
  237.  
  238. strtol.o: $(SRC_DIR)/compat/strtol.c
  239.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtol.c
  240.  
  241. strtoul.o: $(SRC_DIR)/compat/strtoul.c
  242.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtoul.c
  243.  
  244. tmpnam.o: $(SRC_DIR)/compat/tmpnam.c
  245.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/tmpnam.c
  246.  
  247. waitpid.o: $(SRC_DIR)/compat/waitpid.c
  248.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/waitpid.c
  249.  
  250. .c.o:
  251.     $(CC) -c $(CC_SWITCHES) $<
  252.  
  253. ${OBJS}: $(SRC_DIR)/tcl.h $(SRC_DIR)/tclInt.h
  254. ${UNIX_OBJS}: $(SRC_DIR)/tclUnix.h
  255. tclCmdIL.o: $(SRC_DIR)/patchlevel.h
  256.