X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/c9191830a6d07743b81d9a4d8425b8416a323f73..a7d1b5c25c3eefc2974e6acc5ae26ff0c70d2c2b:/usr/src/usr.sbin/config/mkmakefile.c diff --git a/usr/src/usr.sbin/config/mkmakefile.c b/usr/src/usr.sbin/config/mkmakefile.c index 48fcdf8914..cd7f82b050 100644 --- a/usr/src/usr.sbin/config/mkmakefile.c +++ b/usr/src/usr.sbin/config/mkmakefile.c @@ -5,7 +5,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)mkmakefile.c 5.8 (Berkeley) %G%"; +static char sccsid[] = "@(#)mkmakefile.c 5.13 (Berkeley) %G%"; #endif not lint /* @@ -90,6 +90,7 @@ static struct users { int u_max; } users[] = { { 24, 8, 1024 }, /* MACHINE_VAX */ + { 4, 2, 128 }, /* MACHINE_TAHOE */ }; #define NUSERS (sizeof (users) / sizeof (users[0])) @@ -411,23 +412,34 @@ cont: do_cfiles(fp) FILE *fp; { - register struct file_list *tp; + register struct file_list *tp, *fl; register int lpos, len; + char swapname[32]; - fprintf(fp, "CFILES="); + fputs("CFILES=", fp); lpos = 8; - for (tp = ftab; tp != 0; tp = tp->f_next) { - if (tp->f_type == INVISIBLE) - continue; - if (tp->f_fn[strlen(tp->f_fn)-1] != 'c') - continue; - if ((len = 3 + strlen(tp->f_fn)) + lpos > 72) { - lpos = 8; - fprintf(fp, "\\\n\t"); + for (tp = ftab; tp; tp = tp->f_next) + if (tp->f_type != INVISIBLE) { + len = strlen(tp->f_fn); + if (tp->f_fn[len - 1] != 'c') + continue; + if ((len = 3 + len) + lpos > 72) { + lpos = 8; + fputs("\\\n\t", fp); + } + fprintf(fp, "../%s ", tp->f_fn); + lpos += len + 1; + } + for (fl = conf_list; fl; fl = fl->f_next) + if (fl->f_type == SYSTEMSPEC) { + sprintf(swapname, "swap%s.c", fl->f_fn); + if ((len = 3 + strlen(swapname)) + lpos > 72) { + lpos = 8; + fputs("\\\n\t", fp); + } + fprintf(fp, "../%s/%s ", machinename, swapname); + lpos += len + 1; } - fprintf(fp, "../%s ", tp->f_fn); - lpos += len + 1; - } if (lpos != 8) putc('\n', fp); } @@ -487,6 +499,7 @@ for (ftp = ftab; ftp != 0; ftp = ftp->f_next) { switch (machine) { case MACHINE_VAX: + case MACHINE_TAHOE: fprintf(f, "\t${CC} -c -S ${COPTS} %s../%sc\n", extras, np); fprintf(f, "\t${C2} %ss | ${INLINE} | ${AS} -o %so\n", @@ -500,6 +513,7 @@ for (ftp = ftab; ftp != 0; ftp = ftp->f_next) { switch (machine) { case MACHINE_VAX: + case MACHINE_TAHOE: fprintf(f, "\t${CC} -c -S ${COPTS} %s../%sc\n", extras, np); fprintf(f,"\t${C2} -i %ss | ${INLINE} | ${AS} -o %so\n", @@ -519,6 +533,15 @@ for (ftp = ftab; ftp != 0; ftp = ftp->f_next) { } switch (machine) { + case MACHINE_TAHOE: + fprintf(f, "\t${CC} -c -S %s %s../%sc\n", + COPTS, extras, np); + fprintf(f, "\tex - %ss < ${GPROF.EX}\n", tp); + fprintf(f,"\t${C2} %ss | ${INLINE} | ${AS} -o %so\n", + tp, tp); + fprintf(f, "\trm -f %ss\n\n", tp); + break; + case MACHINE_VAX: fprintf(f, "\t${CC} -c -S %s %s../%sc\n", COPTS, extras, np); @@ -544,24 +567,17 @@ do_load(f) register FILE *f; { register struct file_list *fl; - int first = 1; + register int first; struct file_list *do_systemspec(); - fl = conf_list; - while (fl) { - if (fl->f_type != SYSTEMSPEC) { - fl = fl->f_next; - continue; - } - fl = do_systemspec(f, fl, first); - if (first) - first = 0; - } - fprintf(f, "all:"); - for (fl = conf_list; fl != 0; fl = fl->f_next) + for (first = 1, fl = conf_list; fl; first = 0) + fl = fl->f_type == SYSTEMSPEC ? + do_systemspec(f, fl, first) : fl->f_next; + fputs("all:", f); + for (fl = conf_list; fl; fl = fl->f_next) if (fl->f_type == SYSTEMSPEC) fprintf(f, " %s", fl->f_needs); - fprintf(f, "\n"); + putc('\n', f); } struct file_list * @@ -572,8 +588,8 @@ do_systemspec(f, fl, first) { fprintf(f, "%s: Makefile", fl->f_needs); - if (machine == MACHINE_VAX) - fprintf(f, " ${INLINECMD}", machinename); + if (machine == MACHINE_VAX || machine == MACHINE_TAHOE) + fprintf(f, " ${INLINE}"); fprintf(f, " locore.o ${OBJS} param.o ioconf.o swap%s.o\n", fl->f_fn); fprintf(f, "\t@echo loading %s\n\t@rm -f %s\n", fl->f_needs, fl->f_needs); @@ -586,9 +602,16 @@ do_systemspec(f, fl, first) case MACHINE_VAX: fprintf(f, "\t@${LD} -n -o %s -e start -x -T 80000000 ", fl->f_needs); + fprintf(f, + "locore.o emulate.o ${OBJS} vers.o ioconf.o param.o "); + break; + + case MACHINE_TAHOE: + fprintf(f, "\t@${LD} -n -o %s -e start -x -T C0000800 ", + fl->f_needs); + fprintf(f, "locore.o ${OBJS} vers.o ioconf.o param.o "); break; } - fprintf(f, "locore.o ${OBJS} vers.o ioconf.o param.o "); fprintf(f, "swap%s.o\n", fl->f_fn); fprintf(f, "\t@echo rearranging symbols\n"); fprintf(f, "\t@-symorder ../%s/symbols.sort %s\n", @@ -615,6 +638,7 @@ do_swapspec(f, name) switch (machine) { case MACHINE_VAX: + case MACHINE_TAHOE: fprintf(f, "\t${CC} -c -S ${COPTS} "); fprintf(f, "../%s/swapgeneric.c\n", machinename); fprintf(f, "\t${C2} swapgeneric.s | ${INLINE}");