Makefile revision 1.4
1# $NetBSD: Makefile,v 1.4 1997/12/12 03:46:59 gwr Exp $ 2 3TOP= ${.CURDIR}/.. 4 5# This include just sets REV=XX 6.include "${TOP}/Makefile.inc" 7 8IMAGE= ramdisk 9CBIN= rd_bin 10 11TREE= ${TOP}/common/${IMAGE}.tree 12 13LISTS= ${TOP}/common/${CBIN}.list \ 14 ${TOP}/common/${IMAGE}.list 15 16KERNEL=${SRCSYSDIR}/arch/sun3/compile/RAMDISK/netbsd 17 18MOUNT_POINT= /mnt 19#BDEV= /dev/md0 20#CDEV= /dev/md0 21BDEV= /dev/sd1b 22CDEV= /dev/rsd1b 23 24# These are all the parameters for the root fs: (256K) 25DISKTYPE= rdroot 26NBLKS= 512 27# old format, minfree, opt, b/i trks, sects, cpg 28NEWFSARGS= -O -m 0 -o space -i 2048 -t 2 -u 16 -c 16 29 30CLEANFILES= netbsd-rd rdsetroot ${IMAGE}.fs 31 32netbsd-rd : rdsetroot ${IMAGE}.fs 33 cp ${KERNEL} netbsd-tmp 34 ./rdsetroot netbsd-tmp < ${IMAGE}.fs 35 -mv -f netbsd-tmp $@ 36 37rdsetroot: ${TOP}/common/rdsetroot.c 38 $(CC) -o $@ -DDEBUG ${TOP}/common/rdsetroot.c 39 40${IMAGE}.fs: ${TREE} ${LISTS} ${CBIN} 41 -newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE} 42 mount ${BDEV} ${MOUNT_POINT} 43 mtree -def ${TREE} -p ${MOUNT_POINT}/ -u 44 TOPDIR=${TOP} CURDIR=${.CURDIR} \ 45 OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \ 46 sh ${TOP}/common/RunList.sh ${LISTS} 47 sync 48 @echo "" 49 @df -i ${MOUNT_POINT} 50 @echo "" 51 -umount ${MOUNT_POINT} 52 dd if=${CDEV} of=$@ bs=16b \ 53 count=`expr ${NBLKS} / 16` 54 55# Do not delete this if I change my mind and kill make... 56.PRECIOUS: ${IMAGE}.fs 57 58# Rules for making ${CBIN} ... 59.include "${TOP}/common/Make.crunch" 60 61# This is listed in rd_bin.conf but is built here. 62${CBIN} : libhack.o 63 64# Use stubs to eliminate some large stuff from libc 65HACKSRC=${TOP}/../utils/libhack 66.include "${HACKSRC}/Makefile.inc" 67 68clean cleandir: 69 -rm -f a.out core *.core *.o 70 -rm -f ${CLEANFILES} 71 72# Standard rules needed by the above... 73.include <bsd.obj.mk> 74