NetBSD/rescue/Makefile
lukem adb7a5bf1c * Add ftp to /rescue.
* Implement liboverride.o to provide overrides of various libc functions.
  For now, compile a special version of rcmd(3) (et al) which uses
  /rescue/rcmd and /rescue/sh instead of the /bin variants.
  Other overrides may appear in the future.

Should fix [bin/21670] from Geoff Wing.
2003-05-26 09:46:47 +00:00

54 lines
1.1 KiB
Makefile

# $NetBSD: Makefile,v 1.8 2003/05/26 09:46:47 lukem Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
WARNS= 1
DBG= -Os
RESCUEDIR= /rescue
CRUNCHBIN= rescue
CRUNCHENV= RESCUEDIR=${RESCUEDIR}
SMALLPROG= 0
LISTS= ${.CURDIR}/list
TARGETDIR= ${DESTDIR}/rescue
PARSELISTENV+= TARGETDIR=${TARGETDIR:Q}
.for f in bim edlabel fdisk ldconfig pdisk
PROG_${f}!= cd ${NETBSDSRCDIR}/sbin/${f} && ${MAKE} -V PROG
.if (${PROG_${f}} != "")
LISTS+= ${.CURDIR}/list.${f}
.endif
.endfor
.if (${OBJECT_FMT} == "ELF")
PARSELISTENV+= LDD_CMD=ldd_elf
.else
PARSELISTENV+= LDD_CMD=ldd_aout
.endif
# Specially built objects to override the behaviour of
# various library functions
#
OVERRIDEOBJS= rcmd.o
.PATH: ${NETBSDSRCDIR}/lib/libc/net
CPPFLAGS+= -I${.CURDIR} -DRESCUEDIR=\"${RESCUEDIR}\"
LIBOVERRIDE= liboverride.o
${LIBOVERRIDE}: ${OVERRIDEOBJS}
${LD} -r -o $@ ${OVERRIDEOBJS}
${CRUNCHBIN}: ${LIBOVERRIDE}
.include "${DISTRIBDIR}/common/Makefile.crunch"
realall: ${CRUNCHBIN}
install: ${CRUNCHBIN}
${PARSELIST} -v mode=install ${LISTS} | ${MAKE} -f - install
.include <bsd.prog.mk>