# @(#)Makefile 7.9 (Berkeley) 5/8/91
INCPATH
=-I..
/..
/sys
-I..
/..
/ -I
${STAND}
STANDDIR
= ${DESTDIR}/stand
CPP
= cpp -traditional
${INCPATH} -DSTANDALONE
-DAT386
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 \
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}
libdrive.a
: conf.o prf.o
${DRIVERS
:.c
=.o
}
${CPP} -E
-DLOCORE
-DRELOC
=0x
${RELOC} srt0.c |
${AS} -o srt0.o
${CPP} -E
-DLOCORE
-DSMALL
-DRELOC
=0x
${RELOC} -DREL srt0.c | \
${CPP} -E
-DLOCORE
-DRELOC
=0x
${RELOC} -DREL srt0.c |
${AS} -o relsrt0.o
${CPP} -E
-DLOCORE
-DRELOC
=0x
${RELOC} wdbootblk.c |
${AS} -o
$@
${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}
${CC} -c
${CFLAGS} -DBOOT bootconf.c
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
ld -N
-T
${RELOC} wdbootblk.o
strip a.out
;dd if
=a.out of
=wdboot ibs
=32 skip
=1;rm -f a.out
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 \
strip a.out
;dd if
=a.out of
=bootwd ibs
=32 skip
=1;rm -f a.out
ld -N
-T
${RELOC} fdbootblk.o
strip a.out
;dd if
=a.out of
=fdboot ibs
=32 skip
=1;rm -f a.out
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}
strip a.out
; dd if
=a.out of
=bootfd ibs
=32 skip
=1;rm -f a.out
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
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
${CC} -S
-DSMALL
${CFLAGS} sm_cga.c
${AS} sm_cga.s
-o sm_cga.o
${CC} -S
-DSMALL
${CFLAGS} sm_wd.c
confwd.o
: confwd.c confxx.o
conffd.o
: conffd.c confxx.o
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
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
*.o
*.exe
*.i sm_
*.c libdrive.a
rm -f a.out bfd bwd fdb wdb
${ALL}
rm -f boot
[a-wyz
]? boot
[a-wyz
]?? boot
[a-wyz
]?.c boot
[a-wyz
]??.c \
conf
[a-wyz
]?.c conf
[a-wyz
]??.c
rm -f format core sboot bootconf.c
cd libsmsa
; make cleandir
rm -f
${MAN} tags .depend
mkdep
${INCPATH} -DSTANDALONE
${SRCS} ${DUMMIES}
install -c
-s boot
${DESTDIR}
cp
${DISKUTILS} ..
/dist/floppy
cp
${TAPEUTILS} ..
/dist/tp
cp
${BOOTBLOCKS} ${STANDDIR}
cp
${DISKUTILS} ${STANDDIR}