|
|
1.1 ! root 1: # ! 2: # @(#)Makefile.sun3 1.1 86/02/03 SMI ! 3: # ! 4: ! 5: DESTDIR=/ ! 6: CFLAGS= -O $(COPTS) ! 7: COPTS= -DSUN3 ! 8: ! 9: # BRELOC is text segment start for final stage (2nd or 3rd stage) boots ! 10: # Note that this must be higher than the kernel's edata ! 11: BRELOC= 90000 ! 12: # LOAD is text segment start for booted user programs ! 13: LOAD= 4000 ! 14: ! 15: DRIVERS=tm.o nd.o xy.o sd.o st.o sc.o si.o xt.o if_ie.o \ ! 16: if_le.o getidprom.o idprom.o common.o inet.o ! 17: ! 18: LIBSA= $(DRIVERS) sys.o devio.o conf.o standalloc.o s3map.o \ ! 19: prf.o get.o ldivt.o lmodt.o probe.o chklabel.o spinning.o stubs.o ! 20: ! 21: RM= rm -f ! 22: ! 23: ALL= libsa.a srt0.o boot tpboot copy tpcopy \ ! 24: bootpr bootxy bootsd installboot.sh \ ! 25: ndboot.sun3.private ndboot.sun3.pub0 ndboot.sun3.pub1 ! 26: ! 27: all: ${ALL} ! 28: ! 29: sun2: FRC ! 30: rm Makefile ! 31: ln -s Makefile.sun2 Makefile ! 32: make clean;make ! 33: ! 34: sun3: FRC ! 35: rm Makefile ! 36: ln -s Makefile.sun3 Makefile ! 37: make clean;make ! 38: ! 39: FRC: ! 40: ! 41: s3map.o: s3map.s ! 42: rm -f tmp.c s3map.i s3map.o ! 43: cp s3map.s tmp.c ! 44: ${CC} -E -DASM ${CFLAGS} tmp.c > s3map.i ! 45: ${AS} ${LFLAG} s3map.i -o s3map.o ! 46: rm -f tmp.c s3map.i ! 47: ! 48: getidprom.o: getidprom.s ! 49: rm -f tmp.c getidprom.i getidprom.o ! 50: cp getidprom.s tmp.c ! 51: ${CC} -E -DASM ${CFLAGS} tmp.c >getidprom.i ! 52: ${AS} ${LFLAG} getidprom.i -o getidprom.o ! 53: rm -f tmp.c getidprom.i ! 54: ! 55: libsa.a: $(LIBSA) ! 56: ar crv libsa.a $? ! 57: ranlib libsa.a ! 58: ! 59: srt0.o: srt0.s ! 60: rm -f tmp.c srt0.i srt0.o ! 61: cp srt0.s tmp.c ! 62: cc -E ${CFLAGS} tmp.c > srt0.i ! 63: ${AS} srt0.i -o srt0.o ! 64: rm -f tmp.c srt0.i ! 65: ! 66: readfile.o: readfile.c ! 67: cc -c ${CFLAGS} -DLOAD=0x${LOAD} readfile.c ! 68: ! 69: # Standalone, generic boot program -- get it from anywhere, it will ! 70: # boot anything. "tpboot" has the a.out header stripped off so you ! 71: # can write it on the first file of a tape. ! 72: boot: boot.o readfile.o srt0.o libsa.a ! 73: ld -N -T ${BRELOC} -o boot srt0.o boot.o readfile.o libsa.a -lc ! 74: ! 75: sboot: sboot.o readfile.o srt0.o libsa.a ! 76: ld -N -T ${BRELOC} -o sboot srt0.o sboot.o readfile.o libsa.a -lc ! 77: ! 78: tpboot: tpboot.o readfile.o srt0.o libsa.a ! 79: ld -N -T ${BRELOC} srt0.o tpboot.o readfile.o libsa.a -lc ! 80: cp a.out b.out; strip b.out; dd if=b.out of=tpboot ibs=32 skip=1; ${RM} b.out ! 81: ! 82: tpboot.o: boot.c ! 83: cp boot.c tpboot.c; chmod +w tpboot.c ! 84: cc -c ${CFLAGS} -DJUSTASK tpboot.c ! 85: ${RM} tpboot.c ! 86: ! 87: sboot.o: boot.c ! 88: cp boot.c sboot.c; chmod +w sboot.c ! 89: cc -c ${CFLAGS} -DJUSTASK sboot.c ! 90: ${RM} sboot.c ! 91: ! 92: # Standalone copy program for copying eg, tape->disk ! 93: copy: copy.o srt0.o libsa.a ! 94: ld -N -T ${LOAD} -o copy srt0.o copy.o libsa.a -lc ! 95: ! 96: # bootable from tape ! 97: tpcopy: copy.o srt0.o libsa.a ! 98: ld -T ${LOAD} -o tpcopy srt0.o copy.o libsa.a -lc ! 99: ! 100: # sys version for 2nd stage which uses RAM driver and needs 3rd stage ! 101: sysxx.o: sys.c ! 102: ${RM} sysxx.c sysxx.o ! 103: cp sys.c sysxx.c ! 104: ${CC} -c ${CFLAGS} -DBOOTBLOCK sysxx.c ! 105: ${RM} sysxx.c ! 106: ! 107: # getting booted from anywhere (generic = pr for Prom) ! 108: ! 109: bootpr: srt0.o bootxx.o readfile.o confpr.o sysxx.o libsa.a sizecheck ! 110: ld -N -T ${BRELOC} srt0.o bootxx.o readfile.o confpr.o sysxx.o \ ! 111: libsa.a -lc ! 112: sizecheck ! 113: cp a.out b.out;strip b.out;dd if=b.out of=bootpr ibs=32 skip=1 ! 114: ! 115: ! 116: bootxy: srt0.o bootxx.o readfile.o confxy.o sysxx.o xy.boot.o libsa.a sizecheck ! 117: ld -N -T ${BRELOC} srt0.o bootxx.o readfile.o confxy.o sysxx.o \ ! 118: xy.boot.o libsa.a -lc ! 119: sizecheck ! 120: cp a.out b.out;strip b.out;dd if=b.out of=bootxy ibs=32 skip=1 ! 121: ! 122: xy.boot.o: xy.c ! 123: rm -f tmp.c tmp.o xy.boot.o ! 124: cp xy.c tmp.c ! 125: cc -c ${CFLAGS} -DBOOTBLOCK tmp.c ! 126: mv tmp.o xy.boot.o ! 127: ! 128: confxy.o: confxx.c ! 129: cc -c ${CFLAGS} -Dxxdriver=xydriver confxx.c ! 130: mv confxx.o confxy.o ! 131: ! 132: bootsd: bootpr ! 133: cp bootpr bootsd ! 134: ! 135: big.bootsd: srt0.o bootxx.o readfile.o confsd.o sysxx.o sd.boot.o libsa.a sizecheck ! 136: ld -N -T ${BRELOC} srt0.o bootxx.o readfile.o confsd.o sd.boot.o \ ! 137: sysxx.o libsa.a -lc ! 138: sizecheck ! 139: cp a.out b.out;strip b.out;dd if=b.out of=bootsd ibs=32 skip=1 ! 140: ! 141: sd.boot.o: sd.c ! 142: rm -f tmp.c tmp.o sd.boot.o ! 143: cp sd.c tmp.c ! 144: cc -c ${CFLAGS} -DBOOTBLOCK tmp.c ! 145: mv tmp.o sd.boot.o ! 146: ! 147: confsd.o: confxx.c ! 148: cc -c ${CFLAGS} -Dxxdriver=sddriver confxx.c ! 149: mv confxx.o confsd.o ! 150: ! 151: sizecheck: SCCS/s.sizecheck ! 152: sccs get sizecheck ! 153: chmod +x sizecheck ! 154: ! 155: # various flavors of tftp-bootable ND booters ! 156: ! 157: ndboot.sun3.private: boot ! 158: cp boot b.out ! 159: echo 'ndbootdev?w 0' | adb -w b.out ! 160: strip b.out; dd if=b.out of=$@ ibs=32 skip=1; ${RM} b.out ! 161: ! 162: ndboot.sun3.pub0: boot ! 163: cp boot b.out ! 164: echo 'ndbootdev?w 40' | adb -w b.out ! 165: strip b.out; dd if=b.out of=$@ ibs=32 skip=1; ${RM} b.out ! 166: ! 167: ndboot.sun3.pub1: boot ! 168: cp boot b.out ! 169: echo 'ndbootdev?w 41' | adb -w b.out ! 170: strip b.out; dd if=b.out of=$@ ibs=32 skip=1; ${RM} b.out ! 171: ! 172: # misc ! 173: installboot.sh: ! 174: sccs get installboot.sh ! 175: ! 176: ! 177: # Test program: sacat (standalone cat) ! 178: ! 179: sacat: sacat.o srt0.o libsa.a ! 180: ld -N -T ${BRELOC} -o sacat srt0.o sacat.o libsa.a -lc ! 181: ! 182: # utilities ! 183: ! 184: depend: ! 185: @echo 'making dependencies ...' ! 186: @grep '^#include' *.c saio.h | grep -v '<' | \ ! 187: sed 's/:[^"]*"\([^"]*\)".*/: \1/' | \ ! 188: sed 's/\.[cs]/.o/' >depend.tmp ! 189: @awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ ! 190: else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ ! 191: else rec = rec " " $$2 } } \ ! 192: END { print rec } ' <depend.tmp > makedep ! 193: @echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep ! 194: @echo '$$r makedep' >>eddep ! 195: @echo 'w' >>eddep ! 196: @chmod +w Makefile ! 197: @ed - Makefile < eddep ! 198: @rm eddep makedep depend.tmp ! 199: @echo '... done' ! 200: ! 201: clean: ! 202: rm -f ${ALL} ! 203: rm -f *.o *.exe *.i *.d core errs ! 204: rm -f a.out b.out sacat ! 205: rm -f boot[a-z]? sysxx.c syspr.c tmp.c ! 206: ! 207: lint: ! 208: lint ${COPTS} -hxbn *.c | \ ! 209: grep -v 'possible pointer alignment' | \ ! 210: grep -v 'struct/union .* never defined' ! 211: ! 212: install: ${ALL} ! 213: -mkdir ${DESTDIR}/stand ${DESTDIR}/usr/mdec && \ ! 214: chown bin ${DESTDIR}/stand ${DESTDIR}/usr/mdec && \ ! 215: chmod 755 ${DESTDIR}/stand ${DESTDIR}/usr/mdec ! 216: install boot ${DESTDIR} ! 217: install copy ${DESTDIR}/stand ! 218: install bootxy ${DESTDIR}/usr/mdec/bootxy ! 219: install bootsd ${DESTDIR}/usr/mdec/bootsd ! 220: install bootpr ${DESTDIR}/usr/mdec/bootpr ! 221: install bootpr ${DESTDIR}/usr/mdec/bootnd ! 222: install -c -m 755 installboot.sh ${DESTDIR}/usr/mdec/installboot ! 223: -mkdir ${DESTDIR}/tftpboot ! 224: install ndboot.sun3.private ${DESTDIR}/tftpboot ! 225: install ndboot.sun3.pub0 ${DESTDIR}/tftpboot ! 226: install ndboot.sun3.pub1 ${DESTDIR}/tftpboot ! 227: ! 228: ! 229: # DO NOT DELETE THIS LINE -- make depend uses it ! 230:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.