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 / Makefile next >
Makefile  |  2000-03-20  |  5KB  |  148 lines

  1. ##
  2. ## $Id: Makefile,v 1.2 2000/03/21 04:40:45 cph Exp $
  3. ##
  4. ## WARNING: This makefile is designed to be used only from the master
  5. ## makefile in the parent directory.
  6.  
  7. #_______________________________________________________________________
  8. #
  9. # How this makefile works.
  10. #
  11. # This makefile builds four libraries.  Two are based directly on
  12. # Tk/Tcl.  The other two are an interface between Scheme, X and
  13. # Tk/Tcl.
  14. #
  15. # The build process works by customizing an off-the-shelf version of tk
  16. # (currently version 3.2).  The SWAT versions of some of the files are
  17. # copied over the off-the-shelf version.  The customized version is
  18. # compiled to produce the libtk.a and libtcl.a libraries.  These
  19. # libraries are not acutally used but they ensure that all the targets
  20. # that we are interested in are up to date.  Then we construct our own
  21. # libraries (tk.sl and tcl.sl).
  22. #
  23. # The other libraries are more straight-forward.
  24. #_______________________________________________________________________
  25.  
  26. # The location of the customized files.  The directory structure matches
  27. # that of tk3.2 and is sparsely populated with customized files:
  28.  
  29. CUSTOM = tk3.2-custom
  30.  
  31. # Important: select a microcode source directory with the correct scheme
  32. # object representation:
  33.  
  34. SCHEME_INCLUDE_DIRS =  -I/scheme/8.0/src/microcode
  35.  
  36. TK =        tk3.2
  37. TCL =       $(TK)/tcl
  38.  
  39. #UITK_INCLUDE_DIRS = -I $(UITK) -I $(UITK_C) -I $(TK) -I $(TCL) $(SCHEME_INCLUDE_DIRS)
  40. UITK_INCLUDE_DIRS = -I $(TK) -I $(TCL) $(SCHEME_INCLUDE_DIRS)
  41. CFLAGS = -DMIT_SCHEME -O  -Ae -D_HPUX -I/usr/include/X11R5 +z
  42.  
  43. XLIB        = -L /usr/lib/X11R5 -lX11
  44.  
  45. # These library paths are overruled by the master makefile.
  46.  
  47. #TK_LIBRARY    = /scheme/8.0/700/swat/c/tk3.2/library
  48. #TCL_LIBRARY    = /scheme/8.0/700/swat/c/tk3.2/tcl/library
  49. TK_LIBRARY    = Built_incorrectly__TK_LIBRARY__not_specified
  50. TCL_LIBRARY    = Built_incorrectly__TCL_LIBRARY__not_specified
  51.  
  52. TCL_GENERIC_OBJS = \
  53.     $(TCL)/regexp.o     $(TCL)/tclAssem.o   $(TCL)/tclBasic.o \
  54.     $(TCL)/tclCkalloc.o $(TCL)/tclCmdAH.o   $(TCL)/tclCmdIL.o \
  55.     $(TCL)/tclCmdMZ.o   $(TCL)/tclExpr.o    $(TCL)/tclGet.o \
  56.     $(TCL)/tclHash.o    $(TCL)/tclHistory.o $(TCL)/tclParse.o \
  57.     $(TCL)/tclProc.o    $(TCL)/tclUtil.o    $(TCL)/tclVar.o
  58.  
  59. TCL_UNIX_OBJS = \
  60.         $(TCL)/panic.o $(TCL)/tclEnv.o $(TCL)/tclGlob.o $(TCL)/tclUnixAZ.o \
  61.     $(TCL)/tclUnixStr.o $(TCL)/tclUnixUtil.o 
  62.  
  63. TCL_OBJS = $(TCL_GENERIC_OBJS) $(TCL_UNIX_OBJS) MITScheme.o
  64.  
  65. TK_WIDGOBJS = \
  66.     $(TK)/tkButton.o $(TK)/tkEntry.o    $(TK)/tkFrame.o $(TK)/tkListbox.o \
  67.     $(TK)/tkMenu.o $(TK)/tkMenubutton.o $(TK)/tkMessage.o $(TK)/tkScale.o \
  68.     $(TK)/tkScrollbar.o
  69.  
  70. TK_CANVOBJS = \
  71.     $(TK)/tkCanvas.o   $(TK)/tkCanvArc.o  $(TK)/tkCanvBmap.o \
  72.     $(TK)/tkCanvLine.o $(TK)/tkCanvPoly.o $(TK)/tkCanvPs.o \
  73.     $(TK)/tkCanvText.o $(TK)/tkCanvWind.o $(TK)/tkRectOval.o $(TK)/tkTrig.o
  74.  
  75. TK_TEXTOBJS = $(TK)/tkText.o $(TK)/tkTextBTree.o $(TK)/tkTextDisp.o \
  76.     $(TK)/tkTextIndex.o $(TK)/tkTextTag.o
  77.  
  78. TK_OBJS = \
  79.     $(TK)/tk3d.o     $(TK)/tkArgv.o  $(TK)/tkAtom.o  $(TK)/tkBind.o \
  80.     $(TK)/tkBitmap.o $(TK)/tkCmds.o  $(TK)/tkColor.o $(TK)/tkConfig.o \
  81.     $(TK)/tkCursor.o $(TK)/tkError.o $(TK)/tkEvent.o $(TK)/tkFocus.o \
  82.     $(TK)/tkFont.o   $(TK)/tkGet.o   $(TK)/tkGC.o    $(TK)/tkGeometry.o \
  83.     $(TK)/tkGrab.o   $(TK)/tkOption.o $(TK)/tkPack.o $(TK)/tkPlace.o \
  84.     $(TK)/tkPreserve.o $(TK)/tkSelect.o $(TK)/tkSend.o $(TK)/tkWindow.o \
  85.     $(TK)/tkWm.o $(TK_WIDGOBJS) $(TK_CANVOBJS) $(TK_TEXTOBJS) MITScheme.o
  86.  
  87. UITK_OBJS = tk-c.o tk-c-mit.o widget-c.o widget-c-mit.o uitk-prims.o
  88. SCXL_OBJS = scxl.o
  89.  
  90. # Contents of custom directory structure:
  91.  
  92. CUSTOM_SRC = \
  93.     $(CUSTOM)/Makefile \
  94.     $(CUSTOM)/tkEvent.c $(CUSTOM)/tkWindow.c \
  95.     $(CUSTOM)/tcl/Makefile $(CUSTOM)/tcl/tclUnix.h \
  96.     $(CUSTOM)/library/emacs.tcl
  97.  
  98. all:  scxl.sl tcl.sl tk.sl uitk.sl
  99.  
  100. scxl.sl: $(SCXL_OBJS)
  101.     rm -f scxl.sl
  102.     ld -b -o scxl.sl  $(SCXL_OBJS) $(XLIB) -lc
  103.  
  104. tcl.sl: $(TCL)/libtcl.a MITScheme.o
  105.     rm -f tcl.sl
  106.     ld -b -o tcl.sl  $(TCL_OBJS) -lc
  107.  
  108. tk.sl: $(TK)/libtk.a MITScheme.o
  109.     rm -f tk.sl
  110.     ld -b -o tk.sl  $(TK_OBJS) $(XLIB) -lm -lc
  111.  
  112. uitk.sl: $(UITK_OBJS)
  113.     rm -f uitk.sl
  114.     ld -b -o uitk.sl  $(UITK_OBJS) -lm -lc
  115.  
  116. scxl.o MITScheme.o uitk-prims.o:
  117.     $(CC) $(CFLAGS) $(SCHEME_INCLUDE_DIRS) -c $*.c
  118.  
  119. MITScheme.o: MITScheme.c
  120. scxl.o: scxl.c
  121. uitk-prims.o: uitk-prims.c
  122.  
  123. widget-c.o widget-c-mit.o tk-c-mit.o: $(TK)/tkInt.h $(TK)/default.h
  124.     $(CC) $(CFLAGS) $(UITK_INCLUDE_DIRS) -c $*.c
  125.  
  126. tk-c.o: tk-c.c $(TK)/tkInt.h $(TK)/default.h
  127.     $(CC) $(CFLAGS) $(UITK_INCLUDE_DIRS) TK_LIBRARY=$(TK_LIBRARY) \
  128.         TCL_LIBRARY=$(TCL_LIBRARY) -c $*.c
  129. widegt-c.o: widget-c.c
  130. widget-c-mit.o: widget-c-mit.c
  131. tk-c-mit.o: tk-c-mit.c
  132.  
  133. #$(TCL_OBJS) $(TK_OBJS): customization
  134. $(TCL)/libtcl.a $(TK)/libtk.a: customization
  135.  
  136. customization: $(CUSTOM_SRC)
  137.     (cd $(TCL); ./config)
  138.     # overwrite standard code with customized files
  139.     cp -f -R tk3.2-custom/* tk3.2
  140.     rm -f $(TK)/libtk.a $(TCL)/libtcl.a
  141.     (cd tk3.2; \
  142.      make -f Makefile TCL_LIBRARY=$(TCL_LIBRARY) TK_LIBRARY=$(TK_LIBRARY) \
  143.                  libtk.a tcl/libtcl.a \
  144.     )
  145.     date > customization
  146.  
  147.  
  148.