1#	$NetBSD: Makefile.ramdisk,v 1.17 2024/03/20 13:51:35 riastradh Exp $
2
3NOSANITIZER=	# defined
4
5.include <bsd.own.mk>
6.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
7
8AMD64COMMON=	${.CURDIR}/../common
9
10.PATH:		${AMD64COMMON}
11
12WARNS=		1
13DBG=		-Os -fno-asynchronous-unwind-tables
14
15CRUNCHBIN=	ramdiskbin
16
17# Use ${.CURDIR}/list only if LISTS was not already defined by the caller.
18LISTS?=		${.CURDIR}/list
19LISTS+=		${AMD64COMMON}/list.ramdisk
20MTREECONF=	${DISTRIBDIR}/common/mtree.common
21IMAGEENDIAN=	le
22IMAGEDEPENDS+= 	${CRUNCHBIN} \
23		dot.profile \
24		${DESTDIR}/usr/mdec/boot \
25		${DESTDIR}/usr/mdec/bootxx_ffsv1 \
26		${DESTDIR}/usr/mdec/mbr \
27		${DESTDIR}/usr/mdec/mbr_ext \
28		${DESTDIR}/usr/mdec/mbr_bootsel \
29		${DESTDIR}/usr/mdec/gptmbr.bin \
30		${DESTDIR}/usr/mdec/bootia32.efi \
31		${DESTDIR}/usr/mdec/bootx64.efi \
32		${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
33		${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
34		${DISTRIBDIR}/common/services
35PARSELISTENV+=	BOOTMODEL=${BOOTMODEL:Q}
36
37.if defined(USE_SYSINST)
38LISTS+=		${DISTRIBDIR}/common/list.sysinst
39MAKEFS_FLAGS+=	-f 14
40.endif
41
42# Use stubs to eliminate some large stuff from libc
43HACKSRC=	${DISTRIBDIR}/utils/libhack
44.include	"${HACKSRC}/Makefile.inc"
45${CRUNCHBIN}:	libhack.o
46
47.include "${DISTRIBDIR}/common/Makefile.crunch"
48.include "${DISTRIBDIR}/common/Makefile.dhcpcd"
49.include "${DISTRIBDIR}/common/Makefile.makedev"
50.include "${DISTRIBDIR}/common/Makefile.image"
51
52release:	${IMAGE}
53	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${IMAGE} \
54		${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk/
55
56.include <bsd.prog.mk>
57