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

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