Makefile revision 1.2
1#	$NetBSD: Makefile,v 1.2 1995/10/13 16:51:30 gwr Exp $
2
3TOP=		${.CURDIR}/..
4
5# This include just sets REV=XX
6.include "${TOP}/Makefile.inc"
7
8IMAGE=	ramdisk
9CBIN=	rd_bin
10
11TREE=	${TOP}/common/${IMAGE}.tree
12
13LISTS=	${TOP}/common/${CBIN}.list \
14	${TOP}/common/${IMAGE}.list
15
16MOUNT_POINT=	/mnt
17DISKTYPE=	rdroot
18BDEV=		/dev/rd0
19CDEV?=		/dev/rd0
20
21KERNEL=${SRCSYSDIR}/arch/sun3/compile/RAMDISK/netbsd
22
23# These are all the parameters for the root fs: (256K)
24NBLKS=		512
25# args: old fmt, minfree, opt, b/i  trks, sects, cpg
26NEWFSARGS= -O -m 0 -o space -i 2048 -t 2 -u 16 -c 16
27
28CLEANFILES= netbsd-rd rdsetroot
29
30netbsd-rd : rdsetroot ${IMAGE}.fs
31	cp ${KERNEL} netbsd-tmp
32	./rdsetroot  netbsd-tmp < ${IMAGE}.fs
33	-mv -f netbsd-tmp $@
34
35rdsetroot: ${TOP}/common/rdsetroot.c
36	$(CC) -o $@ -DDEBUG ${TOP}/common/rdsetroot.c
37
38${IMAGE}.fs: ${CBIN} do_mount do_files do_umount
39	dd if=${CDEV} of=$@ count=${NBLKS}
40
41# Do not delete this if I change my mind and kill make...
42.PRECIOUS: ${IMAGE}.fs
43
44# Rules used making ${IMAGE}.fs (do_*)
45.include "${TOP}/common/Make.fsimage"
46
47# Rules for making ${CBIN} ...
48.include "${TOP}/common/Make.crunch"
49
50${CBIN} : libhack.o
51
52# Use stubs to eliminate some large stuff from libc
53HACKSRC=${TOP}/../utils/libhack
54.include "${HACKSRC}/Makefile.inc"
55
56clean cleandir:
57	-rm -f a.out core *.core *.o
58	-rm -f ${CLEANFILES}
59
60# Standard rules needed by the above...
61.include <bsd.obj.mk>
62