Makefile revision 1.4
11.4Sveego#	$NetBSD: Makefile,v 1.4 1999/05/11 20:08:01 veego Exp $
21.1Sross
31.1SrossIMAGE1=		disk1of2
41.1SrossIMAGE2=		disk2of2
51.1Sross
61.1SrossINSTKERNEL!=cd ${.CURDIR}/../instkernel; \
71.2Sross	printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/netbsd.gz\n" | \
81.1Sross	${MAKE} -s -f-
91.1Sross
101.1SrossMOUNT_POINT?=	/mnt
111.1SrossVND?=		vnd0
121.1SrossVND_DEV=	/dev/${VND}a
131.1SrossVND_RDEV=	/dev/r${VND}a
141.1SrossVND_CDEV=	/dev/${VND}c
151.1SrossVND_CRDEV=	/dev/r${VND}c
161.1SrossKERN?=		netbsd-xxx
171.1SrossMDEC=		${DESTDIR}/usr/mdec
181.1SrossFSTMP=		ustar.tmp
191.1Sross
201.3ScgdPRIMARYBOOT=	${DESTDIR}/usr/mdec/bootxx.old
211.1SrossSECONDARYBOOT=	${DESTDIR}/usr/mdec/boot
221.1Sross
231.1SrossDISKTYPE=	floppy
241.1Sross
251.1SrossCLEANFILES+=	netbsd ${FSTMP} ${IMAGE1} ${IMAGE2} tmp tmp.gz
261.1Sross
271.1Srossall:	netbsd
281.1Sross	@echo Making disk number one.
291.1Sross	tar cvf ${FSTMP} ${SECONDARYBOOT} netbsd
301.1Sross	@ echo ''
311.1Sross	@ls -l ${FSTMP} | (read mode links uid gid size junk;	\
321.1Sross		bytes=$$((2880 * 512 * 2 - $$size - 8 * 1024));		\
331.1Sross		echo There are $$bytes \($$(($$bytes / 1024))K\) bytes free\
341.1Sross			on disk 2.)
351.1Sross	@ echo ''
361.1Sross	dd if=/dev/zero of=${IMAGE1} count=2880
371.1Sross	vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE1}
381.1Sross	dd bs=8k seek=1 count=179 if=${FSTMP} of=${VND_CDEV}
391.1Sross	disklabel -rw ${VND_CDEV} ${DISKTYPE}
401.1Sross	@echo "installing new bootblocks"
411.3Scgd	${MDEC}/installboot.old -b 17 -v	\
421.1Sross		${SECONDARYBOOT} ${PRIMARYBOOT} ${VND_CRDEV}
431.1Sross	vnconfig -u ${VND_CDEV}
441.1Sross	@echo Making disk number two.
451.1Sross	echo USTARFS 2 > ${IMAGE2}
461.1Sross	(echo 'Prototype image created on: ';	\
471.1Sross		echo -n '     '; date;		\
481.1Sross		echo -n '     '; date -u) >> ${IMAGE2}
491.1Sross	(echo Hash value of corresponding volume:; md5 ${IMAGE1}) >> ${IMAGE2}
501.1Sross	dd bs=8k seek=1 skip=179 conv=sync if=${FSTMP} of=${IMAGE2}
511.1Sross	@rm ${FSTMP}
521.1Sross
531.1Srossnetbsd: ${INSTKERNEL}
541.2Sross	cp ${INSTKERNEL} netbsd
551.1Sross
561.1Srossunconfig:
571.1Sross	-umount -f ${MOUNT_POINT}
581.1Sross	-vnconfig -u ${VND_CDEV}
591.1Sross	-/bin/rm -f ${IMAGE1} ${IMAGE2}
601.1Sross
611.1Srossclean cleandir distclean:
621.1Sross	/bin/rm -f *.core ${CLEANFILES}
631.4Sveego
641.4Sveego# nothing to do here
651.4Sveegodepend includes lint regress tags:
661.1Sross
671.1Sross.include <bsd.own.mk>
681.1Sross.include <bsd.obj.mk>
69