home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcl2-73c.zip / tcl7.3 / makefile < prev    next >
Makefile  |  1995-03-23  |  9KB  |  266 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 =    \tcl
  22. prefix =    \tcl
  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. TCL_LIBRARY_PATH =    /tcl
  29.  
  30. # Directory in which to install the archive libtcl.lib:
  31. LIB_DIR =    $(exec_prefix)\lib
  32.  
  33. # Directory in which to install the program tclsh:
  34. BIN_DIR =    $(exec_prefix)\bin
  35.  
  36. # Directory in which to install the include file tcl.h:
  37. INCLUDE_DIR =    $(prefix)\include
  38.  
  39. # Top-level directory for manual entries:
  40. MAN_DIR =    $(prefix)\man
  41.  
  42. # Directory in which to install manual entry for tclsh:
  43. MAN1_DIR =    $(MAN_DIR)\man1
  44.  
  45. # Directory in which to install manual entries for Tcl's C library
  46. # procedures:
  47. MAN3_DIR =    $(MAN_DIR)\man3
  48.  
  49. # Directory in which to install manual entries for the built-in
  50. # Tcl commands:
  51. MANN_DIR =    $(MAN_DIR)\mann
  52.  
  53. # To change the compiler switches, for example to change from -O
  54. # to -g, change the following line:
  55. #CFLAGS = /Q /Ti /Sm /Gm /Xi
  56. CFLAGS = /Q /Sm /Gm /Xi
  57.  
  58. # To disable ANSI-C procedure prototypes reverse the comment characters
  59. # on the following lines:
  60. PROTO_FLAGS =
  61. #PROTO_FLAGS = -DNO_PROTOTYPE
  62.  
  63. # Mathematical functions like sin and atan2 are enabled for expressions
  64. # by default.  To disable them, reverse the comment characters on the
  65. # following pairs of lines:
  66. MATH_FLAGS =
  67. #MATH_FLAGS = -DTCL_NO_MATH
  68. #MATH_LIBS = -lm
  69. MATH_LIBS =
  70.  
  71. # To compile for non-UNIX systems (so that only the non-UNIX-specific
  72. # commands are available), reverse the comment characters on the
  73. # following pairs of lines.  In addition, you'll have to provide your
  74. # own replacement for the "panic" procedure (see panic.c for what
  75. # the current one does).
  76. GENERIC_FLAGS =
  77. #GENERIC_FLAGS = -DTCL_GENERIC_ONLY
  78. UNIX_OBJS = panic.obj tclEnv.obj tclGlob.obj tclMain.obj tclUnixAZ.obj \
  79.     tclUnixStr.obj tclUnixUtil.obj
  80. #UNIX_OBJS =
  81.  
  82. # To enable memory debugging reverse the comment characters on the following
  83. # lines.  Warning:  if you enable memory debugging, you must do it
  84. # *everywhere*, including all the code that calls Tcl, and you must use
  85. # ckalloc and ckfree everywhere instead of malloc and free.
  86. MEM_DEBUG_FLAGS =
  87. #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
  88.  
  89. # Some versions of make, like SGI's, use the following variable to
  90. # determine which shell to use for executing commands:
  91. SHELL =        /bin/sh
  92.  
  93. #----------------------------------------------------------------
  94. # The information below is modified by the configure script when
  95. # Makefile is generated from Makefile.in.  You shouldn't normally
  96. # modify any of this stuff by hand.
  97. #----------------------------------------------------------------
  98.  
  99. #COMPAT_OBJS =        @LIBOBJS@
  100. COMPAT_OBJS =        dirent.obj
  101. #AC_FLAGS =        @DEFS@
  102. AC_FLAGS =        -DNO_SYS_TIME_H=1 -DNO_SYS_WAIT_H=1 -DNO_UNION_WAIT
  103. INSTALL =        @INSTALL@
  104. INSTALL_PROGRAM =    @INSTALL_PROGRAM@
  105. INSTALL_DATA =        @INSTALL_DATA@
  106. RANLIB =        @RANLIB@
  107. #SRC_DIR =        @srcdir@
  108. SRC_DIR =        .
  109. VPATH =            @srcdir@
  110.  
  111. #----------------------------------------------------------------
  112. # The information below should be usable as is.  The configure
  113. # script won't modify it and you shouldn't need to modify it
  114. # either.
  115. #----------------------------------------------------------------
  116.  
  117.  
  118. CC =        icc
  119. INCLUDES = 
  120. CC_SWITCHES =    $(CFLAGS) \
  121.         /I$(SRC_DIR) /Id:\ibmcpp\include /Ios2 /Id:\toolkt20\c\os2h \
  122.         $(AC_FLAGS) $(MATH_FLAGS) \
  123.         $(GENERIC_FLAGS) $(PROTO_FLAGS) $(MEM_DEBUG_FLAGS) \
  124.         -DTCL_LIBRARY="\"$(TCL_LIBRARY_PATH)\""
  125.  
  126. GENERIC_OBJS =    regexp.obj tclAsync.obj tclBasic.obj tclCkalloc.obj \
  127.     tclCmdAH.obj tclCmdIL.obj tclCmdMZ.obj tclExpr.obj tclGet.obj \
  128.     tclHash.obj tclHistory.obj tclLink.obj tclParse.obj tclProc.obj \
  129.     tclUtil.obj tclVar.obj
  130.  
  131. OBJS = $(GENERIC_OBJS) $(UNIX_OBJS) $(COMPAT_OBJS)
  132.  
  133. all: libtcl.lib tclsh.exe
  134.  
  135. libtcl.lib: $(OBJS)
  136.     rm -f libtcl.lib
  137.     lib libtcl $(OBJS);
  138.  
  139. tclsh.exe: tclAppInit.obj libtcl.lib
  140.     $(CC) $(CC_SWITCHES) /Fetclsh tclAppInit.obj libtcl.lib $(MATH_LIBS)
  141.  
  142. tcltest: tclTest.obj libtcl.lib
  143.     $(CC) $(CC_SWITCHES) /Fetcltest tclTest.obj libtcl.lib $(MATH_LIBS)
  144.  
  145. test: tcltest
  146.     @cwd=`pwd`; \
  147.     cd $(SRC_DIR); TCL_LIBRARY=`pwd`\library; export TCL_LIBRARY; \
  148.     cd $$cwd; ( echo cd $(SRC_DIR)\tests\; source all ) | .\tcltest
  149.  
  150. install: install-binaries install-libraries install-man
  151.  
  152. install-binaries: libtcl.lib tclsh
  153.     @for i in $(LIB_DIR) $(BIN_DIR) ; \
  154.         do \
  155.         if [ ! -d $$i ] ; then \
  156.         echo "Making directory $$i"; \
  157.         mkdir $$i; \
  158.         chmod 755 $$i; \
  159.         else true; \
  160.         fi; \
  161.         done;
  162.     @echo "Installing libtcl.lib"
  163.     @$(INSTALL_DATA) libtcl.lib $(LIB_DIR)
  164.     @$(RANLIB) $(LIB_DIR)\libtcl.lib
  165.     @echo "Installing tclsh"
  166.     @$(INSTALL_PROGRAM) tclsh $(BIN_DIR)
  167.  
  168. install-libraries:
  169.     @for i in $(prefix)\lib $(INCLUDE_DIR) $(TCL_LIBRARY) ; \
  170.         do \
  171.         if [ ! -d $$i ] ; then \
  172.         echo "Making directory $$i"; \
  173.         mkdir $$i; \
  174.         chmod 755 $$i; \
  175.         else true; \
  176.         fi; \
  177.         done;
  178.     @echo "Installing tcl.h"
  179.     @$(INSTALL_DATA) $(SRC_DIR)\tcl.h $(INCLUDE_DIR)
  180.     @cd $(SRC_DIR)\library; for i in *.tcl tclIndex; \
  181.         do \
  182.         echo "Installing library\$$i"; \
  183.         $(INSTALL_DATA) $$i $(TCL_LIBRARY); \
  184.         done;
  185.  
  186. install-man:
  187.     @for i in $(MAN_DIR) $(MAN1_DIR) $(MAN3_DIR) $(MANN_DIR) ; \
  188.         do \
  189.         if [ ! -d $$i ] ; then \
  190.         echo "Making directory $$i"; \
  191.         mkdir $$i; \
  192.         chmod 755 $$i; \
  193.         else true; \
  194.         fi; \
  195.         done;
  196.     @cd $(SRC_DIR)\doc; for i in *.1; \
  197.         do \
  198.         echo "Installing doc\$$i"; \
  199.         rm -f $(MAN1_DIR)\$$i; \
  200.         sed -e '\man\.macros/r man.macros' -e '\man\.macros/d' \
  201.             $$i > $(MAN1_DIR)\$$i; \
  202.         chmod 444 $(MAN1_DIR)\$$i; \
  203.         done;
  204.     @cd $(SRC_DIR)\doc; for i in *.3; \
  205.         do \
  206.         echo "Installing doc\$$i"; \
  207.         rm -f $(MAN3_DIR)\$$i; \
  208.         sed -e '\man\.macros\r man.macros' -e '\man\.macros\d' \
  209.             $$i > $(MAN3_DIR)\$$i; \
  210.         chmod 444 $(MAN3_DIR)\$$i; \
  211.         done;
  212.     @cd $(SRC_DIR)\doc; for i in *.n; \
  213.         do \
  214.         echo "Installing doc\$$i"; \
  215.         rm -f $(MANN_DIR)\$$i; \
  216.         sed -e '\man\.macros\r man.macros' -e '\man\.macros\d' \
  217.             $$i > $(MANN_DIR)\$$i; \
  218.         chmod 444 $(MANN_DIR)\$$i; \
  219.         done;
  220.  
  221. Makefile: $(SRC_DIR)\Makefile.in
  222.     $(SHELL) config.status
  223.  
  224. clean:
  225.     rm -f *.lib *.obj core errs *~ \#* TAGS *.E a.out errors tclsh.exe tcltest.exe
  226.  
  227. distclean: clean
  228.     rm -f Makefile config.status
  229.  
  230. getcwd.obj: $(SRC_DIR)\compat\getcwd.c
  231.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)\compat\getcwd.c
  232.  
  233. dirent.obj: $(SRC_DIR)\os2\dirent.c
  234.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)\os2\dirent.c
  235.  
  236. opendir.obj: $(SRC_DIR)\compat\opendir.c
  237.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)\compat\opendir.c
  238.  
  239. strerror.obj: $(SRC_DIR)\compat\strerror.c
  240.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)\compat\strerror.c
  241.  
  242. strstr.obj: $(SRC_DIR)\compat\strstr.c
  243.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)\compat\strstr.c
  244.  
  245. strtod.obj: $(SRC_DIR)\compat\strtod.c
  246.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)\compat\strtod.c
  247.  
  248. strtol.obj: $(SRC_DIR)\compat\strtol.c
  249.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)\compat\strtol.c
  250.  
  251. strtoul.obj: $(SRC_DIR)\compat\strtoul.c
  252.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)\compat\strtoul.c
  253.  
  254. tmpnam.obj: $(SRC_DIR)\compat\tmpnam.c
  255.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)\compat\tmpnam.c
  256.  
  257. waitpid.obj: $(SRC_DIR)\compat\waitpid.c
  258.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)\compat\waitpid.c
  259.  
  260. .c.obj:
  261.     $(CC) -c $(CC_SWITCHES) $<
  262.  
  263. $(OBJS): $(SRC_DIR)\tcl.h $(SRC_DIR)\tclInt.h
  264. $(UNIX_OBJS): $(SRC_DIR)\tclUnix.h
  265. tclCmdIL.obj: $(SRC_DIR)\patchlevel.h
  266.