Home | History | Annotate | Line # | Download | only in floppy-GENERIC
      1 #	$NetBSD: Makefile,v 1.22 2014/08/05 15:40:58 apb 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 #
     21 FLOPPYKERNEL?=	${KERNOBJDIR}/GENERIC/netbsd
     22 FLOPPYBASE?=	generic
     23 FLOPPYMAX?=	1
     24 
     25 FLOPPY_RELEASEDIR?=	installation/misc
     26 
     27 .if defined(FLOPPYSIZE) && (${FLOPPYSIZE} != 2880)
     28 FLOPPYMETAFILE!=printf "USTAR.volsize.%o" ${FLOPPYSIZE}
     29 .else
     30 FLOPPYSIZE=	2880
     31 .endif
     32 
     33 FLOPPYFILES=	boot ${FLOPPYMETAFILE} netbsd
     34 
     35 MDEC=		${DESTDIR}/usr/mdec
     36 KERNOBJ!=	cd ${.CURDIR}/../instkernel && ${PRINTOBJDIR}
     37 FLOPPY_BOOT=	${MDEC}/ustarboot
     38 FLOPPYINSTBOOT=	"${TOOL_INSTALLBOOT} -v -m ${MACHINE} -t raw -b 17 @IMAGE@ ${FLOPPY_BOOT}"
     39 
     40 netbsd: ${FLOPPYKERNEL}
     41 	@echo "Copying stripped and gzipped ${.ALLSRC} to ${.TARGET}"
     42 	@rm -f ${.TARGET} ${.TARGET}.tmp
     43 	cp ${.ALLSRC} ${.TARGET}.tmp
     44 	${STRIP} ${.TARGET}.tmp
     45 	${TOOL_GZIP_N} -9f ${.TARGET}.tmp
     46 	mv ${.TARGET}.tmp.gz ${.TARGET}
     47 
     48 CLEANFILES+=	netbsd netbsd.tmp netbsd.tmp.gz
     49 
     50 .include "${DISTRIBDIR}/common/Makefile.tarfloppy"
     51 
     52 .include <bsd.prog.mk>
     53