# Copyright (c) 1980, 1988 Regents of the University of California.
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# distribution and use acknowledge that the software was developed
# by the University of California, Berkeley. The name of the
# University may not be used to endorse or promote products derived
# from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
# @(#)Makefile 7.17 (Berkeley) %G%
INCPATH
=-I.
-I..
/stand
-I..
/h
DEFS
= ${INCPATH} -DSTANDALONE
-DCOMPAT_42
MACH
= -DVAX8600
-DVAX8200
-DVAX780
-DVAX750
-DVAX730
-DVAX630
-DVAX650
# Collections of C options:
# COPTS device drivers/assembler, not optimized
# SMOPTS "small" versions for 7.5K bootxx programs
# 730OPTS "small" versions for 11/730-only versions
CFLAGS
= -O
${DEFS} ${MACH}
730OPTS
=-O
${DEFS} -DVAX730
SMOPTS
= ${DEFS} -DSMALL
-DVAX750
-DVAX630
-DVAX650
SRCS
= autoconf.c boot.c bootxx.c cat.c copy.c dev.c drtest.c format.c \
format.c getfile.c gets.c hp.c hpmaptype.c ht.c idc.c kdb.c \
machdep.c mba.c mt.c prf.c printn.c qdcons.c qvcons.c qfont.c \
rk.c rl.c sys.c tm.c tmscp.c ts.c uba.c uda.c up.c upmaptype.c \
ut.c conf.c ..
/vax
/dkbad.c
DRIVERS
=autoconf.o hp.o hpmaptype.o ht.o idc.o kdb.o mba.o mt.o qdcons.o \
qvcons.o rk.o rl.o tm.o tmscp.o ts.o up.o upmaptype.o uba.o uda.o \
SMOBJ
= bootxx.o sm_sys.o sm_autoconf.o
# These drivers don't have ecc correction and bad sector forwarding;
# they are placed in the file system boot area for 750's. If your
# root has bad sectors you can try and squeeze the newer drivers in...
MDEC
= boothp boothk bootkra bootup bootra bootrl
ALL
= boot tpboot cat copy tpcopy format tpformat drtest ls \
730boot
730copy
730format
730drtest
${MDEC}
${LIBSA}: conf.o dev.o dkbad.o getfile.o gets.o machdep.o prf.o printn.o \
${CC} -c
-S
${COPTS} $*.c
/lib
/c2
-i
$*.s |
as -o
$*.o
srt0.o
: srt0.c ..
/vax
/mtpr.h ..
/vax
/cpu.h
${CC} -E
-DRELOC
=0x
${RELOC} ${COPTS} srt0.c |
as -o srt0.o
tpsrt0.o
: srt0.c ..
/vax
/mtpr.h ..
/vax
/cpu.h
${CC} -E
-DRELOC
=0x
${RELOC} -DTP
${COPTS} srt0.c |
as -o tpsrt0.o
relsrt0.o
: srt0.c ..
/vax
/mtpr.h ..
/vax
/cpu.h
${CC} -E
-DRELOC
=0x
${RELOC} -DREL
${COPTS} srt0.c |
as -o relsrt0.o
tpboot
: tpboot.o relsrt0.o
${LIBSA}
ld -N
-T
${RELOC} relsrt0.o tpboot.o
${LIBSA} -lc
strip a.out
; dd if
=a.out of
=tpboot ibs
=32 skip
=1; rm -f a.out
${CC} -c
${CFLAGS} -DJUSTASK
$*.c
tpcopy
: copy.o tpsrt0.o
${LIBSA}
ld -N tpsrt0.o copy.o
${LIBSA} -lc
strip a.out
; dd if
=a.out of
=tpcopy ibs
=32 skip
=1; rm -f a.out
tpformat
: tpformat.o tpsrt0.o confhpup.o
${LIBSA}
ld -N tpsrt0.o tpformat.o confhpup.o
${LIBSA} -lc
strip a.out
; dd if
=a.out of
=tpformat ibs
=32 skip
=1; rm -f a.out
${CC} -c
${CFLAGS} -DJUSTEXIT
$*.c
# bootable from floppy or real disks
boot
: boot.o relsrt0.o bootconf.o
${LIBSA}
ld -N
-T
${RELOC} -o
$@ relsrt0.o boot.o bootconf.o
${LIBSA} -lc
${CC} -c
${CFLAGS} -DBOOT
$*.c
copy
: copy.o srt0.o getfile.o
${LIBSA}
ld -N
-o
$@ srt0.o copy.o getfile.o
${LIBSA} -lc
cat
: cat.o srt0.o getfile.o
${LIBSA}
ld -N
-o
$@ srt0.o cat.o getfile.o
${LIBSA} -lc
ls
: ls.o srt0.o getfile.o
${LIBSA}
ld -N
-o
$@ srt0.o ls.o getfile.o
${LIBSA} -lc
format
: format.o srt0.o confhpup.o
${LIBSA}
ld -N
-o
$@ srt0.o format.o confhpup.o
${LIBSA} -lc
drtest
: drtest.o srt0.o confhpup.o
${LIBSA}
ld -N
-o
$@ srt0.o drtest.o confhpup.o
${LIBSA} -lc
# for 730s minimize size to avoid microcode botch
# (won't load files larger than 12.5 Kbytes)
730boot
: 730boot.o relsrt0.o
730bootconf.o
${LIBSA}
ld -N
-T
${RELOC} -o
730boot relsrt0.o
730boot.o
730bootconf.o
${LIBSA} -lc
${CC} -c
${730OPTS} -DBOOT
$*.c
730copy
: copy.o srt0.o
730conf.o
${LIBSA}
ld -N
-o
$@ srt0.o copy.o
730conf.o
${LIBSA} -lc
730drtest
: drtest.o srt0.o confup.o
${LIBSA}
ld -N
-o
$@ srt0.o drtest.o confup.o
${LIBSA} -lc
730format
: format.o srt0.o confup.o
${LIBSA}
ld -N
-o
$@ srt0.o format.o confup.o
${LIBSA} -lc
### not yet, rosin, not yet ###
# getting booted from disc
boothk
: relsrt0.o confrk.o
${SMOBJ} ${LIBSA}
ld -N
-T
${RELOC} relsrt0.o confrk.o
${SMOBJ} ${LIBSA} -lc
strip a.out
;dd if
=a.out of
=$@ ibs
=32 skip
=1;rm -f a.out
boothp
: relsrt0.o confhp.o sm_hp.o
${SMOBJ} ${LIBSA}
ld -N
-T
${RELOC} relsrt0.o confhp.o sm_hp.o
${SMOBJ} ${LIBSA} -lc
strip a.out
;dd if
=a.out of
=$@ ibs
=32 skip
=1;rm -f a.out
bootkra
: relsrt0.o confkra.o
${SMOBJ} ${LIBSA}
ld -N
-T
${RELOC} relsrt0.o confkra.o
${SMOBJ} ${LIBSA} -lc
strip a.out
;dd if
=a.out of
=$@ ibs
=32 skip
=1;rm -f a.out
bootup
: relsrt0.o confup.o sm_up.o
${SMOBJ} ${LIBSA}
ld -N
-T
${RELOC} relsrt0.o confup.o sm_up.o
${SMOBJ} ${LIBSA} -lc
strip a.out
;dd if
=a.out of
=$@ ibs
=32 skip
=1;rm -f a.out
bootra
: relsrt0.o confra.o
${SMOBJ} ${LIBSA}
ld -N
-T
${RELOC} relsrt0.o confra.o
${SMOBJ} ${LIBSA} -lc
strip a.out
;dd if
=a.out of
=$@ ibs
=32 skip
=1;rm -f a.out
bootrl
: relsrt0.o confrl.o
${SMOBJ} ${LIBSA}
ld -N
-T
${RELOC} relsrt0.o confrl.o
${SMOBJ} ${LIBSA} -lc
strip a.out
;dd if
=a.out of
=$@ ibs
=32 skip
=1;rm -f a.out
${CC} -S
${SMOPTS} sm_hp.c
/lib
/c2
-i sm_hp.s |
as -o sm_hp.o
${CC} -S
${SMOPTS} sm_up.c
/lib
/c2
-i sm_up.s |
as -o sm_up.o
${CC} -c
-O
${SMOPTS} sm_sys.c
sm_autoconf.o
: autoconf.o
ln
-s autoconf.c sm_autoconf.c
${CC} -c
-O
${SMOPTS} sm_autoconf.c
confrk.o
: confrk.c confxx.o
confhp.o
: confhp.c confxx.o
confkra.o
: confkra.c confxx.o
confup.o
: confup.c confxx.o
confra.o
: confra.c confxx.o
confrl.o
: confrl.c confxx.o
sed
-e
's/io->i_ino.i_dev/0/g' < dev.c
> confrk.c
sed
-e
's/XX/hk/' -e
's/xx/rk/g' < confxx.c
>> confrk.c
sed
-e
's/io->i_ino.i_dev/0/g' < dev.c
> confhp.c
sed
-e
's/XX/hp/' -e
's/xx/hp/g' < confxx.c
>> confhp.c
confkra.c
: confxx.c dev.c
sed
-e
's/io->i_ino.i_dev/0/g' < dev.c
> confkra.c
sed
-e
's/XX/kra/' -e
's/xx/kra/g' < confxx.c
>> confkra.c
sed
-e
's/io->i_ino.i_dev/0/g' < dev.c
> confup.c
sed
-e
's/XX/up/' -e
's/xx/up/g' < confxx.c
>> confup.c
sed
-e
's/io->i_ino.i_dev/0/g' < dev.c
> confra.c
sed
-e
's/XX/ra/' -e
's/xx/ra/g' < confxx.c
>> confra.c
sed
-e
's/io->i_ino.i_dev/0/g' < dev.c
> confrl.c
sed
-e
's/XX/rl/' -e
's/xx/rl/g' < confxx.c
>> confrl.c
rm -f
*.o
*.exe
*.i sm_
*.c libsa.a
rm -f boot
[a-wyz
][a-z
].c conf
[a-wyz
][a-z
].c
rm -f
${ALL} a.out core errs sboot bootconf.c
rm -f
${MAN} tags .depend
mkdep
${INCPATH} -DSTANDALONE
${SRCS} ${DUMMIES}
install -c
-s
-o bin
-g bin
-m
644 format cat copy drtest ls
${DESTDIR}${STAND}
install -c
-o bin
-g bin
-m
644 boot pcs750.bin
${DESTDIR}/
[ -d ..
/vaxdist
/tp
] || mkdir ..
/vaxdist
/tp
cp tpcopy ..
/vaxdist
/tp
/copy
cp tpboot ..
/vaxdist
/tp
/boot
cp tpformat ..
/vaxdist
/tp
/format
cp boot a.out
; strip a.out
; \
dd if
=a.out of
=..
/floppy
/boot bs
=32 skip
=1; rm a.out
cp
730boot a.out
; strip a.out
; \
dd if
=a.out of
=..
/cassette
/boot
.730 bs
=32 skip
=1; rm a.out
cp ..
/floppy
/boot ..
/cassette
/boot
.750
cp ..
/floppy
/boot ..
/consolerl
/boot
cp copy a.out
; strip a.out
; \
dd if
=a.out of
=..
/floppy
/copy bs
=32 skip
=1; rm a.out
cp
730copy a.out
; strip a.out
; \
dd if
=a.out of
=..
/cassette
/copy
.730 bs
=32 skip
=1; rm a.out
cp ..
/floppy
/copy ..
/cassette
/copy
.750
cp ..
/floppy
/copy ..
/consolerl
/copy
cp format a.out
; strip a.out
; \
dd if
=a.out of
=..
/floppy
/format bs
=32 skip
=1; rm a.out
cp
730format a.out
; strip a.out
; \
dd if
=a.out of
=..
/cassette
/format
.730 bs
=32 skip
=1; rm a.out
cp ..
/floppy
/format ..
/cassette
/format
.750
cp ..
/floppy
/format ..
/consolerl
/format
cp drtest a.out
; strip a.out
; \
dd if
=a.out of
=..
/floppy
/drtest bs
=32 skip
=1; rm a.out
cp
730drtest a.out
; strip a.out
; \
dd if
=a.out of
=..
/cassette
/drtest
.730 bs
=32 skip
=1; rm a.out
cp ..
/floppy
/drtest ..
/cassette
/drtest
.750
cp ..
/floppy
/drtest ..
/consolerl
/drtest
install -c
-o bin
-g bin
-m
444 ${MDEC} ${DESTDIR}/usr
/mdec
rm -f
${DESTDIR}/usr
/mdec
/bootrd
ln
${DESTDIR}/usr
/mdec
/bootra
${DESTDIR}/usr
/mdec
/bootrd
lint
${COPTS} -hxbn boot.c
${SRCS} | \
sed
-e
'/possible pointer alignment/d' \
-e
'/struct\/union .* never defined/d'