Add getpgid, needed for Tru64 4.0g ksh.
[netbsd-mini2440.git] / rescue / Makefile
blob26af57468ecdff384f6d4571c3fdab607dd8b461
1 # $NetBSD: Makefile,v 1.20 2008/01/09 11:26:06 simonb Exp $
3 .include <bsd.own.mk>
4 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
6 WARNS= 1
7 # XXX
8 .if ${MACHINE_ARCH} != "m68000"
9 DBG= -Os
10 .endif
12 CRUNCHGEN_FLAGS=-d "${DBG}"
14 RESCUEDIR= /rescue
15 CRUNCHBIN= rescue
16 CRUNCHENV= RESCUEDIR=${RESCUEDIR}
17 SMALLPROG= 0
18 LISTS= ${.CURDIR}/list
19 TARGETDIR= ${DESTDIR}/rescue
20 PARSELISTENV+= TARGETDIR=${TARGETDIR:Q}
22 .for f in edlabel ldconfig pdisk
23 PROG_${f}!= cd ${NETBSDSRCDIR}/sbin/${f} && ${MAKE} -V PROG
24 .if (${PROG_${f}} != "")
25 LISTS+= ${.CURDIR}/list.${f}
26 .endif
27 .endfor
29 .if ${USE_INET6} != "no"
30 LISTS+= ${.CURDIR}/list.inet6
31 .endif
33 .if ${MKCRYPTO} != "no"
34 LISTS+= ${.CURDIR}/list.crypto
35 CRUNCHENV+= MKKERBEROS=no # for ssh
36 .endif
38 .if (${OBJECT_FMT} == "ELF")
39 PARSELISTENV+= LDD_CMD=ldd_elf
40 .else
41 PARSELISTENV+= LDD_CMD=ldd_aout
42 .endif
44 # Specially built objects to override the behaviour of
45 # various library functions
48 OVERRIDEOBJS= rcmd.o
49 .PATH: ${NETBSDSRCDIR}/lib/libc/net
50 CPPFLAGS.rcmd.c+=-I${NETBSDSRCDIR}/lib/libc/include -DRESCUEDIR=\"${RESCUEDIR}\"
52 LIBOVERRIDE= liboverride.o
53 ${LIBOVERRIDE}: ${OVERRIDEOBJS}
54 ${_MKTARGET_LINK}
55 ${LD} -r -o $@ ${OVERRIDEOBJS}
57 CLEANFILES+= ${OVERRIDEOBJS} ${LIBOVERRIDE}
59 ${CRUNCHBIN}: ${LIBOVERRIDE}
62 # The primary target ...
65 CLEANFILES+= rescue.unstripped
67 .include "${DISTRIBDIR}/common/Makefile.crunch"
69 realall: ${CRUNCHBIN}
71 install: ${CRUNCHBIN}
72 # XXX this MKMSG doesn't line up
73 ${_MKMSG} "populate ${TARGETDIR}"
74 ${PARSELIST} -v mode=install ${LISTS} | ${MAKE} -f - install
76 .include <bsd.prog.mk>