Makefile revision 1.3
11.3Sgwr#	$NetBSD: Makefile,v 1.3 1995/11/21 21:19:14 gwr Exp $
21.1Sgwr
31.1SgwrTOP=		${.CURDIR}/..
41.1Sgwr
51.1Sgwr# This include just sets REV=XX
61.1Sgwr.include "${TOP}/Makefile.inc"
71.1Sgwr
81.1SgwrIMAGE=	ramdisk
91.1SgwrCBIN=	rd_bin
101.1Sgwr
111.1SgwrTREE=	${TOP}/common/${IMAGE}.tree
121.1Sgwr
131.1SgwrLISTS=	${TOP}/common/${CBIN}.list \
141.1Sgwr	${TOP}/common/${IMAGE}.list
151.1Sgwr
161.3SgwrKERNEL=${SRCSYSDIR}/arch/sun3/compile/RAMDISK/netbsd
171.3Sgwr
181.1SgwrMOUNT_POINT=	/mnt
191.1SgwrBDEV=		/dev/rd0
201.3SgwrCDEV=		/dev/rd0
211.1Sgwr
221.1Sgwr# These are all the parameters for the root fs: (256K)
231.3SgwrDISKTYPE=	rdroot
241.1SgwrNBLKS=		512
251.3Sgwr# old format, minfree, opt, b/i  trks, sects, cpg
261.1SgwrNEWFSARGS= -O -m 0 -o space -i 2048 -t 2 -u 16 -c 16
271.1Sgwr
281.3SgwrCLEANFILES= netbsd-rd rdsetroot ${IMAGE}.fs
291.1Sgwr
301.1Sgwrnetbsd-rd : rdsetroot ${IMAGE}.fs
311.1Sgwr	cp ${KERNEL} netbsd-tmp
321.1Sgwr	./rdsetroot  netbsd-tmp < ${IMAGE}.fs
331.1Sgwr	-mv -f netbsd-tmp $@
341.1Sgwr
351.1Sgwrrdsetroot: ${TOP}/common/rdsetroot.c
361.1Sgwr	$(CC) -o $@ -DDEBUG ${TOP}/common/rdsetroot.c
371.1Sgwr
381.3Sgwr${IMAGE}.fs: ${TREE} ${LISTS} ${CBIN}
391.3Sgwr	-newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE}
401.3Sgwr	mount ${BDEV} ${MOUNT_POINT}
411.3Sgwr	mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
421.3Sgwr	TOPDIR=${TOP} CURDIR=${.CURDIR} \
431.3Sgwr	  OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \
441.3Sgwr	  sh ${TOP}/common/RunList.sh ${LISTS}
451.3Sgwr	sync
461.3Sgwr	@echo ""
471.3Sgwr	@df -i ${MOUNT_POINT}
481.3Sgwr	@echo ""
491.3Sgwr	-umount ${MOUNT_POINT}
501.1Sgwr	dd if=${CDEV} of=$@ count=${NBLKS}
511.1Sgwr
521.2Sgwr# Do not delete this if I change my mind and kill make...
531.2Sgwr.PRECIOUS: ${IMAGE}.fs
541.2Sgwr
551.1Sgwr# Rules for making ${CBIN} ...
561.1Sgwr.include "${TOP}/common/Make.crunch"
571.1Sgwr
581.3Sgwr# This is listed in rd_bin.conf but is built here.
591.1Sgwr${CBIN} : libhack.o
601.1Sgwr
611.1Sgwr# Use stubs to eliminate some large stuff from libc
621.1SgwrHACKSRC=${TOP}/../utils/libhack
631.1Sgwr.include "${HACKSRC}/Makefile.inc"
641.1Sgwr
651.1Sgwrclean cleandir:
661.2Sgwr	-rm -f a.out core *.core *.o
671.2Sgwr	-rm -f ${CLEANFILES}
681.1Sgwr
691.1Sgwr# Standard rules needed by the above...
701.1Sgwr.include <bsd.obj.mk>
71