NetBSD/distrib/news68k/floppies/ramdisk/Makefile

70 lines
1.6 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.18 2002/02/04 11:03:08 tsutsui Exp $
1999-12-09 17:53:00 +03:00
TOP= ${.CURDIR}/..
.include "${TOP}/Makefile.inc"
IMAGE= ramdisk.fs
CBIN= ramdiskbin
MOUNT_POINT?= /mnt
# DEV/RDEV file system device
1999-12-09 17:53:00 +03:00
VND?= vnd1
VND_DEV= /dev/${VND}a
VND_RDEV= /dev/r${VND}a
MDEC= ${DESTDIR}/usr/mdec
LISTS= list
CRUNCHCONF= ${CBIN}.conf
MTREECONF= mtree.conf
1999-12-09 17:53:00 +03:00
CRUNCHGEN?= crunchgen
MTREE?= mtree
RAMDISKSIZE= 1440k
1999-12-09 17:53:00 +03:00
DISKTYPE= floppyinstfs
all: ${CBIN}
dd if=/dev/zero of=${IMAGE} bs=${RAMDISKSIZE} count=1
vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE}
disklabel -rw ${VND} ${DISKTYPE}
1999-12-09 17:53:00 +03:00
newfs -B be -m 0 -o space -i 4096 -c 80 ${VND_RDEV}
mount ${VND_DEV} ${MOUNT_POINT}
${MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -u
1999-12-09 17:53:00 +03:00
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
2000-06-09 19:18:55 +04:00
KERNOBJDIR=${KERNOBJDIR} DESTDIR=${DESTDIR} \
1999-12-09 17:53:00 +03:00
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
@echo ""
@df -i ${MOUNT_POINT}
@echo ""
umount ${MOUNT_POINT}
vnconfig -u ${VND}
1999-12-09 17:53:00 +03:00
unconfig:
-umount -f ${MOUNT_POINT}
-vnconfig -u ${VND}
1999-12-09 17:53:00 +03:00
-rm -f ${IMAGE}
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
${CRUNCHGEN} -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
1999-12-09 17:53:00 +03:00
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c libhack.o
2000-08-31 03:51:46 +04:00
${MAKE} -f ${CBIN}.mk all
1999-12-09 17:53:00 +03:00
HACKSRC=${TOP}/../../utils/libhack
.include "${HACKSRC}/Makefile.inc"
# turn off small gethostby* temporarily
HACKOBJS:= ${HACKOBJS:Ngethost.o}
1999-12-09 17:53:00 +03:00
release:
1999-12-09 17:53:00 +03:00
clean cleandir distclean:
if [ -f ${CBIN}.mk ]; then ${MAKE} -f ${CBIN}.mk clean; fi;
1999-12-09 17:53:00 +03:00
rm -f ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache
rm -f *.core *.o *.cro *.c
.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.include <bsd.prog.mk>