home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / tcl / tcl+tk+t / tcl7.3l1 / tcl7 / tcl7.3 / Makefile.in < prev    next >
Encoding:
Makefile  |  1995-01-18  |  8.9 KB  |  289 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/tcl
  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. MAN1_EXT =    1tcl
  44.  
  45. # Directory in which to install manual entries for Tcl's C library
  46. # procedures:
  47. MAN3_DIR =    $(MAN_DIR)/man3
  48. MAN3_EXT =    3tcl
  49.  
  50. # Directory in which to install manual entries for the built-in
  51. # Tcl commands:
  52. MANN_DIR =    $(MAN_DIR)/man3
  53. MANN_EXT =    3tcl
  54.  
  55. # To change the compiler switches, for example to change from -O
  56. # to -g, change the following line:
  57. CFLAGS = -O
  58.  
  59. # To disable ANSI-C procedure prototypes reverse the comment characters
  60. # on the following lines:
  61. PROTO_FLAGS =
  62. #PROTO_FLAGS = -DNO_PROTOTYPE
  63.  
  64. # Mathematical functions like sin and atan2 are enabled for expressions
  65. # by default.  To disable them, reverse the comment characters on the
  66. # following pairs of lines:
  67. MATH_FLAGS =
  68. #MATH_FLAGS = -DTCL_NO_MATH
  69. MATH_LIBS = -lm -lieee
  70. #MATH_LIBS =
  71.  
  72. # To compile for non-UNIX systems (so that only the non-UNIX-specific
  73. # commands are available), reverse the comment characters on the
  74. # following pairs of lines.  In addition, you'll have to provide your
  75. # own replacement for the "panic" procedure (see panic.c for what
  76. # the current one does).
  77. GENERIC_FLAGS =
  78. #GENERIC_FLAGS = -DTCL_GENERIC_ONLY
  79. UNIX_OBJS = panic.o tclEnv.o tclGlob.o tclMain.o tclUnixAZ.o \
  80.     tclUnixStr.o tclUnixUtil.o
  81. #UNIX_OBJS =
  82.  
  83. # To enable memory debugging reverse the comment characters on the following
  84. # lines.  Warning:  if you enable memory debugging, you must do it
  85. # *everywhere*, including all the code that calls Tcl, and you must use
  86. # ckalloc and ckfree everywhere instead of malloc and free.
  87. MEM_DEBUG_FLAGS =
  88. #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
  89.  
  90. # Some versions of make, like SGI's, use the following variable to
  91. # determine which shell to use for executing commands:
  92. SHELL =        /bin/sh
  93.  
  94. #----------------------------------------------------------------
  95. # The information below is modified by the configure script when
  96. # Makefile is generated from Makefile.in.  You shouldn't normally
  97. # modify any of this stuff by hand.
  98. #----------------------------------------------------------------
  99.  
  100. COMPAT_OBJS =        @LIBOBJS@
  101. AC_FLAGS =        @DEFS@
  102. INSTALL =        @INSTALL@
  103. INSTALL_PROGRAM =    @INSTALL_PROGRAM@
  104. INSTALL_DATA =        @INSTALL_DATA@
  105. RANLIB =        @RANLIB@
  106. SRC_DIR =        @srcdir@
  107. VPATH =            @srcdir@
  108.  
  109. #----------------------------------------------------------------
  110. # The information below should be usable as is.  The configure
  111. # script won't modify it and you shouldn't need to modify it
  112. # either.
  113. #----------------------------------------------------------------
  114.  
  115.  
  116. CC =        @CC@
  117. CC_SWITCHES =    ${CFLAGS} -I. -I${SRC_DIR} ${AC_FLAGS} ${MATH_FLAGS} \
  118. ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
  119. -DTCL_LIBRARY=\"${TCL_LIBRARY}\"
  120.  
  121. GENERIC_OBJS =    regexp.o tclAsync.o tclBasic.o tclCkalloc.o \
  122.     tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclExpr.o tclGet.o \
  123.     tclHash.o tclHistory.o tclLink.o tclParse.o tclProc.o \
  124.     tclUtil.o tclVar.o
  125.  
  126. OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS}
  127.  
  128. LDFLAGS = -s
  129. DLLBIN = /usr/dll/bin
  130. SHCC = ${CC} -B/usr/dll/jump/
  131. SHOBJS = dummyInit.so ${OBJS:.o=.so}
  132. JUMP_VER = 3.1.0
  133. JUMP_ARGS = -v ${JUMP_VER} -a 0x60c00000 -j 0x4000 -g 4096
  134. export JUMP_DIR = $(shell pwd)/jump
  135. export JUMP_LIB = libtcl
  136.  
  137. all: libtcl.a libtcl.sa tclsh
  138.  
  139. libtcl.a: ${OBJS}
  140.     rm -f libtcl.a
  141.     ar cr libtcl.a ${OBJS}
  142.     $(RANLIB) libtcl.a
  143.  
  144. libtcl.sa: dummyMain.o ${SHOBJS} libtcl.so.${JUMP_VER}
  145.     ${DLLBIN}/mkstubs -l libtcl ${JUMP_ARGS} -- libtcl
  146.     ar rs libtcl.sa dummyMain.o
  147.  
  148. libtcl.so.${JUMP_VER}: ${SHOBJS}
  149.     ${DLLBIN}/mkimage -l libtcl ${JUMP_ARGS} -- ${SHOBJS} -lm -lc `${CC} -print-libgcc-file-name` -lc
  150.  
  151. tclsh: tclAppInit.o libtcl.a libtcl.sa
  152.     ${CC} ${LDFLAGS} ${CC_SWITCHES} tclAppInit.o -L. -ltcl ${MATH_LIBS} -o tclsh
  153.  
  154. tcltest: tclTest.o libtcl.a libtcl.sa
  155.     ${CC} ${LDFLAGS} ${CC_SWITCHES} tclTest.o -L. -ltcl ${MATH_LIBS} -o tcltest
  156.  
  157. test: tcltest
  158.     @cwd=`pwd`; \
  159.     cd $(SRC_DIR); TCL_LIBRARY=`pwd`/library; export TCL_LIBRARY; \
  160.     cd $$cwd; ( echo cd $(SRC_DIR)/tests\; source all ) | ./tcltest
  161.  
  162. install: install-binaries install-libraries install-man
  163.  
  164. install-binaries: libtcl.a libtcl.sa libtcl.so.$(JUMP_VER) tclsh
  165.     @for i in $(LIB_DIR) $(BIN_DIR) ; \
  166.         do \
  167.         if [ ! -d $$i ] ; then \
  168.         echo "Making directory $$i"; \
  169.         mkdir $$i; \
  170.         chmod 755 $$i; \
  171.         else true; \
  172.         fi; \
  173.         done;
  174.     @echo "Installing libtcl.a"
  175.     @$(INSTALL_DATA) libtcl.a $(LIB_DIR)
  176.     @echo "Installing libtcl.sa"
  177.     @$(INSTALL_DATA) libtcl.sa $(LIB_DIR)
  178.     @echo "Installing libtcl.so.$(JUMP_VER)"
  179.     @$(INSTALL_PROGRAM) libtcl.so.$(JUMP_VER) $(LIB_DIR)
  180.     @echo "Running ldconfig"
  181.     @ldconfig
  182.     @echo "Installing tclsh"
  183.     @$(INSTALL_PROGRAM) tclsh $(BIN_DIR)
  184.  
  185. install-libraries:
  186.     @for i in $(prefix)/lib $(INCLUDE_DIR) $(TCL_LIBRARY) ; \
  187.         do \
  188.         if [ ! -d $$i ] ; then \
  189.         echo "Making directory $$i"; \
  190.         mkdir $$i; \
  191.         chmod 755 $$i; \
  192.         else true; \
  193.         fi; \
  194.         done;
  195.     @for i in tcl.h tclInt.h tclRegexp.h tclUnix.h; \
  196.         do \
  197.         echo "Installing $$i"; \
  198.         $(INSTALL_DATA) $(SRC_DIR)/$$i $(INCLUDE_DIR); \
  199.         done;
  200.     @cd $(SRC_DIR)/library; for i in *.tcl tclIndex; \
  201.         do \
  202.         echo "Installing library/$$i"; \
  203.         $(INSTALL_DATA) $$i $(TCL_LIBRARY); \
  204.         done;
  205.  
  206. install-man:
  207.     @for i in $(MAN_DIR) $(MAN1_DIR) $(MAN3_DIR) $(MANN_DIR) ; \
  208.         do \
  209.         if [ ! -d $$i ] ; then \
  210.         echo "Making directory $$i"; \
  211.         mkdir $$i; \
  212.         chmod 755 $$i; \
  213.         else true; \
  214.         fi; \
  215.         done;
  216.     @cd $(SRC_DIR)/doc; for i in *.1; \
  217.         do \
  218.         echo "Installing doc/$$i"; \
  219.         rm -f $(MAN1_DIR)/`basename $$i .1`.$(MAN1_EXT); \
  220.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  221.             $$i > $(MAN1_DIR)/`basename $$i .1`.$(MAN1_EXT); \
  222.         chmod 444 $(MAN1_DIR)/`basename $$i .1`.$(MAN1_EXT); \
  223.         done;
  224.     @cd $(SRC_DIR)/doc; for i in *.3; \
  225.         do \
  226.         echo "Installing doc/$$i"; \
  227.         rm -f $(MAN3_DIR)/`basename $$i .3`.$(MAN3_EXT); \
  228.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  229.             $$i > $(MAN3_DIR)/`basename $$i .3`.$(MAN3_EXT); \
  230.         chmod 444 $(MAN3_DIR)/`basename $$i .3`.$(MAN3_EXT); \
  231.         done;
  232.     @cd $(SRC_DIR)/doc; for i in *.n; \
  233.         do \
  234.         echo "Installing doc/$$i"; \
  235.         rm -f $(MANN_DIR)/`basename $$i .n`.$(MANN_EXT); \
  236.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  237.             $$i > $(MANN_DIR)/`basename $$i .n`.$(MANN_EXT); \
  238.         chmod 444 $(MANN_DIR)/`basename $$i .n`.$(MANN_EXT); \
  239.         done;
  240.  
  241. Makefile: $(SRC_DIR)/Makefile.in
  242.     $(SHELL) config.status
  243.  
  244. clean:
  245.     rm -f *.a *.sa *.o *.so *.so.* core errs *~ \#* TAGS *.E a.out errors tclsh tcltest jump/_*
  246.  
  247. distclean: clean
  248.     rm -f Makefile config.status
  249.  
  250. getcwd.o: $(SRC_DIR)/compat/getcwd.c
  251.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/getcwd.c
  252.  
  253. opendir.o: $(SRC_DIR)/compat/opendir.c
  254.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/opendir.c
  255.  
  256. strerror.o: $(SRC_DIR)/compat/strerror.c
  257.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strerror.c
  258.  
  259. strstr.o: $(SRC_DIR)/compat/strstr.c
  260.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strstr.c
  261.  
  262. strtod.o: $(SRC_DIR)/compat/strtod.c
  263.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtod.c
  264.  
  265. strtol.o: $(SRC_DIR)/compat/strtol.c
  266.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtol.c
  267.  
  268. strtoul.o: $(SRC_DIR)/compat/strtoul.c
  269.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtoul.c
  270.  
  271. tmpnam.o: $(SRC_DIR)/compat/tmpnam.c
  272.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/tmpnam.c
  273.  
  274. waitpid.o: $(SRC_DIR)/compat/waitpid.c
  275.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/waitpid.c
  276.  
  277. .c.o:
  278.     $(CC) -c $(CC_SWITCHES) $<
  279.  
  280. %.so: %.c
  281.     ${SHCC} -c ${CC_SWITCHES} $< -o $@
  282.  
  283. tclMain.so: tclMain.c
  284.     ${SHCC} -Dmain=Tcl_Main -c ${CC_SWITCHES} $< -o $@
  285.  
  286. ${OBJS}: $(SRC_DIR)/tcl.h $(SRC_DIR)/tclInt.h
  287. ${UNIX_OBJS}: $(SRC_DIR)/tclUnix.h
  288. tclCmdIL.o: $(SRC_DIR)/patchlevel.h
  289.