1 # $NetBSD: Makefile,v 1.8 2003/07/10 10:34:06 lukem Exp $
7 .
include "${TOP}/Makefile.inc"
13 # DEV/RDEV file system device, CDEV/RDEV vnconfig device
16 VND_RDEV
= /dev
/r
${VND}a
17 VND_CDEV
= /dev
/${VND}d
18 VND_CRDEV
= /dev
/r
${VND}d
20 MDEC
= ${DESTDIR}/usr
/mdec
28 LISTS
= ${.CURDIR
}/..
/ramdiskcommon
/list
29 CRUNCHCONF
= ..
/ramdiskcommon
/${CBIN}.conf
30 MTREECONF
= ..
/ramdiskcommon
/mtree.conf
34 RAMDISKSIZE
!= expr
${RAMDISKSPC} \
* ${RAMDISKCYLS}
38 ${IMAGE}: ${CBIN} ${MTREECONF} ${LISTS}
40 dd if
=/dev
/zero of
=${IMAGE}.tmp count
=${RAMDISKSIZE}
41 ${VNCONFIG} -v
-c
${VND_CDEV} ${IMAGE}.tmp \
42 512/${RAMDISKSPC}/1/${RAMDISKCYLS}
43 -${DISKLABEL} ${VND_CDEV} >tmplabel
44 ${DISKLABEL} -r
-R
${VND_CDEV} tmplabel
45 ${NEWFS} -B le
-m
0 -o space
${VND_RDEV}
46 ${MOUNT} ${VND_DEV} ${MOUNT_POINT}
47 ${TOOL_MTREE} -def
${.CURDIR
}/${MTREECONF} -p
${MOUNT_POINT}/ -U
48 TOPDIR
=${TOP} CURDIR
=${.CURDIR
} OBJDIR
=${.OBJDIR
} \
49 KERNOBJDIR
=${KERNOBJDIR} TARGDIR
=${MOUNT_POINT} ${HOST_SH} \
50 ${NETBSDSRCDIR}/distrib
/common
/runlist.sh
${LISTS}
54 ${UMOUNT} ${MOUNT_POINT}
55 ${VNCONFIG} -u
${VND_CDEV}
56 mv
-f
${IMAGE}.tmp
${IMAGE}
59 -${UMOUNT} -f
${MOUNT_POINT}
60 -${VNCONFIG} -u
${VND_DEV}
61 -/bin
/rm -f
${IMAGE}.tmp
63 ${CBIN}.mk
${CBIN}.cache
${CBIN}.c
: ${CRUNCHCONF}
64 ${TOOL_CRUNCHGEN} -D
${TOP}/..
/..
/..
-L
${.CURDIR
} ${.ALLSRC
}
66 ${CBIN}: ${CBIN}.mk
${CBIN}.cache
${CBIN}.c
67 ${MAKE} -f
${CBIN}.mk
all
69 # Use stubs to eliminate some large stuff from libc
70 HACKSRC
= ${DISTRIBDIR}/utils
/libhack
72 .
include "${HACKSRC}/Makefile.inc"
76 ${VNCONFIG} -v
-c
${VND_CDEV} ${IMAGE} \
77 512/${RAMDISKSPC}/1/${RAMDISKCYLS}
78 ${MOUNT} ${VND_DEV} ${MOUNT_POINT}
80 clean cleandir
distclean:
81 /bin
/rm -f
${AUXCLEAN} *.core
${IMAGE} ${IMAGE}.tmp
${CBIN} \
82 ${CBIN}.mk
${CBIN}.cache
*.o
*.cro
*.c tmplabel
86 .
include <bsd.subdir.mk
>