No empty .Rs/.Re
[netbsd-mini2440.git] / distrib / evbsh3 / rom / ramdiskel / Makefile
bloba5d5d0f14cc9400194e3e1cc1b1cafa511a9f294
1 # $NetBSD: Makefile,v 1.8 2003/07/10 10:34:06 lukem Exp $
3 TOP= ${.CURDIR}/..
4 WARNS=1
5 DBG= -Os
7 .include "${TOP}/Makefile.inc"
8 IMAGE= ramdisk.fs
10 CBIN= ramdiskbin
12 MOUNT_POINT?= /mnt
13 # DEV/RDEV file system device, CDEV/RDEV vnconfig device
14 VND?= vnd0
15 VND_DEV= /dev/${VND}a
16 VND_RDEV= /dev/r${VND}a
17 VND_CDEV= /dev/${VND}d
18 VND_CRDEV= /dev/r${VND}d
19 IMAGE?= xxx.fs
20 MDEC= ${DESTDIR}/usr/mdec
22 DISKLABEL?= disklabel
23 MOUNT?= mount
24 NEWFS?= newfs
25 UMOUNT?= umount
26 VNCONFIG?= vnconfig
28 LISTS= ${.CURDIR}/../ramdiskcommon/list
29 CRUNCHCONF= ../ramdiskcommon/${CBIN}.conf
30 MTREECONF= ../ramdiskcommon/mtree.conf
32 RAMDISKSPC= 128
33 RAMDISKCYLS= 54
34 RAMDISKSIZE!= expr ${RAMDISKSPC} \* ${RAMDISKCYLS}
36 realall: ${IMAGE}
38 ${IMAGE}: ${CBIN} ${MTREECONF} ${LISTS}
39 rm -f ${IMAGE}.tmp
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}
51 @echo ""
52 @df -i ${MOUNT_POINT}
53 @echo ""
54 ${UMOUNT} ${MOUNT_POINT}
55 ${VNCONFIG} -u ${VND_CDEV}
56 mv -f ${IMAGE}.tmp ${IMAGE}
58 unconfig:
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
71 HACKOBJS= gethost.o
72 .include "${HACKSRC}/Makefile.inc"
73 ${CBIN}: libhack.o
75 mount:
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
84 .include <bsd.own.mk>
85 .include <bsd.obj.mk>
86 .include <bsd.subdir.mk>
87 .include <bsd.sys.mk>