Home | History | Annotate | Line # | Download | only in common
Makefile.bootfloppy revision 1.21
      1 #	$NetBSD: Makefile.bootfloppy,v 1.21 2008/09/26 18:36:44 tsutsui Exp $
      2 #
      3 # Makefile snippet to create a set of USTAR floppies
      4 #
      5 
      6 #
      7 # Required variables:
      8 #	FLOPPYBASE	Basename of floppies. Floppy number ${n} will
      9 #			be generated as ${FLOPPYBASE}${n}.fs
     10 #	FLOPPYKERNEL	Kernel to copy
     11 #
     12 # Optional variables:
     13 #	FLOPPYKERNDIR	${FLOPPYKERNEL} is from ${.CURDIR}/../../${FLOPPYKERNDIR}
     14 #	FLOPPY_BOOT	Bootstrap to use.  [${DESTDIR}/usr/mdec/boot]
     15 #	FLOPPYBOOTOPTIONS Options for installboot, eg -o console=com0
     16 #
     17 
     18 .include <bsd.own.mk>
     19 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
     20 
     21 I386COMMON=	${.CURDIR}/../common
     22 
     23 FLOPPYMAX?=		1
     24 FLOPPYSIZE?=		2880
     25 .if defined(FLOPPYSIZE) && (${FLOPPYSIZE} != 2880)
     26 FLOPPYMETAFILE!=	printf "USTAR.volsize.%o" ${FLOPPYSIZE}
     27 .else
     28 FLOPPYSIZE=	2880
     29 .endif
     30 FLOPPYKERNDIR?=		instkernel
     31 FLOPPYSUFFIX?=		.fs
     32 MDEC=			${DESTDIR}/usr/mdec
     33 FLOPPYINSTBOOT=		"${TOOL_INSTALLBOOT} ${FLOPPYBOOTOPTIONS} -m${MACHINE} @IMAGE@ ${MDEC}/bootxx_ustarfs"
     34 FLOPPYKERNOBJ!=		cd ${.CURDIR}/../../${FLOPPYKERNDIR} && ${PRINTOBJDIR}
     35 
     36 FLOPPY_BOOT?=		${MDEC}/boot
     37 FLOPPY_BOOT_CFG?=	${I386COMMON}/boot.cfg
     38 FLOPPY_NETBSD=		${FLOPPYKERNOBJ}/${FLOPPYKERNEL}
     39 FLOPPYFILES=		boot boot.cfg ${FLOPPYMETAFILE} netbsd
     40 FLOPPYPAD=		1
     41 
     42 FLOPPY_RELEASEDIR=	installation/floppy
     43 
     44 CLEANFILES+=	boot.cfg
     45 boot.cfg:	${FLOPPY_BOOT_CFG}
     46 	${_MKTARGET_CREATE} "(from: ${.ALLSRC})"
     47 	@rm -f ${.TARGET}
     48 	@cp ${FLOPPY_BOOT_CFG} ${.TARGET}
     49 
     50 .include "${DISTRIBDIR}/common/Makefile.tarfloppy"
     51 
     52 .include <bsd.prog.mk>
     53