[10779] | 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 | # |
---|
| 67 | # Root Overlay |
---|
| 68 | # 56KB 8KB |
---|
| 69 | # 48KB 16KB |
---|
| 70 | # 40KB 24KB <-- This arrangement used in 6.0.192 |
---|
| 71 | # 32KB 32KB |
---|
| 72 | # 24KB 40KB |
---|
| 73 | # 16KB 48KB |
---|
| 74 | # 8KB 56KB |
---|
| 75 | # |
---|
| 76 | # The hardest-hit modules should go into the root segment, so top priority |
---|
| 77 | # goes to ckutio and ckufio, the low-level i/o modules. It would also be |
---|
| 78 | # good to put ckcpro and ckucmd in the root segment but they are too big. |
---|
| 79 | # |
---|
| 80 | # Here is the layout for 6.0.192: |
---|
| 81 | # |
---|
| 82 | # % size wermit |
---|
| 83 | # text data bss dec hex |
---|
| 84 | # 34368 25574 26414 86356 15154 total text: 126912 |
---|
| 85 | # overlays: 23936,24512,23872,20224 |
---|
| 86 | # |
---|
| 87 | # This shows root segment text is less than 40K, |
---|
| 88 | # data+bss is less than 52K, and each overlay is less than 24K. |
---|
| 89 | # |
---|
| 90 | ########################################################################### |
---|
| 91 | # |
---|
| 92 | # Compile and Link variables: |
---|
| 93 | # |
---|
| 94 | # EXT is the extension (file type) for object files, normally o. |
---|
| 95 | # EFLAGS is the CFLAGS _without_ the optimize flag (that is added separately). |
---|
| 96 | # The optimizer can not handle a couple modules (ckcpro.c and ckudia.c). |
---|
| 97 | # Sometimes this happens silently -- it just dies. |
---|
| 98 | # In that case there might be a message like: |
---|
| 99 | # Fatal error in /lib/c2 (which is the optimizer) |
---|
| 100 | # mv: x.o: Cannot access: No such file or directory |
---|
| 101 | # NOTE: You can't add any more -D's to these because there is already |
---|
| 102 | # the maximum number of them. See ckcker.h and ckucmd.h for additional |
---|
| 103 | # PDP-11 feature disabling. |
---|
| 104 | EXT=o |
---|
| 105 | OPT=-O |
---|
| 106 | EFLAGS=-DBSD43 -DLCKDIR -DNODEBUG -DNOTLOG -DNODIAL \ |
---|
| 107 | -DNOCSETS -DNOHELP -DNOSCRIPT -DNOSPL -DNOXMIT -DNOSETBUF \ |
---|
| 108 | -DNOMSEND -DNOFRILLS -DNOPARSEN -DNOAPC $(KFLAGS) \ |
---|
| 109 | -DSTR_FILE=\\\"/usr/local/lib/cku192.sr\\\" |
---|
| 110 | LNKFLAGS= -i |
---|
| 111 | CC=./ckustr.sed |
---|
| 112 | CC2=cc |
---|
| 113 | # |
---|
| 114 | ########################################################################### |
---|
| 115 | # |
---|
| 116 | # Dependencies section and overlay structure. |
---|
| 117 | |
---|
| 118 | wermit: ckcmai.$(EXT) ckucmd.$(EXT) ckuusr.$(EXT) ckuus2.$(EXT) \ |
---|
| 119 | ckuus3.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) ckcpro.$(EXT) \ |
---|
| 120 | ckcfns.$(EXT) ckcfn2.$(EXT) ckcfn3.$(EXT) ckuxla.$(EXT) \ |
---|
| 121 | ckucon.$(EXT) ckutio.$(EXT) ckufio.$(EXT) ckudia.$(EXT) \ |
---|
| 122 | ckuscr.$(EXT) ckcnet.$(EXT) ckuus6.$(EXT) ckuus7.$(EXT) \ |
---|
| 123 | ckuusx.$(EXT) ckuusy.$(EXT) ckusig.$(EXT) ckustr.o strings.o |
---|
| 124 | $(CC2) $(LNKFLAGS) -o wermit \ |
---|
| 125 | ckufio.$(EXT) ckutio.$(EXT) ckcmai.$(EXT) ckusig.$(EXT) \ |
---|
| 126 | -Z ckcfns.$(EXT) ckuus3.$(EXT) ckuusy.$(EXT) \ |
---|
| 127 | -Z ckcpro.$(EXT) ckuus4.$(EXT) ckuus5.$(EXT) \ |
---|
| 128 | ckuus6.$(EXT) ckuus2.$(EXT) \ |
---|
| 129 | -Z ckucmd.$(EXT) ckuxla.$(EXT) ckuscr.$(EXT) \ |
---|
| 130 | ckuusr.$(EXT) ckuus7.$(EXT) ckudia.$(EXT) \ |
---|
| 131 | -Z ckcfn2.$(EXT) ckcfn3.$(EXT) ckucon.$(EXT) \ |
---|
| 132 | ckcnet.$(EXT) ckuusx.$(EXT) \ |
---|
| 133 | -Y ckustr.o strings.o $(LIBS) |
---|
| 134 | |
---|
| 135 | strings.o: strings |
---|
| 136 | xstr |
---|
| 137 | cc -c xs.c |
---|
| 138 | mv -f xs.o strings.o |
---|
| 139 | rm -f xs.c |
---|
| 140 | |
---|
| 141 | ########################################################################### |
---|
| 142 | # Dependencies for each module... |
---|
| 143 | # |
---|
| 144 | ckcmai.$(EXT): ckcmai.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcnet.h ckcsig.h |
---|
| 145 | |
---|
| 146 | ckcpro.$(EXT): ckcpro.c ckcker.h ckcdeb.h ckcasc.h |
---|
| 147 | $(CC) CFLAGS=${EFLAGS} -c ckcpro.c |
---|
| 148 | |
---|
| 149 | ckcpro.c: ckcpro.w wart ckcdeb.h ckcasc.h ckcker.h |
---|
| 150 | ./wart ckcpro.w ckcpro.c |
---|
| 151 | |
---|
| 152 | ckcfns.$(EXT): ckcfns.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \ |
---|
| 153 | ckuxla.h |
---|
| 154 | |
---|
| 155 | ckcfn2.$(EXT): ckcfn2.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h ckuxla.h |
---|
| 156 | |
---|
| 157 | ckcfn3.$(EXT): ckcfn3.c ckcker.h ckcdeb.h ckcsym.h ckcasc.h ckcxla.h \ |
---|
| 158 | ckuxla.h |
---|
| 159 | |
---|
| 160 | ckuxla.$(EXT): ckuxla.c ckcker.h ckcdeb.h ckcxla.h ckuxla.h |
---|
| 161 | |
---|
| 162 | ckuusr.$(EXT): ckuusr.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ |
---|
| 163 | ckcasc.h ckcnet.h |
---|
| 164 | |
---|
| 165 | ckuus2.$(EXT): ckuus2.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ |
---|
| 166 | ckcasc.h |
---|
| 167 | |
---|
| 168 | ckuus3.$(EXT): ckuus3.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ |
---|
| 169 | ckcasc.h ckcnet.h |
---|
| 170 | |
---|
| 171 | ckuus4.$(EXT): ckuus4.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ |
---|
| 172 | ckcasc.h ckcnet.h |
---|
| 173 | |
---|
| 174 | ckuus5.$(EXT): ckuus5.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h |
---|
| 175 | |
---|
| 176 | ckuus6.$(EXT): ckuus6.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcasc.h |
---|
| 177 | |
---|
| 178 | ckuus7.$(EXT): ckuus7.c ckucmd.h ckcker.h ckuusr.h ckcdeb.h ckcxla.h ckuxla.h \ |
---|
| 179 | ckcasc.h ckcnet.h |
---|
| 180 | |
---|
| 181 | ckuusx.$(EXT): ckuusx.c ckcker.h ckuusr.h ckcdeb.h ckcasc.h ckcsig.h |
---|
| 182 | |
---|
| 183 | ckuusy.$(EXT): ckuusy.c ckcker.h ckcdeb.h ckcasc.h |
---|
| 184 | |
---|
| 185 | ckucmd.$(EXT): ckucmd.c ckcasc.h ckucmd.h ckcdeb.h |
---|
| 186 | |
---|
| 187 | ckufio.$(EXT): ckufio.c ckcdeb.h ckuver.h |
---|
| 188 | |
---|
| 189 | ckutio.$(EXT): ckutio.c ckcdeb.h ckcnet.h ckuver.h |
---|
| 190 | |
---|
| 191 | ckucon.$(EXT): ckucon.c ckcker.h ckcdeb.h ckcasc.h ckcnet.h ckcsig.h |
---|
| 192 | |
---|
| 193 | ckcnet.$(EXT): ckcnet.c ckcdeb.h ckcker.h ckcnet.h ckcsig.h |
---|
| 194 | |
---|
| 195 | wart: ckwart.$(EXT) |
---|
| 196 | $(CC) $(LNKFLAGS) -o wart ckwart.$(EXT) |
---|
| 197 | |
---|
| 198 | ckcmdb.$(EXT): ckcmdb.c ckcdeb.h |
---|
| 199 | |
---|
| 200 | ckwart.$(EXT): ckwart.c |
---|
| 201 | |
---|
| 202 | ckudia.$(EXT): ckudia.c ckcker.h ckcdeb.h ckucmd.h ckcasc.h ckcsig.h |
---|
| 203 | $(CC) CFLAGS=${EFLAGS} -c ckudia.c |
---|
| 204 | |
---|
| 205 | ckuscr.$(EXT): ckuscr.c ckcker.h ckcdeb.h ckcasc.h ckcsig.h |
---|
| 206 | |
---|
| 207 | ckusig.$(EXT): ckusig.c ckcsig.h ckcasc.h ckcdeb.h ckcker.h ckcnet.h ckuusr.h |
---|
| 208 | |
---|
| 209 | #2.11BSD |
---|
| 210 | # |
---|
| 211 | bsd211: |
---|
| 212 | @echo "Making C-Kermit $(CKVER) for 2.10/2.11BSD with overlays..." |
---|
| 213 | @echo -n "Be sure to install cku192.sr with the same pathname" |
---|
| 214 | @echo " specified in ckustr.c!" |
---|
| 215 | chmod +x ckustr.sed |
---|
| 216 | make wermit CFLAGS="${OPT} ${EFLAGS}" LIBS=-lstubs |
---|
| 217 | |
---|
| 218 | #2.10BSD |
---|
| 219 | # |
---|
| 220 | bsd210: |
---|
| 221 | @echo -n "Be sure to install ctimed with the same pathname" |
---|
| 222 | @echo " specified in ckustr.c for STR_CTIMED!" |
---|
| 223 | @echo "Making C-Kermit $(CKVER) for 2.10/2.11BSD with overlays..." |
---|
| 224 | @echo -n "Be sure to install cku192.sr with the same pathname" |
---|
| 225 | @echo " specified in ckustr.c!" |
---|
| 226 | chmod +x ckustr.sed |
---|
| 227 | make wermit CFLAGS="${OPT} ${EFLAGS} \ |
---|
| 228 | -DSTR_CTIMED=\\\"/usr/lib/ctimed\\\"" |
---|
| 229 | |
---|
| 230 | ctimed: |
---|
| 231 | $(CC2) $OPT $(EFLAGS) $(LNKFLAGS) -o ctimed cku2tm.c |
---|
| 232 | |
---|
| 233 | #Clean up intermediate and object files |
---|
| 234 | clean: |
---|
| 235 | @echo 'Removing intermediate files...' |
---|
| 236 | -rm -f *.$(EXT) ckcpro.c wart strings cku192.sr ctimed wermit xs.c |
---|
| 237 | -rm -f xxmk.c mk.c x.c |
---|