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