# Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
# Redistribution and use in source and binary forms are permitted provided
# that: (1) source distributions retain this entire copyright notice and
# comment, and (2) distributions including binaries display the following
# acknowledgement: ``This product includes software developed by the
# University of California, Berkeley and its contributors'' in the
# documentation or other materials provided with the distribution and in
# all advertising materials mentioning features or use of this software.
# Neither the name of the University nor the names of its contributors may
# 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
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
# @(#)Makefile 7.4 (Berkeley) 7/1/90
#CC=occ -Dconst= -Dvolatile= -Dsigned= -Dinline=
CC
=cc -Dconst
=__const__
-Dvolatile
=__volatile__ \
-Dsigned
=__signed__
-Dinline
=__inline__
-fpcc-struct-return
INCPATH
=-I.
-I
/usr
/include -I..
/sys
-I..
CONS
= -DDCACONSOLE
-DITECONSOLE
-DDCMCONSOLE
DEFS
= -DSTANDALONE
${CONS} # -DROMPRF # -DDEBUG
CFLAGS
= -O
${INCPATH} ${DEFS} ${COPTS}
# RELOC=FFF80000 allows for boot prog up to 7F000 (520192) bytes long
SRCS
= sys.c conf.c prf.c machdep.c autoconf.c \
hpib.c nhpib.c fhpib.c rd.c ct.c scsi.c sd.c hil.c \
cons.c ite.c ite_subr.c ite_dv.c ite_gb.c ite_rb.c ite_tc.c dca.c dcm.c
DRIVERS
=autoconf.o hpib.o nhpib.o fhpib.o rd.o ct.o scsi.o sd.o hil.o \
cons.o ite.o ite_subr.o ite_dv.o ite_gb.o ite_rb.o ite_tc.o dca.o dcm.o
ALL
= dboot nboot tboot tcopy
${LIBSA}: sys.o conf.o
${DRIVERS} prf.o machdep.o
${CC} -E
${INCPATH} ${DEFS} ${COPTS} srt0.c |
${AS} -o srt0.o
${CC} -E
${INCPATH} ${DEFS} ${COPTS} -DTP srt0.c |
${AS} -o tpsrt0.o
tboot
: tboot.o srt0.o
${LIBSA}
ld -N
-T
${RELOC} -e begin srt0.o tboot.o
${LIBSA} -lc
-o tboot
@echo tboot total size should not exceed
520192 bytes
cp boot.c tboot.c
; chmod
+w tboot.c
${CC} -c
-O
${INCPATH} ${COPTS} -DJUSTASK tboot.c
tcopy
: copy.o tpsrt0.o
${LIBSA}
ld -N
-T
${RELOC} -e begin tpsrt0.o copy.o
${LIBSA} -lc
-o tcopy
@echo tcopy total size should not exceed
520192 bytes
# bootable from floppy or real disks
dboot
: boot.o srt0.o bootconf.o
${LIBSA}
ld -N
-T
${RELOC} -e begin
-o dboot srt0.o boot.o bootconf.o
${LIBSA} -lc
@echo dboot text
+data size should not exceed
57344 bytes
@echo dboot total size should not exceed
520192 bytes
${CC} -c
${INCPATH} ${COPTS} -DBOOT bootconf.c
nboot
: nboot.o srt0.o bootconf.o
${LIBSA}
ld -N
-T
${RELOC} -e begin
-o nboot srt0.o nboot.o bootconf.o
${LIBSA} -lc
@echo nboot text
+data size should not exceed
57344 bytes
@echo nboot total size should not exceed
520192 bytes
cp boot.c nboot.c
; chmod
+w nboot.c
${CC} -c
-O
${INCPATH} ${COPTS} -DINSECURE
${DEFS} nboot.c
dcopy
: copy.o srt0.o conf.o
${LIBSA}
ld -N
-T
${RELOC} -e begin
-o dcopy srt0.o copy.o conf.o
${LIBSA} -lc
${CC} ${CFLAGS} -o mkboot mkboot.c
installboot
: installboot.c
${CC} ${CFLAGS} -o installboot installboot.c
rm -f
*.o
*.exe
*.i errs make.out
rm -f a.out boot cat tpboot tpcopy copy tpformat
rm -f boot
[a-z
]? boot
[a-wyz
][a-z
].c conf
[a-wyz
][a-z
].c
rm -f format drtest core sboot bootconf.c
rm -f libsa.a mkboot tboot tcopy dboot nboot installboot
*.lif
lint
${INCPATH} ${COPTS} -hxbn boot.c
${SRCS} | \
grep
-v
'possible pointer alignment' | \
grep
-v
'struct/union .* never defined'
install: mkboot installboot
${ALL}
mkboot dboot diskboot.lif
mkboot nboot ndiskboot.lif
mkboot tboot tcopy tapeboot.lif
install -c
-s installboot
${DESTDIR}/usr
/mdec
install -c
-m
644 diskboot.lif
${DESTDIR}/usr
/mdec
/bootrd
rm -f
${DESTDIR}/usr
/mdec
/bootsd
ln
${DESTDIR}/usr
/mdec
/bootrd
${DESTDIR}/usr
/mdec
/bootsd
install -c
-m
644 tapeboot.lif
${DESTDIR}/usr
/mdec
/bootct
mv diskboot.lif ndiskboot.lif tapeboot.lif
${DESTDIR}/sys
/hpdist
/tp
mkdep
${INCPATH} -DSTANDALONE
${SRCS} ${DUMMIES}