1# $NetBSD: Makefile,v 1.10 2000/11/01 07:57:55 garbled Exp $ 2 3TOP= ${.CURDIR}/.. 4 5.include "${TOP}/Makefile.inc" 6IMAGE= ramdisk.fs 7 8CBIN= ramdiskbin 9 10MOUNT_POINT?= /mnt 11# DEV/RDEV file system device, CDEV/RDEV vnconfig device 12VND?= vnd0 13VND_DEV= /dev/${VND}a 14VND_RDEV= /dev/r${VND}a 15VND_CDEV= /dev/${VND}c 16VND_CRDEV= /dev/r${VND}c 17IMAGE?= xxx.fs 18MDEC= ${DESTDIR}/usr/mdec 19 20LISTS= list 21CRUNCHCONF= ${CBIN}.conf 22MTREE= mtree.conf 23 24CRUNCHGEN?= crunchgen 25 26all: ${CBIN} 27 dd if=/dev/zero of=${IMAGE} count=9000 28 vnconfig -v -c ${VND_CDEV} ${IMAGE} 29# disklabel -rw ${VND_CDEV} ${DISKTYPE} 30 newfs -B le -m 0 -o space -i 5120 -c 20 ${VND_RDEV} 31 mount ${VND_DEV} ${MOUNT_POINT} 32 mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u 33 TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ 34 KERNOBJDIR=${KERNOBJDIR} \ 35 TARGDIR=${MOUNT_POINT} sh ${TOP}/src/runlist.sh ${.CURDIR}/${LISTS} 36 @echo chdir '$${.CURDIR}/../../../notes/alpha; ${MAKE} INSTALL.more' 37 @chdir ${.CURDIR}/../../../notes/alpha; ${MAKE} INSTALL.more 38 cp `chdir ${.CURDIR}/../../../notes/alpha; ${MAKE} echomore` \ 39 ${MOUNT_POINT} 40 @echo "" 41 @df -i ${MOUNT_POINT} 42 @echo "" 43 umount ${MOUNT_POINT} 44 vnconfig -u ${VND_CDEV} 45 46unconfig: 47 -umount -f ${MOUNT_POINT} 48 -vnconfig -u ${VND_DEV} 49 -/bin/rm -f ${IMAGE} 50 51${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF} 52 ${CRUNCHGEN} -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} 53 54${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c 55 ${MAKE} -f ${CBIN}.mk all 56 57clean cleandir distclean: 58 /bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.cro *.c 59 60.include <bsd.own.mk> 61.include <bsd.obj.mk> 62.include <bsd.subdir.mk> 63