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