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