- register struct file_list *fl;
-
- for (fl = conf_list; fl != NULL; fl = fl->f_next)
- {
- fprintf(f, "%s: makefile locore.o ${OBJS} ioconf.o param.o swap%s.o\n",
- fl->f_needs, fl->f_fn);
- fprintf(f, "\t@echo loading %s\n\t@rm -f %s\n\t",
- fl->f_needs, fl->f_needs);
- fprintf(f,
- "@ld -n -o %s -e start -x -T 80000000 locore.o ${OBJS} ioconf.o param.o swap%s.o\n",
- fl->f_needs, fl->f_fn);
- fprintf(f, "\t@echo rearranging symbols\n");
- fprintf(f, "\t@-symorder ../sys/symbols.sort %s\n", 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 != NULL; fl = fl->f_next)
- {
- fprintf(f, "swap%s.o: ../dev/swap%s.c\n", fl->f_fn, fl->f_fn);
- fprintf(f, "\t${CC} -I. -c -S ${COPTS} ../dev/swap%s.c\n", fl->f_fn);
- fprintf(f,
- "\t${C2} swap%s.s | sed -f ../sys/asm.sed | ${AS} -o swap%s.o\n",
- fl->f_fn, fl->f_fn);
- fprintf(f, "\trm -f swap%s.s\n\n", fl->f_fn);
- }
- fprintf(f, "all:");
- for (fl = conf_list; fl != NULL; fl = fl->f_next)
- fprintf(f, " %s", fl->f_needs);
- putc('\n', f);
+ register struct file_list *fl;
+ 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");