home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / dev / c / cweb / makefile.pc < prev    next >
Encoding:
Makefile  |  1994-12-03  |  7.8 KB  |  257 lines

  1. # This file, makefile.pc, is part of CWEB (Version 3.3 [p11].
  2. # It is distributed WITHOUT ANY WARRANTY, express or implied.
  3. #
  4. # Modified for the Borland Turbo C/C++ 3.1 compiler under MSDOS by
  5. # Andreas Scherer (scherer@genesis.informatik.rwth-aachen.de), July 1994
  6. # Last updated by Andreas Scherer, December 3, 1994
  7.  
  8. # Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
  9. # Copyright (C) 1994 Andreas Scherer
  10.  
  11. # Permission is granted to make and distribute verbatim copies of this
  12. # document provided that the copyright notice and this permission notice
  13. # are preserved on all copies.
  14.  
  15. # Permission is granted to copy and distribute modified versions of this
  16. # document under the conditions for verbatim copying, provided that the
  17. # entire resulting derived work is given a different name and distributed
  18. # under the terms of a permission notice identical to this one.
  19.  
  20. #
  21. # Read the README file, then edit this file to reflect local conditions
  22. #
  23.  
  24. # directory for TeX inputs (cwebmac.tex and (X|d|i)cwebmac.tex go here)
  25. MACROSDIR= macros/
  26.  
  27. # directory for CWEB inputs in @i files
  28. CWEBINPUTS= inputs/
  29.  
  30. # extension for manual pages ("l" distinguishes local from system stuff)
  31. MANEXT= l
  32. #MANEXT= 1
  33.  
  34. # directory for manual pages (cweb.1 goes here)
  35. MANDIR=
  36.  
  37. # destination directory for executables; must end in /
  38. DESTDIR= bin/
  39.  
  40. # directory for GNU EMACS Lips code (cweb.el goes here)
  41. EMACSDIR=
  42.  
  43. # directory for the language header file "cweb.h"
  44. CATINCLUDE= bin/catalogs/
  45.  
  46. # Set DESTPREF to null if you want to call the executables "tangle" and "weave"
  47. # (probably NOT a good idea; we recommend leaving DESTPREF=c)
  48. DESTPREF=c
  49.  
  50. # Set CCHANGES to comm-foo.ch if you need changes to common.w
  51. CCHANGES=common.ch
  52.  
  53. # Set TCHANGES to ctang-foo.ch if you need changes to ctangle.w
  54. TCHANGES=ctangle.ch
  55.  
  56. # Set WCHANGES to cweav-foo.ch if you need changes to cweave.w
  57. WCHANGES=cweave.ch
  58.  
  59. # Set PCHANGES to prod-foo.ch if you need changes to prod.w
  60. PCHANGES=
  61.  
  62. # Set MCHANGES to wmerge-foo.ch if you need changes to wmerge.w
  63. MCHANGES=wmerge.ch
  64.  
  65. # Set EXTENSION to either `c' if you want to treat CWEB as a system
  66. # of ordinary ANSI-C programs, or to `cc', `cxx', `cpp' or similar
  67. # if you want to treat CWEB as a system of C++ programs.  Your
  68. # compiler should be able to distinguish between the two forms
  69. # according to the source file extension.  Even with ANSI-C programs
  70. # it is strongly recommended to use C++ compilers, because of the
  71. # much stricter checking of type conversions and module interfaces.
  72. # For highest portability, all of the extra features of C++ are
  73. # avoided in the CWEB system.
  74. EXTENSION=cc
  75.  
  76. # Compile with symbols.  That way you'll be able to use the debugger if
  77. # you run into trouble.  You can always use tdstrip later, to remove the
  78. # symbols.
  79. DEBUG = -v
  80.  
  81. # Redundant Load Suppression (-Z) is turned off, because it seems to
  82. # break the code.  Likewise for Copy Propagation (-Op).  (These
  83. # optimizations don't seem to cause any problems in common.w, but
  84. # better safe than sorry--compile everything with them turned off.)
  85. OPT = -O2-p -Z- -mc -Ff=5000 -d -w-pro $(DEBUG)
  86.  
  87. # These lists of arguments are specific for BCC.
  88. # Change, add or delete things here to suit your personal conditions.
  89. CFLAGS = -I$(CATINCLUDE) $(OPT) \
  90.     -DCWEBINPUTS="$(CWEBINPUTS)" -D_DEV_NULL="NUL" -DSEPARATORS=";\\:"
  91. LINKFLAGS = $(CFLAGS)
  92.  
  93. # The `f' flag is turned off to save paper
  94. # The `lX' flag includes Xcwebmac.tex
  95. # The `s' flag displays some statistics
  96. WFLAGS=-f +lX +s
  97. TFLAGS=+s
  98.  
  99. # What C compiler are you using?
  100. CC = bcc
  101. LINK = bcc
  102. MAKE = make
  103.  
  104. # RM and CP are used below in case rm and cp are aliased
  105. RM= del
  106. CP= copy
  107. INSTALL= copy
  108.  
  109. ##########  You shouldn't have to change anything after this point #######
  110.  
  111. CWEAVE = cweave
  112. CTANGLE = ctangle
  113. WMERGE = wmerge
  114. SOURCES = cweave.w common.w ctangle.w
  115. ALMOSTALL = common.w ctangle.w wmerge.w makefile readme common.h \
  116.     common.$(EXTENSION) ctangle.$(EXTENSION) wmerge.$(EXTENSION) \
  117.     cwebman.tex cwebmana.ch cweb.1 cweb.man cweb.el prod.w \
  118.     $(CCHANGES) $(CHCHANGES) $(TCHANGES) $(WCHANGES) $(PCHANGES) \
  119.     comm-vms.ch ctang-vms.ch cweav-vms.ch \
  120.     comm-man.ch ctang-man.ch cweav-man.ch \
  121.     makefile.amiga makefile.pc makefile.unix \
  122.     $(MACROSDIR)cwebmac.tex $(MACROSDIR)Xcwebmac.tex \
  123.     $(MACROSDIR)dcwebmac.tex $(MACROSDIR)icwebmac.tex \
  124.     $(CATINCLUDE)cweb.h $(CATINCLUDE)dcweb.h $(CATINCLUDE)icweb.h \
  125.     examples
  126. ALL =  $(ALMOSTALL) cweave.w
  127.  
  128. .SUFFIXES: .dvi .tex .w
  129.  
  130. .w.tex:
  131.     $(CWEAVE) $(WFLAGS) $* $*
  132.  
  133. .tex.dvi:       
  134.     tex $<
  135.  
  136. .w.dvi:
  137.     $(MAKE) $*.tex
  138.     $(MAKE) $*.dvi
  139.  
  140. .$(EXTENSION).obj:
  141.     $(CC) $(CFLAGS) -c $*.$(EXTENSION)
  142.  
  143. # When you say `smake' without any arguments, `smake' will jump to this item
  144. default: ctangle.exe cweave.exe
  145.  
  146. # The complete set of files contains the two programs `ctangle' and
  147. # `cweave' plus the program `wmerge', the manuals `cwebman' and `cwebmana'
  148. # and the source documentations.
  149. all: progs docs
  150.  
  151. # The objects of desire
  152. progs: ctangle.exe cweave.exe wmerge.exe
  153.  
  154. cautiously: $(CTANGLE)
  155.     $(CP) common.$(EXTENSION) SAVEcommon.$(EXTENSION)
  156.     $(CTANGLE) $(TFLAGS) common $(CCHANGES) common.$(EXTENSION)
  157.     diff common.$(EXTENSION) SAVEcommon.$(EXTENSION)
  158.     $(RM) SAVEcommon.$(EXTENSION)
  159.     $(CP) ctangle.$(EXTENSION) SAVEctangle.$(EXTENSION)
  160.     $(CTANGLE) $(TFLAGS) ctangle $(TCHANGES) ctangle.$(EXTENSION)
  161.     diff ctangle.$(EXTENSION) SAVEctangle.$(EXTENSION)
  162.     $(RM) SAVEctangle.$(EXTENSION)
  163.  
  164. SAVEctangle.$(EXTENSION):
  165.     $(CP) ctangle.$(EXTENSION) SAVEctangle.$(EXTENSION)
  166.  
  167. SAVEcommon.$(EXTENSION):
  168.     $(CP) common.$(EXTENSION) SAVEcommon.$(EXTENSION)
  169.  
  170. common.$(EXTENSION): common.w $(CCHANGES)
  171.     $(CTANGLE) $(TFLAGS) common $(CCHANGES) common.$(EXTENSION)
  172.  
  173. common.obj: common.$(EXTENSION) $(CATINCLUDE)cweb.h
  174.  
  175. ctangle.exe: ctangle.obj common.obj
  176.     $(LINK) $(LINKFLAGS) ctangle.obj common.obj
  177.  
  178. ctangle.$(EXTENSION): ctangle.w $(TCHANGES)
  179.     $(CTANGLE) $(TFLAGS) ctangle $(TCHANGES) ctangle.$(EXTENSION)
  180.  
  181. ctangle.obj: ctangle.$(EXTENSION) $(CATINCLUDE)cweb.h common.h
  182.  
  183. cweave.exe: cweave.obj common.obj
  184.     $(LINK) $(LINKFLAGS) cweave.obj common.obj
  185.  
  186. cweave.$(EXTENSION): cweave.w $(WCHANGES)
  187.     $(CTANGLE) $(TFLAGS) cweave $(WCHANGES) cweave.$(EXTENSION)
  188.  
  189. cweave.obj: cweave.$(EXTENSION) $(CATINCLUDE)cweb.h common.h
  190.  
  191. wmerge.exe: wmerge.$(EXTENSION)
  192.     $(CC) $(CFLAGS) wmerge.$(EXTENSION)
  193.  
  194. wmerge.$(EXTENSION): wmerge.w $(MCHANGES)
  195.     $(CTANGLE) $(TFLAGS) wmerge $(MCHANGES) wmerge.$(EXTENSION)
  196.  
  197. # Take a good lecture for bedtime reading
  198. docs: cwebman.dvi cwebmana.dvi common.dvi ctangle.dvi cweave.dvi wmerge.dvi
  199.  
  200. cwebman.dvi: cwebman.tex
  201. cwebmana.dvi: cwebmana.tex
  202. common.dvi: common.tex
  203. ctangle.dvi: ctangle.tex
  204. cweave.dvi: cweave.tex
  205. wmerge.dvi: wmerge.tex
  206.  
  207. usermanual: cwebmana.dvi
  208.  
  209. fullmanual: usermanual $(SOURCES) comm-man.ch ctang-man.ch cweav-man.ch
  210.     $(MAKE) cweave
  211.     $(CWEAVE) common.w comm-man.ch
  212.     $(MAKE) common.dvi
  213.     $(CWEAVE) ctangle.w ctang-man.ch
  214.     $(MAKE) ctangle.dvi
  215.     $(CWEAVE) cweave.w cweav-man.ch
  216.     $(MAKE) cweave.dvi
  217.  
  218. cwebmana.tex: cwebman.tex cwebmana.ch
  219.     $(WMERGE) cwebman.tex cwebmana.ch cwebmana.tex
  220.  
  221. # for making the documentation we will have to include the change files
  222. ctangle.tex: ctangle.w common.h $(TCHANGES)
  223.     $(CWEAVE) $(WFLAGS) ctangle $(TCHANGES)
  224.  
  225. cweave.tex: cweave.w common.h $(WCHANGES)
  226.     $(CWEAVE) $(WFLAGS) cweave $(WCHANGES)
  227.  
  228. common.tex: common.w $(CCHANGES)
  229.     $(CWEAVE) $(WFLAGS) common $(CCHANGES)
  230.  
  231. wmerge.tex: wmerge.w $(MCHANGES)
  232.     $(CWEAVE) $(WFLAGS) wmerge $(MCHANGES)
  233.  
  234. # be sure to leave ctangle.$(EXTENSION) and common.$(EXTENSION)
  235. # and common.h for bootstrapping
  236. clean:
  237.     $(RM) *.obj
  238.     $(RM) *.bak
  239.     $(RM) *.log
  240.     $(RM) *.dvi
  241.     $(RM) *.toc
  242.     $(RM) *.idx
  243.     $(RM) *.scn
  244.     $(RM) *.exe
  245.     $(RM) common.tex 
  246.     $(RM) cweave.tex 
  247.     $(RM) cweave.$(EXTENSION) 
  248.     $(RM) ctangle.tex 
  249.     $(RM) cwebmana.tex 
  250.     $(RM) wmerge.tex 
  251.  
  252. # Install the new program versions where they can be found
  253. install: bin/ctangle bin/cweave bin/wmerge
  254.     $(INSTALL) cweave.exe $(DESTDIR)$(DESTPREF)weave.exe
  255.     $(INSTALL) ctangle.exe $(DESTDIR)$(DESTPREF)tangle.exe
  256.     $(INSTALL) wmerge.exe $(DESTDIR)wmerge.exe
  257.