Home | History | Annotate | Line # | Download | only in rescue
Makefile revision 1.19
      1 #	$NetBSD: Makefile,v 1.19 2005/05/22 03:45:30 lukem Exp $
      2 
      3 .include <bsd.own.mk>
      4 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
      5 
      6 WARNS=		1
      7 DBG=		-Os
      8 
      9 RESCUEDIR=	/rescue
     10 CRUNCHBIN=	rescue
     11 CRUNCHENV=	RESCUEDIR=${RESCUEDIR}
     12 SMALLPROG=	0
     13 LISTS=		${.CURDIR}/list
     14 TARGETDIR=	${DESTDIR}/rescue
     15 PARSELISTENV+=  TARGETDIR=${TARGETDIR:Q}
     16 
     17 .for f in bim edlabel ldconfig pdisk
     18 PROG_${f}!=	cd ${NETBSDSRCDIR}/sbin/${f} && ${MAKE} -V PROG
     19 .if (${PROG_${f}} != "")
     20 LISTS+=		${.CURDIR}/list.${f}
     21 .endif
     22 .endfor
     23 
     24 .if ${USE_INET6} != "no"
     25 LISTS+=		${.CURDIR}/list.inet6
     26 .endif
     27 
     28 .if ${MKCRYPTO} != "no"
     29 LISTS+=		${.CURDIR}/list.crypto
     30 CRUNCHENV+=	MKKERBEROS=no		# for ssh
     31 .endif
     32 
     33 .if (${OBJECT_FMT} == "ELF")
     34 PARSELISTENV+=	LDD_CMD=ldd_elf
     35 .else
     36 PARSELISTENV+=	LDD_CMD=ldd_aout
     37 .endif
     38 
     39 #	Specially built objects to override the behaviour of
     40 #	various library functions
     41 #
     42 
     43 OVERRIDEOBJS=	rcmd.o
     44 .PATH:	${NETBSDSRCDIR}/lib/libc/net
     45 CPPFLAGS.rcmd.c+=-I${NETBSDSRCDIR}/lib/libc/include -DRESCUEDIR=\"${RESCUEDIR}\"
     46 
     47 LIBOVERRIDE=	liboverride.o
     48 ${LIBOVERRIDE}: ${OVERRIDEOBJS}
     49 	${_MKTARGET_LINK}
     50 	${LD} -r -o $@ ${OVERRIDEOBJS}
     51 
     52 CLEANFILES+=	${OVERRIDEOBJS} ${LIBOVERRIDE}
     53 
     54 ${CRUNCHBIN}:	${LIBOVERRIDE}
     55 
     56 
     57 #	The primary target ...
     58 #
     59 
     60 CLEANFILES+=	rescue.unstripped
     61 
     62 .include "${DISTRIBDIR}/common/Makefile.crunch"
     63 
     64 realall: ${CRUNCHBIN}
     65 
     66 install: ${CRUNCHBIN}
     67 # XXX this MKMSG doesn't line up
     68 	${_MKMSG} "populate ${TARGETDIR}"
     69 	${PARSELIST} -v mode=install ${LISTS} | ${MAKE} -f - install
     70 
     71 .include <bsd.prog.mk>
     72