128e5f5e67
were dealing with DBG (-d) LDSTATIC/NOPIE (-p), and the rest with disabling/enabling sanitizers. 2. Use emalloc/estrdup for all the allocators instead of only some cases. 3. Add -V varspec which passes variables on the command line (as DBG and LDSTATIC used to be passed before) instead of appending them to the on-the-fly Makefile using -v varspec. 4. Change the distrib and rescue Makefiles to use -V instead of the removed flags. The motivation of this is to make variable handling consistent, less magical, and remove the need for changing crunchgen each time we want to add disabling an option by default. (as proposed in tech-toolchain)
63 lines
1.7 KiB
Makefile
63 lines
1.7 KiB
Makefile
# $NetBSD: Makefile,v 1.38 2019/12/29 18:26:18 christos Exp $
|
|
|
|
.include <bsd.own.mk>
|
|
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
|
|
|
|
.include <bsd.kernobj.mk>
|
|
|
|
IMAGE= miniroot.fs
|
|
IMAGESIZE= 4200k
|
|
MAKEFS_FLAGS+= -o density=8k
|
|
|
|
KERNEL= ${KERNOBJDIR}/INSTALL/netbsd
|
|
|
|
WARNS= 1
|
|
DBG= -Os -fno-unwind-tables
|
|
|
|
CRUNCHBIN= instbin
|
|
|
|
LISTS= ${.CURDIR}/list
|
|
MTREECONF= ${.CURDIR}/mtree.conf
|
|
IMAGEENDIAN= be
|
|
PARSELISTENV= KERNEL=${KERNEL}
|
|
MAKEDEVTARGETS= std md0 cd0 st0 st1 sd0 sd1 sd2 xd0 xy0
|
|
IMAGEDEPENDS= ${CRUNCHBIN} \
|
|
${KERNEL} \
|
|
fstab install.md profile \
|
|
${DESTDIR}/dev/MAKEDEV ${DESTDIR}/dev/MAKEDEV.local \
|
|
${DESTDIR}/etc/group \
|
|
${DESTDIR}/etc/master.passwd ${DESTDIR}/etc/netconfig \
|
|
${DESTDIR}/etc/passwd \
|
|
${DISTRIBDIR}/common/protocols \
|
|
${DESTDIR}/etc/pwd.db \
|
|
${DISTRIBDIR}/common/services \
|
|
${DESTDIR}/etc/spwd.db \
|
|
${DESTDIR}/usr/mdec/bootxx ${DESTDIR}/usr/mdec/bootyy \
|
|
${DESTDIR}/usr/mdec/netboot ${DESTDIR}/usr/mdec/tapeboot \
|
|
${DESTDIR}/usr/mdec/ufsboot \
|
|
${DISTRIBDIR}/miniroot/install.sh \
|
|
${DISTRIBDIR}/miniroot/upgrade.sh \
|
|
install.sub
|
|
|
|
IMAGEPOSTBUILD= ${TOOL_INSTALLBOOT} -v -m ${MACHINE} ${IMAGE} \
|
|
${DESTDIR}/usr/mdec/bootxx /ufsboot
|
|
IMAGE_RELEASEDIR= installation/miniroot
|
|
|
|
# Use stubs to eliminate some large stuff from libc
|
|
HACKSRC= ${DISTRIBDIR}/utils/libhack
|
|
.include "${HACKSRC}/Makefile.inc"
|
|
${CRUNCHBIN}: libhack.o
|
|
|
|
install.sub: ${DISTRIBDIR}/miniroot/install.sub
|
|
${TOOL_SED} -e "/^VERSION=/s/=.*/=${DISTRIBREV}/" < $? > $@
|
|
|
|
CLEANFILES+= install.sub
|
|
|
|
fstab: .PHONY
|
|
|
|
.include "${DISTRIBDIR}/common/Makefile.crunch"
|
|
.include "${DISTRIBDIR}/common/Makefile.makedev"
|
|
.include "${DISTRIBDIR}/common/Makefile.image"
|
|
|
|
.include <bsd.prog.mk>
|