1 # $NetBSD: Makefile.ramdisk,v 1.13 2018/03/13 02:22:43 mrg Exp $ 2 3 .include <bsd.own.mk> 4 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" 5 6 I386COMMON= ${.CURDIR}/../common 7 8 .PATH: ${I386COMMON} 9 10 WARNS= 1 11 DBG= -Os 12 13 CRUNCHBIN= ramdiskbin 14 15 # Use ${.CURDIR}/list only if LISTS was not already defined by the caller. 16 LISTS?= ${.CURDIR}/list 17 LISTS+= ${I386COMMON}/list.ramdisk 18 MTREECONF= ${DISTRIBDIR}/common/mtree.common 19 IMAGEENDIAN= le 20 IMAGEDEPENDS+= ${CRUNCHBIN} \ 21 dot.profile \ 22 ${DESTDIR}/usr/mdec/boot \ 23 ${DESTDIR}/usr/mdec/bootxx_ffsv1 \ 24 ${DESTDIR}/usr/mdec/mbr \ 25 ${DESTDIR}/usr/mdec/mbr_ext \ 26 ${DESTDIR}/usr/mdec/mbr_bootsel \ 27 ${DESTDIR}/usr/mdec/gptmbr.bin \ 28 ${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \ 29 ${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \ 30 ${DISTRIBDIR}/common/services 31 PARSELISTENV+= BOOTMODEL=${BOOTMODEL:Q} 32 33 # This propogates through to the link of ramdiskbin 34 # The map file is useful when trying to prune the image 35 LDFLAGS+= -Wl,-Map,${CRUNCHBIN}.map,--cref 36 CRUNCHENV+= LDFLAGS=${LDFLAGS:Q} 37 CLEANFILES+= ${CRUNCHBIN}.map 38 39 .if defined(USE_SYSINST) 40 .if ${USE_SYSINST} != yes 41 LISTS+= ${DISTRIBDIR}/common/list.sysinst.${USE_SYSINST} 42 .else 43 LISTS+= ${DISTRIBDIR}/common/list.sysinst 44 .endif 45 MAKEFS_FLAGS+= -f 14 46 .endif 47 48 # Use stubs to eliminate some large stuff from libc 49 HACKSRC= ${DISTRIBDIR}/utils/libhack 50 .include "${HACKSRC}/Makefile.inc" 51 ${CRUNCHBIN}: libhack.o 52 53 .include "${DISTRIBDIR}/common/Makefile.crunch" 54 .include "${DISTRIBDIR}/common/Makefile.makedev" 55 .include "${DISTRIBDIR}/common/Makefile.image" 56 57 release: 58 59 .include <bsd.prog.mk> 60