1999-11-09 02:51:29 +03:00
|
|
|
# $NetBSD: Makefile,v 1.9 1999/11/08 23:51:30 mycroft Exp $
|
1998-07-03 15:20:08 +04:00
|
|
|
|
|
|
|
TOP= ${.CURDIR}/..
|
|
|
|
|
|
|
|
.include "${TOP}/Makefile.inc"
|
|
|
|
IMAGE= ramdisk.fs
|
|
|
|
|
|
|
|
CBIN= ramdiskbin
|
|
|
|
|
|
|
|
MOUNT_POINT?= /mnt
|
|
|
|
VND?= vnd1
|
|
|
|
VND_DEV= /dev/${VND}a
|
|
|
|
VND_RDEV= /dev/r${VND}a
|
|
|
|
MDEC= ${DESTDIR}/usr/mdec
|
|
|
|
|
|
|
|
LISTS= list
|
|
|
|
CRUNCHCONF= ${CBIN}.conf
|
|
|
|
MTREE= mtree.conf
|
|
|
|
|
1999-08-29 12:45:27 +04:00
|
|
|
SIZE= 2048k
|
1998-07-03 15:20:08 +04:00
|
|
|
DISKTYPE= floppyinstfs
|
|
|
|
|
|
|
|
all: ${CBIN}
|
|
|
|
dd if=/dev/zero of=${IMAGE} bs=${SIZE} count=1
|
1999-08-29 12:45:27 +04:00
|
|
|
vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}
|
1999-11-09 02:51:29 +03:00
|
|
|
disklabel -f ${.CURDIR}/disktab -rw ${VND} ${DISKTYPE}
|
1999-08-29 12:45:27 +04:00
|
|
|
newfs -B be -m 0 -o space -i 6144 -c 128 ${VND_RDEV}
|
1998-07-03 15:20:08 +04:00
|
|
|
mount ${VND_DEV} ${MOUNT_POINT}
|
|
|
|
mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
|
|
|
|
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
|
|
|
|
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
|
|
|
|
@echo ""
|
|
|
|
@df -i ${MOUNT_POINT}
|
|
|
|
@echo ""
|
|
|
|
umount ${MOUNT_POINT}
|
1999-08-29 12:45:27 +04:00
|
|
|
vnconfig -u ${VND}
|
1998-07-03 15:20:08 +04:00
|
|
|
|
|
|
|
unconfig:
|
|
|
|
-umount -f ${MOUNT_POINT}
|
1999-08-29 12:45:27 +04:00
|
|
|
-vnconfig -u ${VND}
|
|
|
|
-rm -f ${IMAGE}
|
1998-07-03 15:20:08 +04:00
|
|
|
|
|
|
|
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
|
|
|
|
crunchgen -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
|
|
|
|
|
1999-08-29 12:45:27 +04:00
|
|
|
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c #libhack.o
|
1998-07-03 15:20:08 +04:00
|
|
|
make -f ${CBIN}.mk all
|
|
|
|
|
1999-08-29 12:45:27 +04:00
|
|
|
#HACKSRC=${TOP}/../../utils/libhack
|
|
|
|
#.include "${HACKSRC}/Makefile.inc"
|
1998-07-03 15:20:08 +04:00
|
|
|
|
1998-09-05 18:46:13 +04:00
|
|
|
clean cleandir distclean:
|
1999-08-29 12:45:27 +04:00
|
|
|
rm -f ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache
|
|
|
|
rm -f *.core *.o *.cro *.c
|
1998-07-03 15:20:08 +04:00
|
|
|
|
|
|
|
.include <bsd.obj.mk>
|
|
|
|
.include <bsd.subdir.mk>
|