1# @(#)Makefile 7.17 (Berkeley) 12/26/92 2 3DESTDIR= 4INCPATH=-I. -I../.. 5VPATH= ../../stand 6 7CC=cc 8AS=as 9 10# RELOC=FFF80000 allows for boot prog up to 7F000 (520192) bytes long 11RELOC= FFF80000 12 13CONS= -DDCACONSOLE -DITECONSOLE -DDCMCONSOLE 14DEFS= -DSTANDALONE -DCOMPAT_NOLABEL ${CONS} # -DROMPRF 15CFLAGS= -O ${INCPATH} ${DEFS} 16 17DRIVERS=autoconf.c cons.c ct.c dca.c dcm.c fhpib.c hil.c hpib.c ite.c \ 18 ite_dv.c ite_gb.c ite_hy.c ite_rb.c ite_subr.c ite_tc.c nhpib.c rd.c \ 19 scsi.c sd.c 20SRCS= conf.c label.c machdep.c prf.c ${DRIVERS} 21LIBS= libsa/libsa.a libdrive.a ${DESTDIR}/usr/lib/libgnulib.a \ 22 ${DESTDIR}/usr/lib/libc.a 23 24ALL= dboot nboot tboot tcopy mkboot installboot 25 26all: ${ALL} 27 28dboot nboot tboot tcopy: ${LIBS} 29 30libsa/libsa.a: FRC 31 cd libsa; make 32 33libdrive.a: conf.o label.o machdep.o prf.o ${DRIVERS:.c=.o} 34 ar crv $@ $? 35 ranlib $@ 36 37${DRIVERS}: samachdep.h 38 39# depend on DEFS 40 41label.o machdep.o srt0.o: Makefile 42cons.o dca.o hil.o: Makefile 43ite.o ite_subr.o ite_dv.o ite_gb.o ite_hy.o ite_rb.o ite_tc.o: Makefile 44 45# startups 46 47srt0.o: srt0.c 48 ${CC} -E ${INCPATH} ${DEFS} srt0.c | ${AS} -o srt0.o 49 50tpsrt0.o: srt0.c 51 ${CC} -E ${INCPATH} ${DEFS} -DTP srt0.c | ${AS} -o tpsrt0.o 52 53# bootable from tape 54 55tboot: tboot.o srt0.o ${LIBS} 56 ld -N -T ${RELOC} -e begin srt0.o tboot.o ${LIBS} -o $@ 57 @size tboot 58 @echo tboot total size should not exceed 520192 bytes 59 60tboot.o: boot.o 61 cp boot.c tboot.c; chmod +w tboot.c 62 ${CC} -c ${CFLAGS} -DJUSTASK tboot.c 63 rm -f tboot.c 64 65tcopy: copy.o tpsrt0.o ${LIBS} 66 ld -N -T ${RELOC} -e begin tpsrt0.o copy.o ${LIBS} -o $@ 67 @size tcopy 68 @echo tcopy total size should not exceed 520192 bytes 69 70# bootable from floppy or real disks 71 72dboot: boot.o srt0.o bootconf.o ${LIBS} 73 ld -N -T ${RELOC} -e begin srt0.o boot.o bootconf.o ${LIBS} -o $@ 74 @size dboot 75 @echo dboot text+data size should not exceed 57344 bytes 76 @echo dboot total size should not exceed 520192 bytes 77 78bootconf.o: conf.o 79 rm -f bootconf.c 80 ln -s conf.c bootconf.c 81 ${CC} -c ${CFLAGS} -DBOOT bootconf.c 82 rm -f bootconf.c 83 84# non-secure boot (allows booting non-root owned or world writable kernels) 85 86nboot: nboot.o srt0.o bootconf.o ${LIBS} 87 ld -N -T ${RELOC} -e begin -o nboot srt0.o nboot.o bootconf.o ${LIBS} 88 @size nboot 89 @echo nboot text+data size should not exceed 57344 bytes 90 @echo nboot total size should not exceed 520192 bytes 91 92nboot.o: boot.o 93 rm -f nboot.c 94 ln -s boot.c nboot.c 95 ${CC} -c ${CFLAGS} -DINSECURE nboot.c 96 rm -f nboot.c 97 98dcopy: copy.o srt0.o conf.o ${LIBS} 99 ld -N -T ${RELOC} -e begin -o dcopy srt0.o copy.o conf.o ${LIBS} 100 101mkboot: mkboot.c 102 ${CC} ${CFLAGS} -o mkboot mkboot.c 103 104installboot: installboot.c 105 ${CC} ${CFLAGS} -o installboot installboot.c 106 107# utilities 108 109clean cleandir: 110 rm -f .depend *.o *.exe *.i errs make.out 111 rm -f a.out boot cat tpboot tpcopy copy tpformat 112 rm -f boot[a-z]? boot[a-wyz][a-z].c conf[a-wyz][a-z].c 113 rm -f format drtest core sboot bootconf.c nboot.c 114 rm -f libdrive.a mkboot tboot tcopy dboot nboot installboot *.lif 115 cd libsa; make cleandir 116 117install: 118 ./mkboot dboot diskboot.lif 119 ./mkboot nboot ndiskboot.lif 120 ./mkboot tboot tcopy tapeboot.lif 121 install -s -o bin -g bin -m 555 installboot ${DESTDIR}/usr/mdec 122 install -o bin -g bin -m 444 diskboot.lif ${DESTDIR}/usr/mdec/bootrd 123 rm -f ${DESTDIR}/usr/mdec/bootsd 124 ln ${DESTDIR}/usr/mdec/bootrd ${DESTDIR}/usr/mdec/bootsd 125 install -o bin -g bin -m 444 tapeboot.lif ${DESTDIR}/usr/mdec/bootct 126# mv diskboot.lif ndiskboot.lif tapeboot.lif ${DESTDIR}/sys/hpdist/tp 127 128depend: ${SRCS} 129 mkdep ${INCPATH} ${DEFS} ${SRCS} 130 mkdep -a -p ${INCPATH} ${DEFS} mkboot.c installboot.c 131 cd libsa; make depend 132 133FRC: 134