2005-05-22 07:45:30 +04:00
|
|
|
# $NetBSD: Makefile,v 1.19 2005/05/22 03:45:30 lukem Exp $
|
2002-08-22 05:23:46 +04:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
|
|
|
|
|
|
|
|
WARNS= 1
|
|
|
|
DBG= -Os
|
|
|
|
|
2003-05-26 13:46:47 +04:00
|
|
|
RESCUEDIR= /rescue
|
2002-08-22 05:23:46 +04:00
|
|
|
CRUNCHBIN= rescue
|
2003-05-26 13:46:47 +04:00
|
|
|
CRUNCHENV= RESCUEDIR=${RESCUEDIR}
|
2002-10-17 05:49:18 +04:00
|
|
|
SMALLPROG= 0
|
2002-08-22 05:23:46 +04:00
|
|
|
LISTS= ${.CURDIR}/list
|
|
|
|
TARGETDIR= ${DESTDIR}/rescue
|
|
|
|
PARSELISTENV+= TARGETDIR=${TARGETDIR:Q}
|
|
|
|
|
2005-05-22 07:45:30 +04:00
|
|
|
.for f in bim edlabel ldconfig pdisk
|
2002-08-22 05:23:46 +04:00
|
|
|
PROG_${f}!= cd ${NETBSDSRCDIR}/sbin/${f} && ${MAKE} -V PROG
|
|
|
|
.if (${PROG_${f}} != "")
|
|
|
|
LISTS+= ${.CURDIR}/list.${f}
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
2005-01-10 05:58:58 +03:00
|
|
|
.if ${USE_INET6} != "no"
|
2005-01-10 07:00:50 +03:00
|
|
|
LISTS+= ${.CURDIR}/list.inet6
|
2005-01-10 05:58:58 +03:00
|
|
|
.endif
|
|
|
|
|
2005-01-10 13:04:31 +03:00
|
|
|
.if ${MKCRYPTO} != "no"
|
|
|
|
LISTS+= ${.CURDIR}/list.crypto
|
2005-01-10 13:47:36 +03:00
|
|
|
CRUNCHENV+= MKKERBEROS=no # for ssh
|
2005-01-10 13:04:31 +03:00
|
|
|
.endif
|
|
|
|
|
2002-08-22 05:23:46 +04:00
|
|
|
.if (${OBJECT_FMT} == "ELF")
|
|
|
|
PARSELISTENV+= LDD_CMD=ldd_elf
|
|
|
|
.else
|
|
|
|
PARSELISTENV+= LDD_CMD=ldd_aout
|
|
|
|
.endif
|
|
|
|
|
2005-01-13 06:08:07 +03:00
|
|
|
# Specially built objects to override the behaviour of
|
|
|
|
# various library functions
|
|
|
|
#
|
|
|
|
|
|
|
|
OVERRIDEOBJS= rcmd.o
|
|
|
|
.PATH: ${NETBSDSRCDIR}/lib/libc/net
|
|
|
|
CPPFLAGS.rcmd.c+=-I${NETBSDSRCDIR}/lib/libc/include -DRESCUEDIR=\"${RESCUEDIR}\"
|
|
|
|
|
|
|
|
LIBOVERRIDE= liboverride.o
|
|
|
|
${LIBOVERRIDE}: ${OVERRIDEOBJS}
|
2005-01-13 06:25:31 +03:00
|
|
|
${_MKTARGET_LINK}
|
2005-01-13 06:08:07 +03:00
|
|
|
${LD} -r -o $@ ${OVERRIDEOBJS}
|
|
|
|
|
|
|
|
CLEANFILES+= ${OVERRIDEOBJS} ${LIBOVERRIDE}
|
|
|
|
|
|
|
|
${CRUNCHBIN}: ${LIBOVERRIDE}
|
|
|
|
|
|
|
|
|
|
|
|
# The primary target ...
|
|
|
|
#
|
|
|
|
|
2003-07-14 13:00:33 +04:00
|
|
|
CLEANFILES+= rescue.unstripped
|
2003-05-26 13:46:47 +04:00
|
|
|
|
2002-08-22 05:23:46 +04:00
|
|
|
.include "${DISTRIBDIR}/common/Makefile.crunch"
|
|
|
|
|
|
|
|
realall: ${CRUNCHBIN}
|
|
|
|
|
|
|
|
install: ${CRUNCHBIN}
|
2005-05-22 07:45:30 +04:00
|
|
|
# XXX this MKMSG doesn't line up
|
2005-01-10 13:05:44 +03:00
|
|
|
${_MKMSG} "populate ${TARGETDIR}"
|
2002-08-22 05:23:46 +04:00
|
|
|
${PARSELIST} -v mode=install ${LISTS} | ${MAKE} -f - install
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|