Ben Gras cd34841de5 INIT died problem / build system robustness
Changes provoked by debugging / making 'PM: INIT died' error debuggable.

This was caused (in one instance) by a missing /dev/console (and everything
else) on the boot time ramdisk.

	. sanity-check against this case by checking for console
	. PM: print init stacktrace and exit status when init dies
	. eliminate some explicitly invoked ${MAKE}s and a rm -rf in
	  Makefiles, causing race conditions; use explicit ordering (.WAIT)
	  instead, moving some of the burden of dependencies of partial builds
	  to the user. On the plus side, generate ramdisk just once.
	. make mkfs.mfs fail as soon as it sees an error missing file in
	  the proto file. - except for EACCES on minix native for the mfs
	  test. also fix some fmt warnings.
	. init: include debug info in executable

Change-Id: I8eea4986a4f64ecaf223aff5da321d8b4f4a3fa4
2014-08-28 08:52:50 +02:00

38 lines
834 B
Makefile

# Makefile for memory driver (MEMORY)
.include <bsd.own.mk>
USE_BITCODE:=no
PROG= memory
SRCS= memory.c imgrd.mfs
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
MKBUILDEXT2RD?= no
RAMDISK_PATH= ${NETBSDSRCDIR}/minix/drivers/storage/ramdisk
DPADD+= ${LIBBLOCKDRIVER} ${LIBCHARDRIVER}
LDADD+= -lblockdriver -lchardriver
CPPFLAGS.memory.c+= -I${NETBSDSRCDIR}/minix
imgrd.d: touch-genfiles
touch-genfiles:
[ -e ../ramdisk/image ] || touch -t 197001020000.00 ../ramdisk/image
.SUFFIXES: .mfs .c .o
.mfs.o:
${_MKTARGET_CREATE}
${OBJCOPY} -Ibinary -B${MACHINE_CPU} -O${MACHINE_GNU_PLATFORM} $< $@
CLEANFILES+= ../ramdisk/image
# BJG - don't invoke parallel Makes
#../ramdisk/image: .PHONY
# ${MAKE} -C ${RAMDISK_PATH} image
CLEANFILES+= imgrd.mfs
imgrd.mfs: ../ramdisk/image
${HOST_LN} -fs ../ramdisk/image $@
.include <minix.service.mk>