2013-03-24 21:05:27 +04:00
|
|
|
# $NetBSD: Makefile,v 1.29 2013/03/24 17:05:27 christos Exp $
|
2002-08-22 05:23:46 +04:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
|
|
|
|
|
|
|
|
WARNS= 1
|
2008-02-09 05:37:21 +03:00
|
|
|
# XXX
|
|
|
|
.if ${MACHINE_ARCH} != "m68000"
|
2002-08-22 05:23:46 +04:00
|
|
|
DBG= -Os
|
2008-02-09 05:37:21 +03:00
|
|
|
.endif
|
|
|
|
|
|
|
|
CRUNCHGEN_FLAGS=-d "${DBG}"
|
2002-08-22 05:23:46 +04:00
|
|
|
|
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}
|
|
|
|
|
2013-03-24 15:07:07 +04:00
|
|
|
.for f in ldconfig
|
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
|
|
|
|
|
2013-03-24 15:07:07 +04:00
|
|
|
.for f in pdisk
|
2013-03-24 21:05:27 +04:00
|
|
|
PROG_${f}!= cd ${NETBSDSRCDIR}/external/bsd/${f}/bin && ${MAKE} -V PROG
|
2013-03-24 15:07:07 +04:00
|
|
|
.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
|
|
|
|
|
2009-01-07 03:39:23 +03:00
|
|
|
LISTS+= ${.CURDIR}/list.ldd
|
|
|
|
LDD_ELF32DIR!= cd ${NETBSDSRCDIR}/usr.bin/ldd/elf32 && ${PRINTOBJDIR}
|
|
|
|
LDD_ELF64DIR!= cd ${NETBSDSRCDIR}/usr.bin/ldd/elf64 && ${PRINTOBJDIR}
|
2009-08-21 19:16:45 +04:00
|
|
|
PARSELISTENV+= LDD_ELF32DIR=${LDD_ELF32DIR} LDD_ELF64DIR=${LDD_ELF64DIR}
|
2002-08-22 05:23:46 +04:00
|
|
|
|
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}
|
|
|
|
|
2010-02-13 14:21:55 +03:00
|
|
|
CLEANFILES+= ${OVERRIDEOBJS} ${LIBOVERRIDE}
|
2005-01-13 06:08:07 +03:00
|
|
|
|
|
|
|
${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"
|
|
|
|
|
2010-02-13 14:21:55 +03:00
|
|
|
realall: ${CRUNCHBIN}
|
2002-08-22 05:23:46 +04:00
|
|
|
|
|
|
|
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>
|