Makefile.inc revision 1.5
1# $NetBSD: Makefile.inc,v 1.5 2001/10/21 23:23:19 jmc Exp $ 2 3# TOP is assumed to be defined by Makefile including this one. 4 5COMMONDIR= ${TOP}/bootfloppy-common 6 7.include <bsd.kernobj.mk> 8 9MOUNT_POINT?= /mnt 10VND?= vnd0 11VND_DEV= /dev/${VND}a 12VND_RDEV= /dev/r${VND}a 13VND_CDEV= /dev/${VND}d 14VND_CRDEV= /dev/r${VND}d 15IMAGE?= xxx.fs 16KERN?= netbsd-xxx 17MDEC= ${DESTDIR}/usr/mdec 18MDSETIMAGE?= mdsetimage 19 20LISTS= ${COMMONDIR}/list 21RAMDISK !=cd $(.CURDIR)/../ramdisk/; \ 22 printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk.fs\n" | \ 23 ${MAKE} -s -f- 24 25DISKTYPE?= floppy3 26DISKSIZE?= 2880 27 28# Some reasonable values for the -i parameter to newfs are: 29# 30# 6144 1147k, 189 inodes free 31# 16384 1159k, 93 inodes free 32# 204800 1167k, 29 inodes free 33INO_BYTES?= 204800 34 35CLEANFILES+= netbsd.ram.gz 36 37all: netbsd.ram.gz 38 dd if=/dev/zero of=${IMAGE} count=${DISKSIZE} 39 vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE} 40 disklabel -rw ${VND_CDEV} ${DISKTYPE} 41 newfs -B be -m 0 -o space -i ${INO_BYTES} -c 80 ${VND_RDEV} ${DISKTYPE} 42 mount ${VND_DEV} ${MOUNT_POINT} 43 TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ 44 KERNOBJDIR=${KERNOBJDIR} \ 45 TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS} 46 @echo "" 47 @df -i ${MOUNT_POINT} 48 @echo "" 49 umount ${MOUNT_POINT} 50 vnconfig -u ${VND_CDEV} 51 52unconfig: 53 -umount -f ${MOUNT_POINT} 54 -vnconfig -u ${VND_DEV} 55 -/bin/rm -f ${IMAGE} 56 57netbsd.ram.gz: ${KERN} ${RAMDISK} 58 cp ${KERN} netbsd.tmp 59 ${MDSETIMAGE} -v netbsd.tmp ${RAMDISK} 60 gzip netbsd.tmp 61 mv netbsd.tmp.gz ${.TARGET} 62 63clean cleandir: 64 /bin/rm -f *.core ${IMAGE} ${CLEANFILES} 65 66.include <bsd.own.mk> 67.include <bsd.obj.mk> 68.include <bsd.subdir.mk> 69