1#	$NetBSD: Makefile,v 1.28 2024/05/17 20:27:09 christos Exp $
2
3.include <bsd.own.mk>
4.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
5.include <bsd.kernobj.mk>
6
7IMAGE=		ramdisk.fs
8IMAGESIZE=	600k
9MAKEFS_FLAGS+=	-f 15 -o density=3072,bsize=4096,fsize=512,optimization=space
10
11WARNS=		1
12DBG=		-Os -fno-unwind-tables -fno-ident
13
14# XXXMRG - see if these help/hinder reduced size?
15#-fno-jump-tables 
16#-fzero-initialized-in-bss
17#-fgcse-after-reload
18#-fdelete-null-pointer-checks
19#-fno-sched-interblock
20#-fno-sched-spec
21#-fsched-pressure
22#-fcode-hoisting
23#-ftree-partial-pre
24#-fno-ipa-cp
25#-ftree-builtin-call-dce
26#-fno-align-functions
27#-fno-align-loops
28#-fno-align-jumps
29#-fno-align-labels
30#-fallow-store-data-races
31
32CRUNCHBIN=	rd_bin
33LISTS=		${.CURDIR}/list
34MTREECONF=	${.CURDIR}/mtree.conf
35IMAGEENDIAN=	be
36IMAGESPECEXTRA=	dev/pipe
37MAKEDEVTARGETS=	std md0 cd0 st0 st1 sd0 sd1 sd2 xd0 xy0
38IMAGEDEPENDS=	${CRUNCHBIN} \
39		fstab passwd protocols ${DISTRIBDIR}/common/services \
40		sshrc welcome ${NETBSDSRCDIR}/etc/netconfig
41
42MDSETTARGETS=		RAMDISK ramdisk.fs -
43MDSET_RELEASEDIR=	binary/kernel
44
45# Use stubs to eliminate some large stuff from libc
46HACKSRC=	${DISTRIBDIR}/utils/libhack
47.MAKEFLAGS+=	NOIEEE80211=1
48.include	"${HACKSRC}/Makefile.inc"
49${CRUNCHBIN}:	libhack.o
50
51fstab: .PHONY
52
53.include "${DISTRIBDIR}/common/Makefile.crunch"
54.include "${DISTRIBDIR}/common/Makefile.makedev"
55.include "${DISTRIBDIR}/common/Makefile.image"
56.include "${DISTRIBDIR}/common/Makefile.mdset"
57
58.include <bsd.prog.mk>
59