1994-01-26 05:38:16 +03:00
|
|
|
# from: @(#)Makefile 8.1 (Berkeley) 6/10/93
|
1994-07-18 10:27:12 +04:00
|
|
|
# $Id: Makefile,v 1.9 1994/07/18 06:27:12 mycroft Exp $
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
# RELOC=FFF00000 allows for boot prog up to FF000 (1044480) bytes long
|
|
|
|
RELOC= FFF00000
|
1993-05-13 17:56:20 +04:00
|
|
|
|
|
|
|
CONS= -DDCACONSOLE -DITECONSOLE -DDCMCONSOLE
|
1994-06-19 05:49:49 +04:00
|
|
|
DEFS= -DSTANDALONE -DCOMPAT_NOLABEL ${CONS} -Dhp300 # -DROMPRF
|
1993-05-13 17:56:20 +04:00
|
|
|
CFLAGS= -O ${INCPATH} ${DEFS}
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
SRCS= autoconf.c cons.c ct.c devopen.c dca.c dcm.c fhpib.c hil.c hpib.c \
|
1994-06-19 05:49:49 +04:00
|
|
|
ite.c ite_dv.c ite_gb.c ite_rb.c ite_subr.c ite_tc.c ite_hy.c \
|
1994-01-26 05:38:16 +03:00
|
|
|
nhpib.c rd.c scsi.c sd.c
|
|
|
|
SRCS+= conf.c machdep.c prf.c tgets.c
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
S= ${.CURDIR}/../../..
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
|
1994-01-26 07:17:23 +03:00
|
|
|
.PATH: ${S}/stand ${S}/lib/libsa
|
1994-01-26 05:38:16 +03:00
|
|
|
|
|
|
|
INCPATH=-I${.CURDIR} -I${.CURDIR}/../.. -I${S} -I${S}/lib/libsa
|
|
|
|
|
|
|
|
### find out what to use for libkern
|
|
|
|
.include "$S/lib/libkern/Makefile.inc"
|
|
|
|
LIBKERN= ${KERNLIB}
|
|
|
|
|
|
|
|
.include "$S/lib/libsa/Makefile.inc"
|
|
|
|
LIBSA= ${SA_LIB}
|
|
|
|
|
|
|
|
LIBS= ${LIBSA} ${.OBJDIR}/libdrive.a \
|
1994-06-19 05:49:49 +04:00
|
|
|
${LIBSA} ${LIBKERN}
|
1994-01-26 05:38:16 +03:00
|
|
|
|
|
|
|
BOOTS= pboot dboot nboot dcopy tboot tcopy cat #ls
|
|
|
|
ALL= ${BOOTS} mkboot installboot
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
all: ${ALL}
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
${BOOTS}: ${LIBS}
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
|
|
|
|
${.OBJDIR}/libdrive.a: ${OBJS}
|
1993-05-13 17:56:20 +04:00
|
|
|
ar crv $@ $?
|
|
|
|
ranlib $@
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
# depend on DEFS
|
|
|
|
|
|
|
|
devopen.o machdep.o srt0.o: Makefile
|
|
|
|
cons.o dca.o hil.o: Makefile
|
|
|
|
ite.o ite_subr.o ite_dv.o ite_gb.o ite_hy.o ite_rb.o ite_tc.o: Makefile
|
1993-05-13 17:56:20 +04:00
|
|
|
|
|
|
|
# startups
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
srt0.o: ${.CURDIR}/srt0.s
|
|
|
|
${CC} ${INCPATH} ${DEFS} -c ${.CURDIR}/srt0.s
|
|
|
|
|
|
|
|
tpsrt0.o: ${.CURDIR}/srt0.s
|
|
|
|
${CC} ${INCPATH} ${DEFS} -DTP -c ${.CURDIR}/srt0.s -o tpsrt0.o
|
|
|
|
|
|
|
|
# new boot
|
|
|
|
pboot: pboot.o srt0.o ${LIBS}
|
|
|
|
ld -N -T ${RELOC} -e begin srt0.o pboot.o ${LIBS} -o $@
|
|
|
|
@size pboot
|
|
|
|
@echo pboot total size should not exceed 1044480 bytes
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
ls: ls.o srt0.o ${LIBS}
|
|
|
|
ld -N -T ${RELOC} -e begin srt0.o ls.o ${LIBS} -o $@
|
|
|
|
@size ls
|
|
|
|
@echo ls total size should not exceed 1044480 bytes
|
|
|
|
|
|
|
|
cat: cat.o srt0.o ${LIBS}
|
|
|
|
ld -N -T ${RELOC} -e begin srt0.o cat.o ${LIBS} -o $@
|
|
|
|
@size cat
|
|
|
|
@echo cat total size should not exceed 1044480 bytes
|
1993-05-13 17:56:20 +04:00
|
|
|
|
|
|
|
# bootable from tape
|
|
|
|
|
|
|
|
tboot: tboot.o srt0.o ${LIBS}
|
|
|
|
ld -N -T ${RELOC} -e begin srt0.o tboot.o ${LIBS} -o $@
|
|
|
|
@size tboot
|
1994-01-26 05:38:16 +03:00
|
|
|
@echo tboot total size should not exceed 1044480 bytes
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
tboot.o: boot.c
|
|
|
|
cp ${.CURDIR}/boot.c tboot.c; chmod +w tboot.c
|
|
|
|
${CC} -c ${CFLAGS} -DJUSTASK tboot.c
|
1993-05-13 17:56:20 +04:00
|
|
|
rm -f tboot.c
|
|
|
|
|
|
|
|
tcopy: copy.o tpsrt0.o ${LIBS}
|
|
|
|
ld -N -T ${RELOC} -e begin tpsrt0.o copy.o ${LIBS} -o $@
|
|
|
|
@size tcopy
|
1994-01-26 05:38:16 +03:00
|
|
|
@echo tcopy total size should not exceed 1044480 bytes
|
1993-05-13 17:56:20 +04:00
|
|
|
|
|
|
|
# bootable from floppy or real disks
|
|
|
|
|
|
|
|
dboot: boot.o srt0.o bootconf.o ${LIBS}
|
|
|
|
ld -N -T ${RELOC} -e begin srt0.o boot.o bootconf.o ${LIBS} -o $@
|
|
|
|
@size dboot
|
|
|
|
@echo dboot text+data size should not exceed 57344 bytes
|
1994-01-26 05:38:16 +03:00
|
|
|
@echo dboot total size should not exceed 1044480 bytes
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
bootconf.o: ${.CURDIR}/conf.c
|
1993-05-13 17:56:20 +04:00
|
|
|
rm -f bootconf.c
|
1994-01-26 05:38:16 +03:00
|
|
|
ln -s ${.CURDIR}/conf.c bootconf.c
|
|
|
|
${CC} -c ${CFLAGS} -DBOOT bootconf.c
|
1993-05-13 17:56:20 +04:00
|
|
|
rm -f bootconf.c
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
# non-secure boot (allows booting non-root owned or world writable kernels)
|
1993-05-13 17:56:20 +04:00
|
|
|
|
|
|
|
nboot: nboot.o srt0.o bootconf.o ${LIBS}
|
|
|
|
ld -N -T ${RELOC} -e begin -o nboot srt0.o nboot.o bootconf.o ${LIBS}
|
|
|
|
@size nboot
|
|
|
|
@echo nboot text+data size should not exceed 57344 bytes
|
1994-01-26 05:38:16 +03:00
|
|
|
@echo nboot total size should not exceed 1044480 bytes
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
nboot.o: ${.CURDIR}/boot.c
|
1993-05-13 17:56:20 +04:00
|
|
|
rm -f nboot.c
|
1994-01-26 05:38:16 +03:00
|
|
|
ln -s ${.CURDIR}/boot.c nboot.c
|
|
|
|
${CC} -c ${CFLAGS} -DINSECURE nboot.c
|
1993-05-13 17:56:20 +04:00
|
|
|
rm -f nboot.c
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
dcopy: copy.o srt0.o conf.o ${LIBS}
|
1993-05-13 17:56:20 +04:00
|
|
|
ld -N -T ${RELOC} -e begin -o dcopy srt0.o copy.o conf.o ${LIBS}
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
mkboot: ${.CURDIR}/mkboot.c
|
|
|
|
${CC} ${CFLAGS} -o mkboot ${.CURDIR}/mkboot.c
|
1993-05-13 17:56:20 +04:00
|
|
|
|
1994-01-30 23:02:56 +03:00
|
|
|
installboot: ${.CURDIR}/installboot.c
|
|
|
|
${CC} ${CFLAGS} -o installboot ${.CURDIR}/installboot.c
|
1993-05-13 17:56:20 +04:00
|
|
|
|
|
|
|
# utilities
|
|
|
|
|
1994-01-26 05:38:16 +03:00
|
|
|
clean cleandir:
|
1993-05-13 17:56:20 +04:00
|
|
|
rm -f *.o *.exe *.i errs make.out
|
1994-01-26 05:38:16 +03:00
|
|
|
rm -f a.out pboot cat ls tboot tcopy
|
1993-05-13 17:56:20 +04:00
|
|
|
rm -f boot[a-z]? boot[a-wyz][a-z].c conf[a-wyz][a-z].c
|
1994-01-26 05:38:16 +03:00
|
|
|
rm -f core sboot bootconf.c nboot.c
|
|
|
|
rm -f libdrive.a mkboot dboot dcopy nboot installboot *.lif
|
1993-05-13 17:56:20 +04:00
|
|
|
|
|
|
|
install: mkboot installboot ${ALL}
|
1994-01-26 05:38:16 +03:00
|
|
|
./mkboot pboot netbsdboot.lif
|
|
|
|
./mkboot dboot diskboot.lif
|
|
|
|
./mkboot nboot ndiskboot.lif
|
|
|
|
./mkboot tboot tcopy tapeboot.lif
|
|
|
|
install -c -o bin -g bin -m 555 installboot ${DESTDIR}/usr/mdec
|
|
|
|
install -c -o bin -g bin -m 444 netbsdboot.lif ${DESTDIR}/usr/mdec/rdboot
|
|
|
|
rm -f ${DESTDIR}/usr/mdec/bootrd
|
|
|
|
ln ${DESTDIR}/usr/mdec/rdboot ${DESTDIR}/usr/mdec/bootrd
|
|
|
|
rm -f ${DESTDIR}/usr/mdec/sdboot
|
|
|
|
ln ${DESTDIR}/usr/mdec/rdboot ${DESTDIR}/usr/mdec/sdboot
|
1993-05-13 17:56:20 +04:00
|
|
|
rm -f ${DESTDIR}/usr/mdec/bootsd
|
1994-01-26 05:38:16 +03:00
|
|
|
ln ${DESTDIR}/usr/mdec/sdboot ${DESTDIR}/usr/mdec/bootsd
|
|
|
|
install -c -o bin -g bin -m 644 tapeboot.lif ${DESTDIR}/usr/mdec/bootct
|
1994-07-18 10:27:12 +04:00
|
|
|
# install -o bin -g bin -m 755 -d ${DESTDIR}/sys/hpdist/tp
|
|
|
|
# install -o bin -g bin -m 444 netbsdboot.lif ${DESTDIR}/sys/hpdist/tp
|
|
|
|
# install -o bin -g bin -m 444 tapeboot.lif ${DESTDIR}/sys/hpdist/tp
|
|
|
|
# install -o bin -g bin -m 444 diskboot.lif ${DESTDIR}/sys/hpdist/tp
|
|
|
|
# install -o bin -g bin -m 444 ndiskboot.lif ${DESTDIR}/sys/hpdist/tp
|
1994-01-26 05:38:16 +03:00
|
|
|
|
|
|
|
.include <bsd.dep.mk>
|
|
|
|
.include <bsd.obj.mk>
|
|
|
|
|
|
|
|
FRC:
|