Makefile.inc revision 1.1
1# $NetBSD: Makefile.inc,v 1.1 1998/11/19 08:58:03 sakamoto Exp $ 2 3# TOP is assumed to be defined by Makefile including this one. 4 5COMMONDIR= ${TOP}/bootfloppy-common 6 7MOUNT_POINT?= /mnt 8VND?= vnd0 9VND_DEV= /dev/${VND}a 10VND_RDEV= /dev/r${VND}a 11VND_CDEV= /dev/${VND}d 12VND_CRDEV= /dev/r${VND}d 13IMAGE?= xxx.fs 14KERN?= netbsd-xxx 15MDEC= ${DESTDIR}/usr/mdec 16 17LISTS= ${COMMONDIR}/list 18RAMDISK !=cd $(.CURDIR)/../ramdisk/; \ 19 printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/ramdisk.fs\n" | \ 20 ${MAKE} -s -f- 21 22DISKTYPE?= floppy3 23DISKSIZE?= 2880 24 25# Some reasonable values for the -i parameter to newfs are: 26# 27# 6144 1147k, 189 inodes free 28# 16384 1159k, 93 inodes free 29# 204800 1167k, 29 inodes free 30INO_BYTES?= 204800 31 32CLEANFILES+= netbsd.ram.gz 33 34all: netbsd.ram.gz 35 dd if=/dev/zero of=${IMAGE} count=${DISKSIZE} 36 vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE} 37 disklabel -rw ${VND_CDEV} ${DISKTYPE} 38 newfs -m 0 -o space -i ${INO_BYTES} -c 80 ${VND_RDEV} ${DISKTYPE} 39 mount ${VND_DEV} ${MOUNT_POINT} 40 TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ 41 TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${LISTS} 42 @echo "" 43 @df -i ${MOUNT_POINT} 44 @echo "" 45 @echo "installing new bootblocks" 46 -rm -f ${MOUNT_POINT}/boot 47 umount ${MOUNT_POINT} 48 /usr/mdec/installboot -v -f /usr/mdec/biosboot.sym ${VND_RDEV} 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