Home | History | Annotate | Line # | Download | only in ramdisk
Makefile revision 1.4
      1  1.4  wrstuden #	$NetBSD: Makefile,v 1.4 1999/03/04 20:32:18 wrstuden Exp $
      2  1.1   thorpej 
      3  1.1   thorpej TOP=		${.CURDIR}/..
      4  1.1   thorpej 
      5  1.1   thorpej .include "${TOP}/Makefile.inc"
      6  1.1   thorpej IMAGE=		ramdisk.fs
      7  1.1   thorpej 
      8  1.1   thorpej CBIN=		ramdiskbin
      9  1.1   thorpej 
     10  1.1   thorpej MOUNT_POINT?=	/mnt
     11  1.1   thorpej # DEV/RDEV file system device, CDEV/RDEV vnconfig device
     12  1.1   thorpej VND?=		vnd0
     13  1.1   thorpej VND_DEV=	/dev/${VND}a
     14  1.1   thorpej VND_RDEV=	/dev/r${VND}a
     15  1.1   thorpej VND_CDEV=	/dev/${VND}c
     16  1.1   thorpej VND_CRDEV=	/dev/r${VND}c
     17  1.1   thorpej IMAGE?=		xxx.fs
     18  1.1   thorpej MDEC=		${DESTDIR}/usr/mdec
     19  1.1   thorpej 
     20  1.1   thorpej LISTS=		list
     21  1.1   thorpej CRUNCHCONF=	${CBIN}.conf
     22  1.1   thorpej MTREE=		mtree.conf
     23  1.1   thorpej 
     24  1.1   thorpej all: ${CBIN} 
     25  1.1   thorpej 	dd if=/dev/zero of=${IMAGE} count=6144
     26  1.1   thorpej 	vnconfig -v -c ${VND_CDEV} ${IMAGE}
     27  1.1   thorpej #	disklabel -rw ${VND_CDEV} ${DISKTYPE}
     28  1.4  wrstuden 	newfs -B le -m 0 -o space -i 5120 ${VND_RDEV}
     29  1.1   thorpej 	mount ${VND_DEV} ${MOUNT_POINT}
     30  1.1   thorpej 	mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
     31  1.1   thorpej 	TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
     32  1.3      ross 	    TARGDIR=${MOUNT_POINT} sh ${TOP}/src/runlist.sh ${.CURDIR}/${LISTS}
     33  1.1   thorpej 	@echo ""
     34  1.1   thorpej 	@df -i ${MOUNT_POINT}
     35  1.1   thorpej 	@echo ""
     36  1.1   thorpej 	umount ${MOUNT_POINT}
     37  1.1   thorpej 	vnconfig -u ${VND_CDEV}
     38  1.1   thorpej 
     39  1.1   thorpej unconfig:
     40  1.1   thorpej 	-umount -f ${MOUNT_POINT}
     41  1.1   thorpej 	-vnconfig -u ${VND_DEV}
     42  1.1   thorpej 	-/bin/rm -f ${IMAGE}
     43  1.1   thorpej 
     44  1.1   thorpej ${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
     45  1.1   thorpej 	crunchgen -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
     46  1.1   thorpej 
     47  1.1   thorpej ${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
     48  1.1   thorpej 	make -f ${CBIN}.mk all
     49  1.1   thorpej 
     50  1.2     lukem clean cleandir distclean:
     51  1.1   thorpej 	/bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.lo *.c
     52  1.1   thorpej 
     53  1.1   thorpej .include <bsd.own.mk>
     54  1.1   thorpej .include <bsd.obj.mk>
     55  1.1   thorpej .include <bsd.subdir.mk>
     56