Add tapeboot, make ${SA_PROG}.bin padded to a block boundary.

This commit is contained in:
gwr 1995-10-13 21:44:08 +00:00
parent c4e07b055f
commit 52f39566b5
2 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,5 @@
# $NetBSD: Makefile,v 1.4 1995/08/08 21:00:00 gwr Exp $ # $NetBSD: Makefile,v 1.5 1995/10/13 21:44:08 gwr Exp $
SUBDIR= installboot libsa bootxx ufsboot netboot SUBDIR= installboot libsa bootxx ufsboot netboot tapeboot
.include <bsd.subdir.mk> .include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.4 1995/09/23 03:42:17 gwr Exp $ # $NetBSD: Makefile.inc,v 1.5 1995/10/13 21:44:11 gwr Exp $
.if defined(SA_PROG) .if defined(SA_PROG)
@ -19,9 +19,14 @@ MDEC_DIR?=/usr/mdec
SRCS?= ${SA_PROG}.c SRCS?= ${SA_PROG}.c
OBJS?= ${SRCS:S/.c/.o/g} OBJS?= ${SRCS:S/.c/.o/g}
CLEANFILES+= ${SA_PROG} ${SA_PROG}.bin
# Make a copy of the executable with its exec header removed,
# and with its length padded to a multiple of 1k bytes.
# (The padding is for convenience when making tapes.)
${SA_PROG}.bin : ${SA_PROG} ${SA_PROG}.bin : ${SA_PROG}
cp ${SA_PROG} a.out ; strip a.out cp ${SA_PROG} a.out ; strip a.out
tail -c +33 < a.out > $@ dd if=a.out ibs=32 skip=1 of=$@ obs=1k conv=osync
-rm -f a.out -rm -f a.out
${SA_PROG} : ${SRTOBJ} ${OBJS} ${LIBS} ${SA_PROG} : ${SRTOBJ} ${OBJS} ${LIBS}
@ -31,7 +36,7 @@ ${SA_PROG} : ${SRTOBJ} ${OBJS} ${LIBS}
.if !target(clean) .if !target(clean)
clean: clean:
-rm -f a.out [Ee]rrs mklog core *.core -rm -f a.out [Ee]rrs mklog core *.core
-rm -f ${SA_PROG} ${SA_PROG}.bin ${OBJS} ${CLEANFILES} -rm -f ${CLEANFILES} *.o
.endif .endif
.endif .endif