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