Makefile revision 1.11
11.11Sjmc# $NetBSD: Makefile,v 1.11 2001/10/13 06:15:18 jmc Exp $ 21.1Sscw 31.1SscwTOP= ${.CURDIR}/.. 41.1Sscw 51.1Sscw# This include just sets REV=XX 61.1Sscw.include "${TOP}/Makefile.inc" 71.1Sscw 81.1SscwIMAGE= ramdisk-${REV}.fs 91.1SscwCBIN= rd_bin 101.1Sscw 111.1SscwTREE= mtree.conf 121.1SscwLISTS= list 131.1SscwCRUNCHCONF= ${CBIN}.conf 141.1Sscw 151.6SsjgKERNEL= ${KERNOBJDIR}/RAMDISK/netbsd 161.1Sscw 171.1SscwMOUNT_POINT?= /mnt 181.1Sscw# DEV/RDEV file system device, CDEV/RDEV vnconfig device 191.1SscwVND?= vnd0 201.1SscwVND_CDEV= /dev/${VND}c 211.1SscwVND_CRDEV= /dev/r${VND}c 221.1Sscw 231.8SgarbledCRUNCHGEN?= crunchgen 241.11SjmcMTREE?= mtree 251.8Sgarbled 261.1Sscw# These are all the parameters for the root fs: (384K) 271.1Sscw# NOTE: If you change NBLKS, you *must* also edit the 281.1Sscw# rdroot entry in /etc/disktab 291.1SscwDISKTYPE= rdroot 301.9SscwNBLKS= 1024 311.1Sscw 321.1SscwCLEANFILES= netbsd-rd ${IMAGE} 331.1Sscw 341.1Sscwnetbsd-rd: ${IMAGE} 351.1Sscw cp ${KERNEL} netbsd-tmp 361.1Sscw mdsetimage netbsd-tmp ${IMAGE} 371.1Sscw -mv -f netbsd-tmp $@ 381.1Sscw 391.1Sscw${IMAGE}: ${TREE} ${LISTS} ${CBIN} 401.1Sscw dd if=/dev/zero of=${IMAGE} count=${NBLKS} 411.1Sscw vnconfig -t ${DISKTYPE} -v -c ${VND_CDEV} ${IMAGE} 421.4Swrstuden newfs -B be -m 0 -o space -i 2048 ${VND_CRDEV} ${DISKTYPE} 431.1Sscw mount ${VND_CDEV} ${MOUNT_POINT} 441.11Sjmc ${MTREE} -def ${.CURDIR}/${TREE} -p ${MOUNT_POINT}/ -u 451.1Sscw TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \ 461.6Ssjg KERNOBJDIR=${KERNOBJDIR} \ 471.1Sscw TARGDIR=${MOUNT_POINT} sh ${.CURDIR}/runlist.sh ${.CURDIR}/${LISTS} 481.1Sscw @echo "" 491.1Sscw @df -i ${MOUNT_POINT} 501.1Sscw @echo "" 511.1Sscw umount ${MOUNT_POINT} 521.1Sscw vnconfig -u ${VND_CDEV} 531.1Sscw 541.1Sscwunconfig: 551.1Sscw -umount -f ${MOUNT_POINT} 561.1Sscw -vnconfig -u ${VND_CDEV} 571.1Sscw -/bin/rm -f ${IMAGE} 581.1Sscw 591.1Sscw# Do not delete this if I change my mind and kill make... 601.1Sscw.PRECIOUS: ${IMAGE} 611.1Sscw 621.1SscwCLEANFILES+= ${CBIN} ${CBIN}.c ${CBIN}.cache ${CBIN}.mk ${CBIN}.syms 631.5SveegoCLEANFILES+= *.cro *_stub.o *_stub.c 641.1Sscw 651.1Sscw${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF} 661.8Sgarbled ${CRUNCHGEN} -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CRUNCHCONF} 671.1Sscw 681.1Sscw${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c 691.7Sjhawk ${MAKE} -f ${CBIN}.mk all 701.1Sscw 711.1Sscw# This is listed in rd_bin.conf but is built here. 721.1Sscw${CBIN} : libhack.o 731.1Sscw 741.1Sscw# Use stubs to eliminate some large stuff from libc 751.1SscwHACKSRC=${TOP}/../utils/libhack 761.1Sscw.include "${HACKSRC}/Makefile.inc" 771.9Sscw 781.9Sscwrelease: netbsd-rd 791.10Sscw -mkdir -p ${RELEASEDIR}/installation/tapeimage 801.9Sscw gzip < netbsd-rd > ${RELEASEDIR}/installation/tapeimage/netbsd-rd.gz 811.1Sscw 821.3Slukemclean cleandir distclean: 831.1Sscw -rm -f a.out core *.core *.o 841.1Sscw -rm -f ${CLEANFILES} 851.1Sscw 861.1Sscw# Standard rules needed by the above... 871.6Ssjg.include <bsd.kernobj.mk> 881.1Sscw.include <bsd.obj.mk> 89