1# $OpenBSD: Makefile,v 1.29 2023/04/28 08:45:25 krw Exp $ 2 3MTREE= ${UTILS}/mtree.conf 4RAMDISK= RAMDISK 5 6LISTS= ${.CURDIR}/list 7UTILS= ${.CURDIR}/../../miniroot 8 9MRDISKTYPE= rdroot 10MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 11 12all: bsd.rd 13 14bsd.rd: mr.fs 15 cp bsd bsd.rd 16 rdsetroot bsd.rd mr.fs 17 18bsd: 19 cd ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK} && \ 20 su ${BUILDUSER} -c '${MAKE} config && ${MAKE} clean && exec ${MAKE} ${MFLAGS}' 21 cp -p ${.CURDIR}/../../../sys/arch/${MACHINE}/compile/${RAMDISK}/obj/bsd bsd 22 23mr.fs: instbin bsd 24 rm -rf $@.d 25 install -d -o root -g wheel $@.d 26 mtree -def ${MTREE} -p $@.d -u 27 CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} OSrev=${OSrev} \ 28 TARGDIR=$@.d UTILS=${UTILS} RELEASEDIR=${RELEASEDIR} \ 29 sh ${UTILS}/runlist.sh ${LISTS} 30 rm $@.d/instbin 31 makefs ${MRMAKEFSARGS} $@ $@.d 32 33instbin.mk instbin.cache instbin.c: instbin.conf 34 crunchgen -E -D ${.CURDIR}/../../.. -L ${DESTDIR}/usr/lib \ 35 -c instbin.c -e instbin -m instbin.mk instbin.conf 36 37instbin: instbin.mk instbin.cache instbin.c 38 ${MAKE} ${MFLAGS} -f instbin.mk SRCLIBDIR=${.CURDIR}/../../../lib all 39 40instbin.conf: ${LISTS} 41 awk -f ${UTILS}/makeconf.awk ${LISTS} > instbin.conf 42 43.ifdef RELEASEDIR 44install: 45 cp bsd.rd ${RELEASEDIR}/bsd.rd 46 chmod a+r ${RELEASEDIR}/bsd.rd 47.endif 48 49clean cleandir: 50 rm -f *.core mr.fs instbin instbin.mk instbin.cache \ 51 lib*.a lib*.olist instbin.map *.o *.lo *.c 52 rm -f instbin.conf 53 rm -rf cd-dir mr.fs.d 54 55.include <bsd.obj.mk> 56