1# $OpenBSD: Makefile,v 1.4 2009/04/17 03:58:55 deraadt Exp $ 2 3TOP= ${.CURDIR}/.. 4 5.include "${TOP}/Makefile.inc" 6 7TARGET=miniroot${REV}.fs 8 9.ifndef DESTDIR 10all ${TARGET}: 11 @echo setenv DESTDIR before making a ramdisk! 12 @false 13.else 14 15all: ${TARGET} 16 17${TARGET}: vn_up install_files installboot showit vn_down 18 19vn_up: blank_filesystem 20 vnconfig svnd0 ${TARGET} 21 disklabel -w svnd0 fakeramdisk 22 newfs -m 0 /dev/rsvnd0a 23 mount /dev/svnd0a /mnt 24 25showit: 26 df -ki /mnt 27 28vn_down: 29 -umount /mnt 30 -vnconfig -u svnd0 31 32install_files: bsd.rd ofwboot 33 34bsd.rd: 35 install -c -m 555 -o root -g wheel \ 36 ${.OBJDIR}/../bsd.rd/bsd.rd /mnt/bsd 37 38ofwboot: 39 install -c -m 555 -o root -g wheel \ 40 ${DESTDIR}/usr/mdec/ofwboot /mnt/ofwboot 41 42installboot: 43 /usr/mdec/installboot -v ${DESTDIR}/usr/mdec/bootblk /dev/svnd0c 44 45blank_filesystem: 46 dd if=/dev/zero of=${TARGET} bs=512 count=5120 47 48.endif 49 50unconfig: 51 -umount -f /mnt 52 -vnconfig -u /dev/svnd0a 53 54.ifdef RELEASEDIR 55install: 56 cp ${TARGET} ${RELEASEDIR} 57.endif 58 59clean: 60 rm -f ${TARGET} 61 62.include <bsd.own.mk> 63.include <bsd.obj.mk> 64.include <bsd.subdir.mk> 65