Annotation of researchv9/sys/boot/stand/Makefile, revision 1.1.1.2

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: s3map.o: s3map.s
                     30:        rm -f tmp.c s3map.i s3map.o
                     31:        cp s3map.s tmp.c
                     32:        ${CC} -E -DASM ${CFLAGS} tmp.c > s3map.i
                     33:        ${AS} ${LFLAG} s3map.i -o s3map.o
                     34:        rm -f tmp.c s3map.i
                     35: 
                     36: getidprom.o: getidprom.s
                     37:        rm -f tmp.c getidprom.i getidprom.o
                     38:        cp getidprom.s tmp.c
                     39:        ${CC} -E -DASM ${CFLAGS} tmp.c >getidprom.i
                     40:        ${AS} ${LFLAG} getidprom.i -o getidprom.o
                     41:        rm -f tmp.c getidprom.i
                     42: 
                     43: libsa.a: $(LIBSA)
                     44:        ar crv libsa.a $?
                     45:        ranlib libsa.a
                     46: 
                     47: srt0.o: srt0.s
                     48:        rm -f tmp.c srt0.i srt0.o
                     49:        cp srt0.s tmp.c
                     50:        cc -E ${CFLAGS} tmp.c > srt0.i
                     51:        ${AS} srt0.i -o srt0.o
                     52:        rm -f tmp.c srt0.i
                     53: 
                     54: readfile.o: readfile.c
                     55:        cc -c ${CFLAGS} -DLOAD=0x${LOAD} readfile.c
                     56: 
                     57: # Standalone, generic boot program -- get it from anywhere, it will
                     58: # boot anything.  "tpboot" has the a.out header stripped off so you
                     59: # can write it on the first file of a tape.
1.1.1.2 ! root       60: BFILES=        srt0.o boot.o sys.o devio.o prf.o s3map.o standalloc.o \
        !            61:        common.o conf.o idprom.o getidprom.o readfile.o sd.o \
        !            62:        si.o sc.o spinning.o chklabel.o stubs.o probe.o st.o
1.1       root       63: 
1.1.1.2 ! root       64: boot:  $(BFILES)
        !            65:        ld -N -T ${BRELOC} -o boot $(BFILES) -lc
1.1       root       66: 
1.1.1.2 ! root       67: tpboot:        tpboot.o readfile.o srt0.o libs.a
1.1       root       68:        ld -N -T ${BRELOC} srt0.o tpboot.o readfile.o libsa.a -lc
                     69:        cp a.out b.out; strip b.out; dd if=b.out of=tpboot ibs=32 skip=1; ${RM} b.out
                     70: 
                     71: # Standalone copy program for copying eg, tape->disk
                     72: copy:  copy.o srt0.o libsa.a
                     73:        ld -N -T ${LOAD} -o copy srt0.o copy.o libsa.a -lc
                     74: 
                     75: # bootable from tape
                     76: tpcopy:        copy.o srt0.o libsa.a
                     77:        ld -T ${LOAD} -o tpcopy srt0.o copy.o libsa.a -lc
                     78: 
                     79: # getting booted from anywhere (generic = pr for Prom)
                     80: 
1.1.1.2 ! root       81: bootpr: srt0.o bootxx.o readfile.o sys.o devio.o prf.o s3map.o \
        !            82:        standalloc.o common.o
        !            83:        ld -N -T ${BRELOC} srt0.o bootxx.o readfile.o sys.o \
        !            84:                devio.o prf.o s3map.o standalloc.o common.o -lc
1.1       root       85:        sizecheck
                     86:        cp a.out b.out;strip b.out;dd if=b.out of=bootpr ibs=32 skip=1
                     87: 
                     88: # various flavors of tftp-bootable ND booters
                     89: 
                     90: ndboot.sun3.private: boot
                     91:        cp boot b.out
                     92:        echo 'ndbootdev?w 0' | adb -w b.out
                     93:        strip b.out; dd if=b.out of=$@ ibs=32 skip=1; ${RM} b.out
                     94: 
                     95: ndboot.sun3.pub0: boot
                     96:        cp boot b.out
                     97:        echo 'ndbootdev?w 40' | adb -w b.out
                     98:        strip b.out; dd if=b.out of=$@ ibs=32 skip=1; ${RM} b.out
                     99: 
                    100: ndboot.sun3.pub1: boot
                    101:        cp boot b.out
                    102:        echo 'ndbootdev?w 41' | adb -w b.out
                    103:        strip b.out; dd if=b.out of=$@ ibs=32 skip=1; ${RM} b.out
                    104: 
                    105: # Test program: sacat (standalone cat)
                    106: 
                    107: sacat: sacat.o srt0.o libsa.a
                    108:        ld -N -T ${BRELOC} -o sacat srt0.o sacat.o libsa.a -lc
                    109: 
                    110: # utilities
                    111: 
                    112: depend:
                    113:        @echo 'making dependencies ...'
                    114:        @grep '^#include' *.c saio.h | grep -v '<' | \
                    115:              sed 's/:[^"]*"\([^"]*\)".*/: \1/' | \
                    116:              sed 's/\.[cs]/.o/' >depend.tmp
                    117:        @awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
                    118:                else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
                    119:                       else rec = rec " " $$2 } } \
                    120:              END { print rec } ' <depend.tmp  > makedep
                    121:        @echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
                    122:        @echo '$$r makedep' >>eddep
                    123:        @echo 'w' >>eddep
                    124:        @chmod +w Makefile
                    125:        @ed - Makefile < eddep
                    126:        @rm eddep makedep depend.tmp
                    127:        @echo '... done'
                    128: 
                    129: clean:
                    130:        rm -f ${ALL}
                    131:        rm -f *.o *.exe *.i *.d core errs 
                    132:        rm -f a.out b.out sacat
                    133:        rm -f boot[a-z]? sysxx.c syspr.c tmp.c
                    134: 
                    135: lint:
                    136:        lint ${COPTS} -hxbn *.c | \
                    137:            grep -v 'possible pointer alignment' | \
                    138:            grep -v 'struct/union .* never defined'
                    139: 
                    140: install: ${ALL}
                    141:        -mkdir ${DESTDIR}/stand ${DESTDIR}/usr/mdec && \
                    142:                chown bin ${DESTDIR}/stand ${DESTDIR}/usr/mdec && \
                    143:                chmod 755 ${DESTDIR}/stand ${DESTDIR}/usr/mdec
                    144:        install boot ${DESTDIR}
                    145:        install copy ${DESTDIR}/stand
                    146:        install bootxy ${DESTDIR}/usr/mdec/bootxy
                    147:        install bootsd ${DESTDIR}/usr/mdec/bootsd
                    148:        install bootpr ${DESTDIR}/usr/mdec/bootpr
                    149:        install bootpr ${DESTDIR}/usr/mdec/bootnd
                    150:        install -c -m 755 installboot.sh ${DESTDIR}/usr/mdec/installboot
                    151:        -mkdir ${DESTDIR}/tftpboot
                    152:        install ndboot.sun3.private ${DESTDIR}/tftpboot
                    153:        install ndboot.sun3.pub0 ${DESTDIR}/tftpboot
                    154:        install ndboot.sun3.pub1 ${DESTDIR}/tftpboot
                    155: 
                    156: 
                    157: # DO NOT DELETE THIS LINE -- make depend uses it
                    158: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.