colormap.c needs some -Wno-error too....
[netbsd-mini2440.git] / rescue / Makefile
blobd47a0b21cf61e93ba118887210de0922c1096fd0
1 # $NetBSD: Makefile,v 1.22 2009/01/07 00:39:23 mrg 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 ${MACHINE_CPU} != "mips"
39 LISTS+= ${.CURDIR}/list.ldd
40 LDD_AOUTDIR!= cd ${NETBSDSRCDIR}/usr.bin/ldd/aout && ${PRINTOBJDIR}
41 PARSELISTENV+= LDD_AOUTDIR=${LDD_AOUTDIR}
42 .else
43 LISTS+= ${.CURDIR}/list.ldd.noaout
44 .endif
45 LDD_ELF32DIR!= cd ${NETBSDSRCDIR}/usr.bin/ldd/elf32 && ${PRINTOBJDIR}
46 LDD_ELF64DIR!= cd ${NETBSDSRCDIR}/usr.bin/ldd/elf64 && ${PRINTOBJDIR}
47 PARSELISTENV+= LDD_ELF32DIR=${LDD_ELF32DIR} LDD_ELF64DIR=${LDD_ELF64DIR}
49 # Specially built objects to override the behaviour of
50 # various library functions
53 OVERRIDEOBJS= rcmd.o
54 .PATH: ${NETBSDSRCDIR}/lib/libc/net
55 CPPFLAGS.rcmd.c+=-I${NETBSDSRCDIR}/lib/libc/include -DRESCUEDIR=\"${RESCUEDIR}\"
57 LIBOVERRIDE= liboverride.o
58 ${LIBOVERRIDE}: ${OVERRIDEOBJS}
59 ${_MKTARGET_LINK}
60 ${LD} -r -o $@ ${OVERRIDEOBJS}
62 CLEANFILES+= ${OVERRIDEOBJS} ${LIBOVERRIDE}
64 ${CRUNCHBIN}: ${LIBOVERRIDE}
67 # The primary target ...
70 CLEANFILES+= rescue.unstripped
72 .include "${DISTRIBDIR}/common/Makefile.crunch"
74 realall: ${CRUNCHBIN}
76 install: ${CRUNCHBIN}
77 # XXX this MKMSG doesn't line up
78 ${_MKMSG} "populate ${TARGETDIR}"
79 ${PARSELIST} -v mode=install ${LISTS} | ${MAKE} -f - install
81 .include <bsd.prog.mk>