Makefile revision 1.9
11.9Sgwr#	$NetBSD: Makefile,v 1.9 1999/05/16 08:21:53 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.9SgwrKERNEL3  = ${KERNOBJDIR}/RAMDISK/netbsd
171.9SgwrKERNEL3X = ${KERNOBJDIR}/RAMDISK3X/netbsd
181.3Sgwr
191.9SgwrMOUNT_POINT?=	/mnt
201.9SgwrBDEV?=		/dev/sd1b
211.9SgwrCDEV?=		/dev/rsd1b
221.1Sgwr
231.1Sgwr# These are all the parameters for the root fs: (256K)
241.3SgwrDISKTYPE=	rdroot
251.1SgwrNBLKS=		512
261.9Sgwr# bigendian, old format, minfree, opt, b/i  trks, sects, cpg
271.8SgwrNEWFSARGS= -B be -O -m 0 -o space -i 2048 -t 2 -u 16 -c 16
281.1Sgwr
291.5SgwrCLEANFILES= netbsd-rd.sun3 netbsd-rd.sun3x rdsetroot ${IMAGE}.fs
301.1Sgwr
311.5Sgwrall: netbsd-rd.sun3 netbsd-rd.sun3x
321.5Sgwr
331.5Sgwrnetbsd-rd.sun3 : rdsetroot ${IMAGE}.fs
341.5Sgwr	cp ${KERNEL3} netbsd-tmp
351.5Sgwr	./rdsetroot  netbsd-tmp < ${IMAGE}.fs
361.5Sgwr	-mv -f netbsd-tmp $@
371.5Sgwr
381.5Sgwrnetbsd-rd.sun3x : rdsetroot ${IMAGE}.fs
391.5Sgwr	cp ${KERNEL3X} netbsd-tmp
401.1Sgwr	./rdsetroot  netbsd-tmp < ${IMAGE}.fs
411.1Sgwr	-mv -f netbsd-tmp $@
421.1Sgwr
431.1Sgwrrdsetroot: ${TOP}/common/rdsetroot.c
441.1Sgwr	$(CC) -o $@ -DDEBUG ${TOP}/common/rdsetroot.c
451.1Sgwr
461.3Sgwr${IMAGE}.fs: ${TREE} ${LISTS} ${CBIN}
471.8Sgwr	-newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE}
481.3Sgwr	mount ${BDEV} ${MOUNT_POINT}
491.3Sgwr	mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
501.3Sgwr	TOPDIR=${TOP} CURDIR=${.CURDIR} \
511.3Sgwr	  OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \
521.3Sgwr	  sh ${TOP}/common/RunList.sh ${LISTS}
531.3Sgwr	sync
541.3Sgwr	@echo ""
551.3Sgwr	@df -i ${MOUNT_POINT}
561.3Sgwr	@echo ""
571.3Sgwr	-umount ${MOUNT_POINT}
581.4Sgwr	dd if=${CDEV} of=$@ bs=16b \
591.4Sgwr	  count=`expr ${NBLKS} / 16`
601.1Sgwr
611.2Sgwr# Do not delete this if I change my mind and kill make...
621.2Sgwr.PRECIOUS: ${IMAGE}.fs
631.2Sgwr
641.1Sgwr# Rules for making ${CBIN} ...
651.1Sgwr.include "${TOP}/common/Make.crunch"
661.1Sgwr
671.3Sgwr# This is listed in rd_bin.conf but is built here.
681.1Sgwr${CBIN} : libhack.o
691.1Sgwr
701.1Sgwr# Use stubs to eliminate some large stuff from libc
711.1SgwrHACKSRC=${TOP}/../utils/libhack
721.1Sgwr.include "${HACKSRC}/Makefile.inc"
731.1Sgwr
741.6Slukemclean cleandir distclean:
751.2Sgwr	-rm -f a.out core *.core *.o
761.2Sgwr	-rm -f ${CLEANFILES}
771.1Sgwr
781.1Sgwr# Standard rules needed by the above...
791.1Sgwr.include <bsd.obj.mk>
80