- int first = 1;
-
- for (fl = conf_list; fl != 0; fl = fl->f_next) {
- fprintf(f, "%s: makefile locore.o ${OBJS} param.o",
- fl->f_needs);
- fprintf(f, " 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);
- if (first) {
- first = 0;
- fprintf(f, "\t@sh ../conf/newvers.sh\n");
- fprintf(f, "\t@${CC} $(CFLAGS) -c vers.c\n");
- }
- switch (machine) {
-
- case MACHINE_VAX:
- fprintf(f, "\t@${LD} -n -o %s -e start -x -T 80000000 ",
- fl->f_needs);
- fprintf(f, "locore.o ${OBJS} vers.o ioconf.o param.o ");
- fprintf(f, "swap%s.o\n", fl->f_fn);
- break;
-
- case MACHINE_SUN:
- fprintf(f, "\t@${LD} -o %s -e start -x -T 4000 ",
- fl->f_needs);
- fprintf(f, "locore.o ${OBJS} vers.o ioconf.o param.o ");
- fprintf(f, "swap%s.o\n", fl->f_fn);
- break;
- }
- fprintf(f, "\t@echo rearranging symbols\n");
- fprintf(f, "\t@-symorder ../%s/symbols.sort %s\n",
- machinename, fl->f_needs);
- fprintf(f, "\t@size %s\n", fl->f_needs);
- fprintf(f, "\t@chmod 755 %s\n\n", fl->f_needs);
- }
- for (fl = conf_list; fl != 0; fl = fl->f_next) {
- fprintf(f, "swap%s.o: ../%s/swap%s.c\n",
- fl->f_fn, machinename, fl->f_fn);
- switch (machine) {
-
- case MACHINE_VAX:
- fprintf(f, "\t${CC} -I. -c -S ${COPTS}");
- fprintf(f, " ../%s/swap%s.c\n", machinename, fl->f_fn);
- fprintf(f, "\t${C2} swap%s.s | sed -f ../%s/asm.sed",
- fl->f_fn, machinename);
- fprintf(f, " | ${AS} -o swap%s.o\n",
- fl->f_fn);
- fprintf(f, "\trm -f swap%s.s\n\n", fl->f_fn);
- break;
-
- case MACHINE_SUN:
- fprintf(f, "\t${CC} -I. -c -O ${COPTS} ");
- fprintf(f, "../%s/swap%s.c\n\n", machinename, fl->f_fn);
- break;
- }
- }
- fprintf(f, "all:");
- for (fl = conf_list; fl != 0; fl = fl->f_next)
- fprintf(f, " %s", fl->f_needs);
- fprintf(f, "\n");
+ register int first;
+ struct file_list *do_systemspec();
+
+ 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);
+ putc('\n', f);
+}
+
+struct file_list *
+do_systemspec(f, fl, first)
+ FILE *f;
+ register struct file_list *fl;
+ int first;
+{
+
+ fprintf(f, "%s: ${SYSTEM_DEP} swap%s.o", fl->f_needs, fl->f_fn);
+ fprintf(f, "\n\t${SYSTEM_LD_HEAD}\n");
+ fprintf(f, "\t${SYSTEM_LD} swap%s.o\n", fl->f_fn);
+ fprintf(f, "\t${SYSTEM_LD_TAIL}\n\n");
+ do_swapspec(f, fl->f_fn);
+ for (fl = fl->f_next; fl && fl->f_type == SWAPSPEC; fl = fl->f_next)
+ ;
+ return (fl);
+}
+
+do_swapspec(f, name)
+ FILE *f;
+ register char *name;
+{
+
+ if (!eq(name, "generic"))
+ fprintf(f, "swap%s.o: swap%s.c\n", name, name);
+ else
+ fprintf(f, "swapgeneric.o: ../%s/swapgeneric.c\n",
+ machinename);
+ fprintf(f, "\t${NORMAL_C}\n\n");