1#	$NetBSD: Makefile,v 1.18 2002/05/14 06:21:20 lukem Exp $
2
3.include <bsd.own.mk>
4.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
5
6.include <bsd.kernobj.mk>
7
8# Stuff an arbitrary kernel onto a ustarfs boot floppy set.
9#
10# Optional variables available:
11#	FLOPPYKERNEL	Path to kernel to stuff onto the floppy.
12#			[ ${KERNOBJDIR}/GENERIC/netbsd ]
13#
14#	FLOPPYBASE	Basename of floppies (written as "${FLOPPYBASE}N.fs")
15#			[ "generic" ]
16#
17#	FLOPPYSIZE	Size of a floppy.  [ 2880 ]
18#
19#	FLOPPYMAX	Maximum number of floppies allowed in the set.  [1]
20#
21FLOPPYKERNEL?=	${KERNOBJDIR}/GENERIC/netbsd
22FLOPPYBASE?=	generic
23FLOPPYMAX?=	1
24
25FLOPPY_RELEASEDIR?=	installation/misc
26
27.if defined(FLOPPYSIZE) && (${FLOPPYSIZE} != 2880)
28FLOPPYMETAFILE!=printf "USTAR.volsize.%o" ${FLOPPYSIZE}
29.else
30FLOPPYSIZE=	2880
31.endif
32
33FLOPPYFILES=	boot ${FLOPPYMETAFILE} netbsd
34
35MDEC=		${DESTDIR}/usr/mdec
36KERNOBJ!=	cd ${.CURDIR}/../instkernel && ${PRINTOBJDIR}
37FLOPPY_BOOT=	${MDEC}/ustarboot
38FLOPPYINSTBOOT=\
39	"${INSTALLBOOT} -v -m ${MACHINE} -t raw -b 17 @IMAGE@ ${FLOPPY_BOOT}"
40
41netbsd: ${FLOPPYKERNEL}
42	@echo "Copying stripped and gzipped ${.ALLSRC} to ${.TARGET}"
43	@rm -f ${.TARGET} ${.TARGET}.tmp
44	cp ${.ALLSRC} ${.TARGET}.tmp
45	${STRIP} ${.TARGET}.tmp
46	gzip -9f ${.TARGET}.tmp
47	mv ${.TARGET}.tmp.gz ${.TARGET}
48
49CLEANFILES+=	netbsd netbsd.tmp netbsd.tmp.gz
50
51.include "${DISTRIBDIR}/common/Makefile.tarfloppy"
52
53.include <bsd.prog.mk>
54