--- Net2/arch/i386/stand/makefile 2018/04/24 18:04:01 1.1.1.1 +++ Net2/arch/i386/stand/makefile 2018/04/24 18:05:09 1.1.1.2 @@ -1,13 +1,12 @@ -# @(#)Makefile 7.9 (Berkeley) 5/8/91 +# from: @(#)Makefile 7.9 (Berkeley) 5/8/91 DESTDIR=/ -STAND= ../../stand -INCPATH=-I../../sys -I../../ -I${STAND} +STAND= /sys/stand +INCPATH=-I/sys/sys -I/sys -I/sys/ufs -I${STAND} VPATH= ${STAND} STANDDIR= ${DESTDIR}/stand CC= cc -traditional -C2= /usr/libexec/c2 CPP= cpp -traditional ${INCPATH} -DSTANDALONE -DAT386 RELOC= 70000 @@ -16,26 +15,13 @@ RELOC2= 70200 CFLAGS= -DSTANDALONE -DAT386 -O ${INCPATH} DRIVERS=cga.c fd.c kbd.c wd.c -SRCS= boot.c bootxx.c conf.c confxx.c copy.c fd.c fdbootblk.c prf.c \ +SRCS= boot.c fdbootblk.c prf.c \ srt0.c wdbootblk.c ${DRIVERS} ${SASRC} -LIBS= libsa/libsa.a libdrive.a ${DESTDIR}/usr/lib/libc.a -SMLIBS= libsmsa/libsmsa.a libdrive.a ${DESTDIR}/usr/lib/libc.a -BOOTBLOCKS= wdboot bootwd fdboot bootfd -DISKUTILS= boot copy cat ls -ALL= ${BOOTBLOCKS} ${DISKUTILS} +ALL= wdboot bootwd fdboot bootfd all: ${ALL} -libsa/libsa.a:: - cd libsa; make -libsmsa/libsmsa.a:: - cd libsmsa; make - -libdrive.a: conf.o prf.o ${DRIVERS:.c=.o} - ar crv $@ $? - ranlib $@ - # startups srt0.o: srt0.c @@ -56,103 +42,45 @@ wdbootblk.o: wdbootblk.c fdbootblk.o: fdbootblk.c ${CPP} -E -DLOCORE -DRELOC=0x${RELOC} fdbootblk.c | ${AS} -o $@ -# bootable from floppy or real disks - -boot: boot.o bootconf.o cga.o relsrt0.o ${LIBS} - ld -N -T ${RELOC} -o $@ boot.o bootconf.o cga.o relsrt0.o ${LIBS} - -bootconf.o: conf.o - ln -s conf.c bootconf.c - ${CC} -c ${CFLAGS} -DBOOT bootconf.c - rm -f bootconf.c - -# utilities - -cat: cat.o srt0.o conf.o ${LIBS} - ld -N -o $@ srt0.o cat.o conf.o ${LIBS} - -ls: ls.o srt0.o conf.o ${LIBS} - ld -N -o $@ srt0.o ls.o conf.o ${LIBS} - -copy: copy.o srt0.o conf.o ${LIBS} - ld -N -o $@ srt0.o copy.o conf.o ${LIBS} - # getting booted from disc wdboot: wdbootblk.o ld -N -T ${RELOC} wdbootblk.o cp a.out wdb - rm -f wdboot - strip a.out;dd if=a.out of=wdboot ibs=32 skip=1;rm -f a.out - ls -l wdboot - -bootwd: wdbootblk.o wsrt0.o bootxx.o sm_confwd.o sm_wd.o sm_cga.o ${SMLIBS} - ld -N -T ${RELOC2} wsrt0.o bootxx.o sm_confwd.o sm_wd.o \ - sm_cga.o ${SMLIBS} + rm -f $@; strip a.out; trimhd 32 $@; rm -f a.out; ls -l $@ + +bootwd: wsrt0.o boot.o bmap.o cga.o fs.o kbd.o prf.o wd.o printf.o breadwd.o + ld -N -T ${RELOC2} wsrt0.o boot.o bmap.o cga.o kbd.o prf.o printf.o \ + breadwd.o fs.o wd.o -lc size a.out cp a.out bwd - rm -f bootwd - strip a.out;dd if=a.out of=bootwd ibs=32 skip=1;rm -f a.out - ls -l bootwd + rm -f $@; strip a.out; trimhd 32 $@; rm -f a.out; ls -l $@ fdboot: fdbootblk.o ld -N -T ${RELOC} fdbootblk.o cp a.out fdb - rm -f fdboot - strip a.out;dd if=a.out of=fdboot ibs=32 skip=1;rm -f a.out - ls -l fdboot + rm -f $@; strip a.out; trimhd 32 $@; rm -f a.out; ls -l $@ -bootfd: fdbootblk.o wsrt0.o bootxx.o fd.o sm_cga.o sm_conffd.o ${SMLIBS} - ld -N -T ${RELOC2} wsrt0.o bootxx.o fd.o sm_cga.o sm_conffd.o ${SMLIBS} +bootfd: wsrt0.o boot.o bmap.o cga.o fs.o kbd.o prf.o fd.o printf.o breadfd.o + ld -N -T ${RELOC2} wsrt0.o boot.o bmap.o cga.o kbd.o prf.o printf.o \ + breadfd.o fs.o fd.o -lc size a.out cp a.out bfd - rm -f bootfd - strip a.out; dd if=a.out of=bootfd ibs=32 skip=1;rm -f a.out - ls -l bootfd - -sm_conffd.o: conffd.c - rm -f sm_conffd.c - ln -s conffd.c sm_conffd.c - ${CC} -S -DSMALL ${CFLAGS} sm_conffd.c - ${AS} sm_conffd.s -o sm_conffd.o - rm -f sm_conffd.s sm_conffd.c - -sm_confwd.o: confwd.c - rm -f sm_confwd.c - ln -s confwd.c sm_confwd.c - ${CC} -S -DSMALL ${CFLAGS} sm_confwd.c - ${AS} sm_confwd.s -o sm_confwd.o - rm -f sm_confwd.s sm_confwd.c - -sm_cga.o: cga.c - rm -f sm_cga.c - ln -s cga.c sm_cga.c - ${CC} -S -DSMALL ${CFLAGS} sm_cga.c - ${AS} sm_cga.s -o sm_cga.o - rm -f sm_cga.s sm_cga.c - -sm_wd.o: wd.c - rm -f sm_wd.c - ln -s wd.c sm_wd.c - ${CC} -S -DSMALL ${CFLAGS} sm_wd.c - ${AS} sm_wd.s -o sm_wd.o - rm -f sm_wd.s sm_wd.c - -confwd.o: confwd.c confxx.o -conffd.o: conffd.c confxx.o - -confxx.o: - touch confxx.o - -confwd.c: confxx.c - rm -f confwd.c - sed -e 's/io->i_dev/0/g' < ${STAND}/dev.c > confwd.c - sed -e 's/XX/wd/' -e 's/xx/wd/g' < confxx.c >> confwd.c - -conffd.c: confxx.c - rm -f conffd.c - sed -e 's/io->i_dev/0/g' < ${STAND}/dev.c > conffd.c - sed -e 's/XX/fd/' -e 's/xx/fd/g' < confxx.c >> conffd.c + rm -f $@; strip a.out; trimhd 32 $@; rm -f a.out; ls -l $@ + +breadwd.o: breadwd.c breadxx.o +breadfd.o: breadfd.c breadxx.o + +breadxx.o: + touch breadxx.o + +breadwd.c: breadxx.c + rm -f breadwd.c + sed -e 's/XX/wd/' -e 's/xx/wd/g' < breadxx.c >> breadwd.c + +breadfd.c: breadxx.c + rm -f breadfd.c + sed -e 's/XX/fd/' -e 's/xx/fd/g' < breadxx.c >> breadfd.c clean: rm -f *.o *.exe *.i sm_*.c libdrive.a @@ -170,8 +98,4 @@ depend: ${SRCS} mkdep ${INCPATH} -DSTANDALONE ${SRCS} ${DUMMIES} install: ${ALL} - install -c -s boot ${DESTDIR} - cp ${DISKUTILS} ../dist/floppy - cp ${TAPEUTILS} ../dist/tp - cp ${BOOTBLOCKS} ${STANDDIR} - cp ${DISKUTILS} ${STANDDIR} + cp ${ALL} ${STANDDIR}