Makefile revision 1.8
1#	$NetBSD: Makefile,v 1.8 2000/05/02 16:06:46 sjg 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
24all: ${CBIN} 
25	dd if=/dev/zero of=${IMAGE} count=9000
26	vnconfig -v -c ${VND_CDEV} ${IMAGE}
27#	disklabel -rw ${VND_CDEV} ${DISKTYPE}
28	newfs -B le -m 0 -o space -i 5120 -c 20 ${VND_RDEV}
29	mount ${VND_DEV} ${MOUNT_POINT}
30	mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u
31	TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
32	    KERNOBJDIR=${KERNOBJDIR} \
33	    TARGDIR=${MOUNT_POINT} sh ${TOP}/src/runlist.sh ${.CURDIR}/${LISTS}
34	@echo chdir '$${.CURDIR}/../../../notes/alpha; make INSTALL.more'
35	@chdir ${.CURDIR}/../../../notes/alpha; make INSTALL.more
36	cp `chdir ${.CURDIR}/../../../notes/alpha; make echomore`	\
37		${MOUNT_POINT}
38	@echo ""
39	@df -i ${MOUNT_POINT}
40	@echo ""
41	umount ${MOUNT_POINT}
42	vnconfig -u ${VND_CDEV}
43
44unconfig:
45	-umount -f ${MOUNT_POINT}
46	-vnconfig -u ${VND_DEV}
47	-/bin/rm -f ${IMAGE}
48
49${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
50	crunchgen -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
51
52${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
53	make -f ${CBIN}.mk all
54
55clean cleandir distclean:
56	/bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.cro *.c
57
58.include <bsd.own.mk>
59.include <bsd.obj.mk>
60.include <bsd.subdir.mk>
61