home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / c-kermit / ckubs2.mak < prev    next >
Text File  |  2020-01-01  |  11KB  |  286 lines

  1. # CKUBS2.MAK Sun May 23 11:52:55 1999
  2. #
  3. CKVER= "7.0.195 Beta.07"
  4. #
  5. # Abbreviated version for 2.10 / 2.11 BSD, which chokes on full-size makefile
  6. # because "Make: out of memory".
  7. #
  8. # C-Kermit 6.0 was the last version that could be built with an interactive
  9. # command parser under the 2.11 BSD memory model -- it fit into the overlay
  10. # structure with only a few bytes to spare.
  11. #
  12. # C-Kermit 7.0 and later can be built only in command-line form.
  13. #
  14. # Instructions:
  15. #   1. Make sure there are no other files called "makefile" or "Makefile"
  16. #      in the same directory.
  17. #   2. Change the name of this file to "makefile".
  18. #   3. Read below about the strings file.
  19. #   4. "make bsd211" (for interactive version) or
  20. #      "make bsd211noicp" (for command-line-only version).
  21. #   5. If you are not on a system with /usr/lib/ctimed (2.10BSD for example),
  22. #      type "make bsd210" (which will compile cku2tm.c into 'ctimed')
  23. #      and then install 'ctimed' in the right place (default is /usr/lib).
  24. #   6. 2.11BSD includes ctimed and the necessary stub routines.  The 'ctimed'
  25. #      path is in <paths.h>.  The "libstubs.a" (obtained via a "-lstubs" at
  26. #      link time) contains the stub routines.
  27. #
  28. # Authors: Frank da Cruz, Columbia University, fdc@columbia.edu,
  29. # and Steven M Schultz, sms@wlv.iipo.gtegsc.com.
  30. #
  31. # Modified 4 July 1992 to reshuffle overlays (because the first one got too
  32. #   big) and to improve the method of defining the string file.  fdc.
  33. # And again 23 Aug 1992.  fdc.
  34. # And again 06 Sep 1992 to work around ckudia.c blowing up optimizers.  sms.
  35. # And again 09 Sep 1992 to incorporate cku2tm.c and new ckustr.c.  sms.
  36. # & again 19 Sep 92 to add -DMINIDIAL to reduce size of DIAL module.  fdc.
  37. # & again 7 Nov 92 because two of the segments got too big.  fdc.
  38. # & again 15-18 Apr 94, ditto, fdc.
  39. # + again 11-13 Jun 96, for version 6.0.192, fdc.
  40. # 18 Jul 96 to incorporate new 'ctimed' and stubs, sms.
  41. # 22 Aug 96 to reshuffle overlays, fdc.
  42. # 23 May 99 for C-Kermit 7.0: add new modules and command-line-only build, fdc.
  43. ###########################################################################
  44. #
  45. # 2.10BSD and 2.11BSD (the latter to a larger extent) are the same as 4.3BSD
  46. # but without a large address space.
  47. #
  48. # A string extraction method is used to put approx. 16KB of strings into a
  49. # file.  The module ckustr.c needs to find this file when C-Kermit runs.
  50. # The pathname where this file will reside is defined below (change it if
  51. # necessary).  After make is finished, the file cku195.sr must be moved to
  52. # where ckustr.c has been told to look for it, or you can define an
  53. # environment variable KSTR to override the built-in pathname, for example:
  54. #
  55. #  setenv KSTR `pwd`/cku195.sr
  56. #
  57. # If the resulting wermit program sprews garbage all over your screen, it's
  58. # because it is reading the wrong strings file.
  59. #
  60. # If the resulting wermit program doesn't run at all because UNIX says it
  61. # is too big, it's most likely because the data segment, the root segment,
  62. # or one of the overlays is too big.  The sum of the data (mostly strings.o)
  63. # and bss (mostly static buffers) sizes must be less than about 52K (56K is
  64. # the maximum, but about 4K is needed for stdio buffers that are added in at
  65. # runtime).  If the combined data+bss size exceeds 52K, start chopping away
  66. # at static buffers.  When it is borderline (> 52K but < 56K), performance
  67. # will be terrible -- screen output will be very slow and jerky because
  68. # stdio functions are doing a system call per character because they could
  69. # not allocate any buffers.
  70. #
  71. # The maximum number of overlays is 15, but the fewer overlays, the better
  72. # the peformance.  The smaller the root segment, the bigger the overlays can
  73. # be:
  74. #
  75. #   Root   Overlay
  76. #   56KB     8KB
  77. #   48KB    16KB
  78. #   40KB    24KB  <--  This arrangement used in 6.0.192
  79. #   32KB    32KB
  80. #   24KB    40KB
  81. #   16KB    48KB
  82. #    8KB    56KB
  83. #
  84. # The hardest-hit modules should go into the root segment, so top priority
  85. # goes to ckutio and ckufio, the low-level i/o modules.  It would also be
  86. # good to put ckcpro and ckucmd in the root segment but they are too big.
  87. #
  88. # Here is the layout for 6.0.192:
  89. #
  90. # % size wermit
  91. # text    data    bss     dec     hex
  92. # 34368   25574   26414   86356   15154   total text: 126912
  93. #         overlays: 23936,24512,23872,20224
  94. #
  95. # This shows root segment text is less than 40K,
  96. # data+bss is less than 52K, and each overlay is less than 24K.
  97. #
  98. ###########################################################################
  99. #
  100. # Compile and Link variables:
  101. #
  102. # EXT is the extension (file type) for object files, normally o.
  103. # EFLAGS is the CFLAGS _without_ the optimize flag (that is added separately).
  104. #  The optimizer can not handle a couple modules (ckcpro.c and ckudia.c).
  105. #  Sometimes this happens silently -- it just dies.
  106. #  In that case there might be a message like:
  107. #    Fatal error in /lib/c2 (which is the optimizer)
  108. #    mv: x.o: Cannot access: No such file or directory
  109. # NOTE: You can't add any more -D's to these because there is already
  110. #  the maximum number of them.  See ckcker.h and ckucmd.h for additional
  111. #  PDP-11 feature disabling.
  112. EXT=o
  113. OPT=-O
  114. EFLAGS=-DBSD43 -DLCKDIR -DNODEBUG -DNOTLOG -DNODIAL \
  115.     -DNOCSETS -DNOHELP -DNOSCRIPT -DNOSPL -DNOXMIT -DNOSETBUF \
  116.     -DNOMSEND -DNOFRILLS -DNOPARSEN -DNOAPC $(KFLAGS) \
  117.     -DSTR_FILE=\\\"/usr/local/lib/cku195.sr\\\"
  118. LNKFLAGS= -i
  119. CC=./ckustr.sed
  120. CC2=cc
  121. #
  122. ###########################################################################
  123. #
  124. # Dependencies section and overlay structure for the command-line only version.
  125.  
  126. wermit: ckcmai.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
  127.     ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckcpro.$(EXT) \
  128.     ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
  129.     ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
  130.     ckuscr.$(EXT) ckcnet.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \
  131.     ckuusx.$(EXT) ckuusy.$(EXT) ckusig.$(EXT) ckustr.o strings.o \
  132.     ckctel.$(EXT) ckclib.$(EXT)
  133.     $(CC2) $(LNKFLAGS) -o wermit \
  134.         ckutio.$(EXT) ckusig.$(EXT)  \
  135.          -Z ckcfns.$(EXT) ckuus3.$(EXT) ckuusy.$(EXT) \
  136.                     ckclib.$(EXT) ckcmai.$(EXT) \
  137.          -Z ckcpro.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
  138.             ckuus6.$(EXT) ckuus2.$(EXT) ckctel.$(EXT) \
  139.          -Z ckucmd.$(EXT) ckuxla.$(EXT) ckuscr.$(EXT) \
  140.             ckuusr.$(EXT) ckuus7.$(EXT) ckudia.$(EXT) \
  141.             ckcfn2.$(EXT) ckcfn3.$(EXT) \
  142.          -Z ckcnet.$(EXT) ckuusx.$(EXT) ckufio.$(EXT) ckucon.$(EXT) \
  143.          -Y ckustr.o strings.o $(LIBS)
  144.  
  145. # This is for the interactive version, which is too big as of C-Kermit 7.0.
  146.  
  147. wermiti: ckcmai.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \
  148.     ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckcpro.$(EXT) \
  149.     ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \
  150.     ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \
  151.     ckuscr.$(EXT) ckcnet.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \
  152.     ckuusx.$(EXT) ckuusy.$(EXT) ckusig.$(EXT) ckustr.o strings.o
  153.     $(CC2) $(LNKFLAGS) -o wermit \
  154.         ckufio.$(EXT) ckutio.$(EXT) ckcmai.$(EXT) ckusig.$(EXT)  \
  155.          -Z ckcfns.$(EXT) ckuus3.$(EXT) ckuusy.$(EXT) \
  156.          -Z ckcpro.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \
  157.             ckuus6.$(EXT) ckuus2.$(EXT) \
  158.          -Z ckucmd.$(EXT) ckuxla.$(EXT) ckuscr.$(EXT) \
  159.             ckuusr.$(EXT) ckuus7.$(EXT) ckudia.$(EXT) \
  160.          -Z ckcfn2.$(EXT) ckcfn3.$(EXT) ckucon.$(EXT) \
  161.             ckcnet.$(EXT) ckuusx.$(EXT) \
  162.          -Y ckustr.o strings.o $(LIBS)
  163.  
  164. strings.o: strings
  165.     xstr
  166.     cc -c xs.c
  167.     mv -f xs.o strings.o
  168.     rm -f xs.c
  169.  
  170. ###########################################################################
  171. # Dependencies for each module...
  172. #
  173. ckcmai.$(EXT): ckcmai.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcnet.h ckcsig.h \
  174.         ckctel.h ckclib.h
  175.  
  176. ckclib.$(EXT): ckclib.c ckclib.h ckcdeb.h ckcasc.h ckcsym.h
  177.  
  178. ckcpro.$(EXT): ckcpro.c ckcker.h ckcdeb.h ckcasc.h ckctel.h ckclib.h
  179.     $(CC) CFLAGS=${EFLAGS} -c ckcpro.c
  180.  
  181. ckcpro.c: ckcpro.w wart ckcdeb.h ckcasc.h ckcker.h
  182.     ./wart ckcpro.w ckcpro.c
  183.  
  184. ckcfns.$(EXT): ckcfns.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \
  185.         ckuxla.h ckctel.h ckclib.h
  186.  
  187. ckcfn2.$(EXT): ckcfn2.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h ckuxla.h \
  188.         ckctel.h ckclib.h
  189.  
  190. ckcfn3.$(EXT): ckcfn3.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \
  191.         ckuxla.h ckctel.h ckclib.h
  192.  
  193. ckuxla.$(EXT): ckuxla.c ckcker.h ckcdeb.h ckcxla.h ckuxla.h ckctel.h ckclib.h
  194.  
  195. ckuusr.$(EXT): ckuusr.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
  196.         ckcasc.h ckcnet.h ckctel.h ckclib.h
  197.  
  198. ckuus2.$(EXT): ckuus2.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
  199.         ckcasc.h ckctel.h ckclib.h
  200.  
  201. ckuus3.$(EXT): ckuus3.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
  202.         ckcasc.h ckcnet.h ckctel.h ckclib.h
  203.  
  204. ckuus4.$(EXT): ckuus4.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
  205.         ckcasc.h ckcnet.h ckctel.h ckclib.h
  206.  
  207. ckuus5.$(EXT): ckuus5.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h \
  208.         ckctel.h ckclib.h
  209.  
  210. ckuus6.$(EXT): ckuus6.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h \
  211.         ckctel.h ckclib.h
  212.  
  213. ckuus7.$(EXT): ckuus7.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \
  214.         ckcasc.h ckcnet.h ckctel.h ckclib.h
  215.  
  216. ckuusx.$(EXT): ckuusx.c  ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcsig.h \
  217.         ckctel.h ckclib.h
  218.  
  219. ckuusy.$(EXT): ckuusy.c  ckcker.h ckcdeb.h ckcasc.h ckctel.h ckclib.h
  220.  
  221. ckucmd.$(EXT): ckucmd.c ckcasc.h ckucmd.h ckcdeb.h ckctel.h ckclib.h
  222.  
  223. ckufio.$(EXT): ckufio.c ckcdeb.h ckuver.h ckctel.h ckclib.h
  224.  
  225. ckutio.$(EXT): ckutio.c ckcdeb.h ckcnet.h ckuver.h ckctel.h ckclib.h
  226.  
  227. ckucon.$(EXT): ckucon.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsig.h \
  228.         ckctel.h ckclib.h
  229.  
  230. ckcnet.$(EXT): ckcnet.c ckcdeb.h ckcker.h ckcnet.h ckcsig.h ckctel.h ckclib.h
  231.  
  232. ckctel.$(EXT): ckcsym.h ckcdeb.h ckcker.h ckcnet.h ckctel.h ckclib.h
  233.  
  234. wart: ckwart.$(EXT)
  235.     $(CC) $(LNKFLAGS) -o wart ckwart.$(EXT)
  236.  
  237. ckcmdb.$(EXT): ckcmdb.c ckcdeb.h
  238.  
  239. ckwart.$(EXT): ckwart.c
  240.  
  241. ckudia.$(EXT): ckudia.c ckcker.h ckcdeb.h ckucmd.h ckcasc.h ckcsig.h \
  242.         ckctel.h ckclib.h
  243.     $(CC) CFLAGS=${EFLAGS} -c ckudia.c
  244.  
  245. ckuscr.$(EXT): ckuscr.c ckcker.h ckcdeb.h ckcasc.h ckcsig.h ckctel.h ckclib.h
  246.  
  247. ckusig.$(EXT): ckusig.c ckcsig.h ckcasc.h ckcdeb.h ckcker.h ckcnet.h ckuusr.h \
  248.         ckctel.h ckclib.h
  249.  
  250. #2.11BSD
  251. #
  252. bsd211:
  253.     @echo "Making C-Kermit $(CKVER) for 2.10/2.11BSD with overlays..."
  254.     @echo -n "Be sure to install cku195.sr with the same pathname"
  255.     @echo " specified in ckustr.c!"
  256.     chmod +x ckustr.sed
  257.     make wermiti CFLAGS="${OPT} ${EFLAGS}" LIBS=-lstubs
  258.  
  259. bsd211noicp:
  260.     @echo "Making C-Kermit $(CKVER) for 2.10/2.11BSD NOICP..."
  261.     @echo -n "Be sure to install cku195.sr with the same pathname"
  262.     @echo " specified in ckustr.c!"
  263.     chmod +x ckustr.sed
  264.     make wermit CFLAGS="${OPT} ${EFLAGS} -DNOICP" LIBS=-lstubs
  265.  
  266. #2.10BSD
  267. #
  268. bsd210:
  269.     @echo -n "Be sure to install ctimed with the same pathname"
  270.     @echo " specified in ckustr.c for STR_CTIMED!"
  271.     @echo "Making C-Kermit $(CKVER) for 2.10/2.11BSD with overlays..."
  272.     @echo -n "Be sure to install cku195.sr with the same pathname"
  273.     @echo " specified in ckustr.c!"
  274.     chmod +x ckustr.sed
  275.     make wermiti CFLAGS="${OPT} ${EFLAGS} \
  276.             -DSTR_CTIMED=\\\"/usr/lib/ctimed\\\""
  277.  
  278. ctimed:
  279.     $(CC2) $OPT $(EFLAGS) $(LNKFLAGS) -o ctimed cku2tm.c
  280.  
  281. #Clean up intermediate and object files
  282. clean:
  283.     @echo 'Removing intermediate files...'
  284.     -rm -f *.$(EXT) ckcpro.c wart strings cku195.sr ctimed wermit xs.c
  285.     -rm -f xxmk.c mk.c x.c
  286.