Makefile revision 1.19
1# $NetBSD: Makefile,v 1.19 2000/08/30 23:51:51 jhawk Exp $ 2 3TOP= ${.CURDIR}/.. 4MINIROOT= ${.CURDIR}/../../miniroot 5 6.include "${TOP}/Makefile.inc" 7 8CBIN= ramdiskbin 9 10MOUNT_POINT?= /mnt 11# DEV/RDEV file system device, CDEV/RDEV vnconfig device 12VND?= vnd0 13VND_DEV= /dev/${VND}a 14VND_RDEV= /dev/r${VND}a 15VND_CDEV= /dev/${VND}c 16VND_CRDEV= /dev/r${VND}c 17MDEC= ${DESTDIR}/usr/mdec 18IMAGE?= ramdisk.fs 19 20LISTS= list 21MTREE= mtree.conf 22 23SIZE= 1980k 24DISKTYPE= instfs 25GEOM= 512/18/2/110 26INO_BYTES= 4096 27 28all: ${CBIN} 29 dd if=/dev/zero of=${IMAGE} bs=${SIZE} count=1 30 #vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE} 31 vnconfig -v -c ${VND_CDEV} ${IMAGE} ${GEOM} 32 #disklabel -rw ${VND_CDEV} ${DISKTYPE} 33 #disklabel -W ${VND_CDEV} 34 newfs -B be -m 0 -o space -i ${INO_BYTES} ${VND_RDEV} 35 mount ${VND_DEV} ${MOUNT_POINT} 36 mtree -def ${.CURDIR}/${MTREE} -p ${MOUNT_POINT}/ -u 37 TOPDIR=${TOP} CURDIR=${MINIROOT} REALCURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ 38 KERNOBJDIR=${KERNOBJDIR} \ 39 TARGDIR=${MOUNT_POINT} sh ${MINIROOT}/runlist.sh ${.CURDIR}/${LISTS} 40 @echo "" 41 @df -i ${MOUNT_POINT} 42 @echo "" 43 umount ${MOUNT_POINT} 44 vnconfig -u ${VND_CDEV} 45 46unconfig: 47 -umount -f ${MOUNT_POINT} 48 -vnconfig -u ${VND_DEV} 49 -/bin/rm -f ${IMAGE} 50 51${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CBIN}.conf 52 crunchgen -D ${TOP}/../.. -L ${DESTDIR}/usr/lib ${.ALLSRC} 53 54${CBIN}.conf: ${LISTS} 55 awk -f ${MINIROOT}/makeconf.awk CBIN=${CBIN} ${.CURDIR}/${LISTS} > ${CBIN}.conf 56 57${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c 58 ${MAKE} -f ${CBIN}.mk all 59 60# This is listed in ramdiskbin.conf but is built here. 61${CBIN}: libhack.o 62 63# Use stubs to eliminate some large stuff from libc 64NOLIBHACKOPENDIR=1 65HACKSRC=${TOP}/../utils/libhack 66.include "${HACKSRC}/Makefile.inc" 67 68clean cleandir distclean: 69 /bin/rm -f *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache \ 70 ${CBIN}.conf *.o *.cro *.c 71 72.ifndef RELEASEDIR 73release: 74 @echo setenv RELEASEDIR first 75 @false 76.else 77release: $(IMAGE) 78 gzip -c -9 < $(.OBJDIR)/ramdisk.fs \ 79 > $(RELEASEDIR)/installation/bootfs/ramdisk.fs.gz 80.endif # RELEASEDIR check 81 82.include <bsd.obj.mk> 83.include <bsd.subdir.mk> 84