Home | History | Annotate | Line # | Download | only in common
      1 #	$NetBSD: Makefile.ramdisk,v 1.16 2024/03/20 13:51:35 riastradh Exp $
      2 
      3 NOSANITIZER=	# defined
      4 
      5 .include <bsd.own.mk>
      6 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
      7 
      8 I386COMMON=	${.CURDIR}/../common
      9 
     10 .PATH:		${I386COMMON}
     11 
     12 WARNS=		1
     13 DBG=		-Os
     14 
     15 CRUNCHBIN=	ramdiskbin
     16 
     17 # Use ${.CURDIR}/list only if LISTS was not already defined by the caller.
     18 LISTS?=		${.CURDIR}/list
     19 LISTS+=		${I386COMMON}/list.ramdisk
     20 MTREECONF=	${DISTRIBDIR}/common/mtree.common
     21 IMAGEENDIAN=	le
     22 IMAGEDEPENDS+= 	${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 		${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
     31 		${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
     32 		${DISTRIBDIR}/common/services
     33 PARSELISTENV+=	BOOTMODEL=${BOOTMODEL:Q}
     34 
     35 # This propagates through to the link of ramdiskbin
     36 # The map file is useful when trying to prune the image
     37 LDFLAGS+=	-Wl,-Map,${CRUNCHBIN}.map,--cref
     38 CRUNCHENV+=	LDFLAGS=${LDFLAGS:Q}
     39 CLEANFILES+=	${CRUNCHBIN}.map
     40 
     41 .if defined(USE_SYSINST)
     42 .if ${USE_SYSINST} != yes
     43 LISTS+=		${DISTRIBDIR}/common/list.sysinst.${USE_SYSINST}
     44 .else
     45 LISTS+=		${DISTRIBDIR}/common/list.sysinst
     46 .endif
     47 MAKEFS_FLAGS+=	-f 14
     48 .endif
     49 
     50 # Use stubs to eliminate some large stuff from libc
     51 HACKSRC=	${DISTRIBDIR}/utils/libhack
     52 .include	"${HACKSRC}/Makefile.inc"
     53 ${CRUNCHBIN}:	libhack.o
     54 
     55 .include "${DISTRIBDIR}/common/Makefile.crunch"
     56 .include "${DISTRIBDIR}/common/Makefile.makedev"
     57 .include "${DISTRIBDIR}/common/Makefile.image"
     58 
     59 release:	${IMAGE}
     60 	${HOST_INSTALL_FILE} -m ${NONBINMODE} ${IMAGE} \
     61 		${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisk/
     62 
     63 .include <bsd.prog.mk>
     64