#       $NetBSD: Makefile.ramdisk,v 1.10 2019/12/29 18:26:18 christos Exp $

include <bsd.own.mk>
include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"

OFPPCCOMMON=    ${.CURDIR}/../common

PATH:           ${OFPPCCOMMON}

WARNS=          1
DBG=            -Os -fno-asynchronous-unwind-tables

CRUNCHBIN=      ramdiskbin

# Use ${.CURDIR}/list only if LISTS was not already defined by the caller.
LISTS?=         ${.CURDIR}/list
LISTS+=         ${OFPPCCOMMON}/list.ramdisk
MTREECONF=      ${DISTRIBDIR}/common/mtree.common ${.CURDIR}/../common/mtree.ramdisk
MAKEDEVTARGETS= ramdisk
IMAGEENDIAN=    le
IMAGEDEPENDS+=  ${CRUNCHBIN} \
               dot.profile \
               ${DESTDIR}/usr/mdec/ofwboot \
               ${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
               ${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
               ${DISTRIBDIR}/common/services
PARSELISTENV+=  BOOTMODEL=${BOOTMODEL:Q}

if defined(USE_SYSINST)
# MI sysinst list has has languages we do not
#LISTS+=                ${DISTRIBDIR}/common/list.sysinst
LISTS+=         ${.CURDIR}/../common/list.sysinst
MAKEFS_FLAGS+=  -f 14
endif

# Use stubs to eliminate some large stuff from libc
HACKSRC=        ${DISTRIBDIR}/utils/libhack
include "${HACKSRC}/Makefile.inc"
${CRUNCHBIN}:   libhack.o

include "${DISTRIBDIR}/common/Makefile.crunch"
include "${DISTRIBDIR}/common/Makefile.dhcpcd"
include "${DISTRIBDIR}/common/Makefile.makedev"
include "${DISTRIBDIR}/common/Makefile.image"

release:

include <bsd.prog.mk>