xref: /netbsd/rescue/Makefile (revision c4a72b64)
1#	$NetBSD: Makefile,v 1.6 2002/10/17 01:49:18 lukem Exp $
2
3.include <bsd.own.mk>
4.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
5
6WARNS=		1
7DBG=		-Os
8
9CRUNCHBIN=	rescue
10CRUNCHENV=	RESCUEDIR=/rescue
11SMALLPROG=	0
12LISTS=		${.CURDIR}/list
13TARGETDIR=	${DESTDIR}/rescue
14PARSELISTENV+=  TARGETDIR=${TARGETDIR:Q}
15
16
17.for f in bim edlabel fdisk ldconfig pdisk
18PROG_${f}!=	cd ${NETBSDSRCDIR}/sbin/${f} && ${MAKE} -V PROG
19.if (${PROG_${f}} != "")
20LISTS+=		${.CURDIR}/list.${f}
21.endif
22.endfor
23
24.if (${OBJECT_FMT} == "ELF")
25PARSELISTENV+=	LDD_CMD=ldd_elf
26.else
27PARSELISTENV+=	LDD_CMD=ldd_aout
28.endif
29
30
31.include "${DISTRIBDIR}/common/Makefile.crunch"
32
33# XXX Make sure to update distrib/sets/makeflist when this conditional
34# XXX is changed or removed.
35.if ${MACHINE_CPU} == "mips"						# {
36
37realall install:
38	@echo "WARNING: src/rescue not built on ${MACHINE_ARCH} due to broken crunchgen"
39
40.else									# } {
41
42realall: ${CRUNCHBIN}
43
44install: ${CRUNCHBIN}
45	${PARSELIST} -v mode=install ${LISTS} | ${MAKE} -f - install
46
47.endif									# }
48
49.include <bsd.prog.mk>
50