home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / swat / c / tk3.2-custom / Makefile next >
Makefile  |  1995-08-02  |  5KB  |  151 lines

  1. #
  2. # This is a simplified Makefile for use in Tk distributions.  Before using
  3. # it to compile Tk, you may wish to reset some of the following variables:
  4. #
  5. # TCL_DIR -        Name of directory holding tcl.h and tcl.a.
  6. # XLIB -        If your Xlib library isn't in the standard place,
  7. #            you can replace "-lX11" with the name of the file
  8. #            containing your library archive.
  9. # INSTALL_DIR -        Full path name of top-level directory where
  10. #            information is installed.
  11. # TK_LIBRARY -        Full path name of directory to contain scripts
  12. #            and other library files used by Tk.  This value
  13. #            is available to applications as the variable
  14. #            $tk_library.  If the environment variable
  15. #            TK_LIBRARY is defined by a user, it will override
  16. #            the value specified in this Makefile.
  17. # LIB_DIR -        Directory in which to install the archive libtcl.a
  18. # BIN_DIR -        Directory in which to install executables such as wish.
  19. # INCLUDE_DIR -        Directory in which to install header files.
  20. # MANx_DIR -        Directories in which to install manual entries.
  21. # RANLIB -        If you're using a System-V-based UNIX that doesn't
  22. #            have ranlib, change this definition to "echo" or
  23. #            something else harmless.
  24. # SHELL -        Some versions of make (e.g. SGI's) use this variable
  25. #            to determine which shell to use for executing
  26. #            commands.
  27. #
  28.  
  29. TCL_DIR        = tcl
  30. XLIB        = -lX11
  31. INSTALL_DIR    = /usr/local
  32. LIB_DIR        = $(INSTALL_DIR)/lib
  33. TK_LIBRARY    = $(INSTALL_DIR)/lib/tk
  34. BIN_DIR        = $(INSTALL_DIR)/bin
  35. INCLUDE_DIR    = $(INSTALL_DIR)/include
  36. MAN1_DIR    = $(INSTALL_DIR)/man/man1
  37. MAN3_DIR    = $(INSTALL_DIR)/man/man3
  38. MANN_DIR    = $(INSTALL_DIR)/man/mann
  39. RANLIB        = ranlib
  40. SHELL        = /bin/sh
  41.  
  42. # ANSI-C procedure prototypes are turned on by default if supported
  43. # by the compiler.  To turn them off, uncomment the following line:
  44.  
  45. # NP =        -DNO_PROTOTYPE
  46.  
  47. # To compile under OpenWindows, uncomment the following line:
  48.  
  49. # OW =        -I/usr/openwin/include -L/usr/openwin/lib
  50. CC        = cc
  51. CFLAGS        = -I. -I$(TCL_DIR) -O -DTK_LIBRARY=\"${TK_LIBRARY}\" +z \
  52.     ${NP} ${OW}
  53.  
  54. LIBS = libtk.a $(TCL_DIR)/libtcl.a
  55.  
  56. WIDGOBJS = tkButton.o tkEntry.o tkFrame.o tkListbox.o \
  57.     tkMenu.o tkMenubutton.o tkMessage.o tkScale.o \
  58.     tkScrollbar.o
  59.  
  60. CANVOBJS = tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvLine.o \
  61.     tkCanvPoly.o tkCanvPs.o tkCanvText.o tkCanvWind.o \
  62.     tkRectOval.o tkTrig.o
  63.  
  64. TEXTOBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextIndex.o tkTextTag.o
  65.  
  66. OBJS = tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkCmds.o \
  67.     tkColor.o tkConfig.o tkCursor.o tkError.o tkEvent.o \
  68.     tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o \
  69.         tkOption.o tkPack.o tkPlace.o tkPreserve.o tkSelect.o \
  70.         tkSend.o tkWindow.o tkWm.o $(WIDGOBJS) \
  71.     $(CANVOBJS) $(TEXTOBJS)
  72.  
  73. WIDGSRCS = tkButton.c tkEntry.c tkFrame.c tkListbox.c \
  74.     tkMenu.c tkMenubutton.c tkMessage.c tkScale.c \
  75.     tkScrollbar.c tkText.c tkTextBTree.c tkTextDisp.c \
  76.     tkTextIndex.c
  77.  
  78. CANVSRCS = tkCanvas.c tkCanvArc.c tkCanvBmap.c tkCanvLine.c \
  79.     tkCanvPoly.c tkCanvPs.c tkCanvText.c tkCanvWind.c \
  80.     tkRectOval.c tkTrig.c
  81.  
  82. TEXTSRCS = tkText.c tkTextBTree.c tkTextDisp.c tkTextIndex.c tkTextTag.c
  83.  
  84. SRCS = tk3d.c tkArgv.c tkAtom.c tkBind.c tkBitmap.c tkCmds.c \
  85.     tkColor.c tkConfig.c tkCursor.c tkError.c tkEvent.c \
  86.     tkFocus.c tkFont.c tkGet.c tkGC.c tkGeometry.c tkGrab.c \
  87.         tkOption.c tkPack.c tkPlace.c tkPreserve.c tkSelect.c \
  88.         tkSend.c tkWindow.c tkWm.c $(WIDGSRCS) \
  89.     $(CANVSRCS) $(TEXTSRCS)
  90.  
  91. all: libtk.a wish
  92.  
  93. wish: main.o $(LIBS)
  94.     $(CC) $(CFLAGS) main.o $(LIBS) $(XLIB) -lm -o wish
  95.  
  96. libtk.a: $(OBJS)
  97.     rm -f libtk.a
  98.     ar cr libtk.a $(OBJS)
  99.     $(RANLIB) libtk.a
  100.  
  101. $(TCL_DIR)/libtcl.a:
  102.     cd $(TCL_DIR); $(MAKE) $(MFLAGS) TCL_LIBRARY=$(TCL_LIBRARY) libtcl.a
  103.  
  104. install: libtk.a wish $(TCL_DIR)/libtcl.a
  105.     -if [ ! -d $(LIB_DIR) ] ; then mkdir -p $(LIB_DIR); fi
  106.     -if [ ! -d $(INCLUDE_DIR) ] ; then mkdir -p $(INCLUDE_DIR); fi
  107.     -if [ ! -d $(TK_LIBRARY) ] ; then mkdir -p $(TK_LIBRARY); fi
  108.     -if [ ! -d $(BIN_DIR) ] ; then mkdir -p $(BIN_DIR); fi
  109.     -if [ ! -d $(MAN1_DIR) ] ; then mkdir -p $(MAN1_DIR); fi
  110.     -if [ ! -d $(MAN3_DIR) ] ; then mkdir -p $(MAN3_DIR); fi
  111.     -if [ ! -d $(MANN_DIR) ] ; then mkdir -p $(MANN_DIR); fi
  112.     rm -rf $(TK_LIBRARY)/*
  113.     cp -r library/*.tcl library/tclIndex library/demos $(TK_LIBRARY)
  114.     cp library/prolog.ps $(TK_LIBRARY)
  115.     rm -f $(LIB_DIR)/libtk.a
  116.     cp libtk.a $(LIB_DIR)
  117.     $(RANLIB) $(LIB_DIR)/libtk.a
  118.     rm -f $(BIN_DIR)/wish
  119.     cp wish $(BIN_DIR)
  120.     rm -f $(INCLUDE_DIR)/tk.h
  121.     cp tk.h $(INCLUDE_DIR)
  122.     cd doc; for i in *.1; \
  123.         do \
  124.         rm -f $(MAN1_DIR)/$$i; \
  125.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  126.             $$i > $(MAN1_DIR)/$$i; \
  127.         done; cd ..
  128.     cd doc; for i in *.3; \
  129.         do \
  130.         rm -f $(MAN3_DIR)/$$i; \
  131.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  132.             $$i > $(MAN3_DIR)/$$i; \
  133.         done; cd ..
  134.     cd doc; for i in *.n; \
  135.         do \
  136.         rm -f $(MANN_DIR)/$$i; \
  137.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  138.             $$i > $(MANN_DIR)/$$i; \
  139.         done; cd ..
  140.     cd $(TCL_DIR); $(MAKE) $(MFLAGS) INSTALL_DIR=$(INSTALL_DIR) install
  141.  
  142. clean:
  143.     rm -f $(OBJS) main.o libtk.a wish
  144.     cd $(TCL_DIR); $(MAKE) $(MFLAGS) clean
  145.  
  146. $(OBJS): tk.h tkInt.h tkConfig.h
  147. $(WIDGOBJS): default.h
  148. $(CANVOBJS): default.h tkCanvas.h
  149. $(TEXTOBJS): default.h tkText.h
  150. main.o: tk.h tkInt.h
  151.