[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / rescue

File: [cvs.NetBSD.org] / src / rescue / Makefile (download)

Revision 1.21.10.1, Fri Jan 16 22:21:30 2009 UTC (12 years ago) by bouyer
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u1-k1-k5
Branch point for: matt-nb5-mips64
Changes since 1.21: +6 -6 lines

Pull up following revision(s) (requested by mrg in ticket #265):
	libexec/ld.elf_so/headers.c: revision 1.27
	rescue/list: revision 1.35
	libexec/ld.elf_so/arch/sparc/Makefile.ld32: revision 1.1
	usr.bin/ldd/Makefile.elf: revision 1.1
	usr.bin/ldd/Makefile.elf: revision 1.2
	usr.bin/ldd/ldd_aout/ldd.c: file removal
	usr.bin/ldd/Makefile.elf: revision 1.3
	libexec/ld.elf_so/arch/sparc/Makefile.inc: revision 1.12
	usr.bin/ldd/dummy.c: revision 1.1
	gnu/usr.bin/binutils/ld/Makefile: revision 1.28
	usr.bin/ldd/elf32/Makefile: revision 1.1
	usr.bin/ldd/elf32/Makefile: revision 1.2
	usr.bin/ldd/ldd.c: revision 1.3
	usr.bin/ldd/elf32/Makefile: revision 1.3
	usr.bin/ldd/ldd_elf/Makefile: file removal
	usr.bin/ldd/ldd.h: revision 1.1
	usr.bin/ldd/ldd.c: revision 1.4
	usr.bin/ldd/ldd_aout.c: revision 1.1
	usr.bin/ldd/Makefile: revision 1.8
	usr.bin/ldd/Makefile: revision 1.9
	usr.bin/ldd/ldd_elfxx.c: revision 1.1
	libexec/ld.elf_so/map_object.c: revision 1.37
	usr.bin/ldd/ldd_aout/Makefile: file removal
	usr.bin/ldd/elf64/Makefile: revision 1.1
	rescue/Makefile: revision 1.22
	libexec/ld.elf_so/arch/i386/Makefile.ld32: revision 1.1
	usr.bin/ldd/ldd_elf/ldd.c: file removal
	usr.bin/ldd/elf64/Makefile: revision 1.2
	usr.bin/ldd/elf64/Makefile: revision 1.3
	usr.bin/ldd/aout/Makefile: revision 1.1
	libexec/ld.elf_so/arch/i386/Makefile.inc: revision 1.12
	rescue/list.ldd: revision 1.1
	usr.bin/ldd/ldd_elf/README: file removal
	usr.bin/ldd/Makefile.common: revision 1.1
move the defines for RTLD_ARCH_SUBDIR into a sub-sub-makefile so we can
grab these values via reach-over more easily.
some fixes for PR#40170:
- set NATIVE=yes in the environment for genscripts.sh
- set LIB_PATH to /usr/lib/{sparc,i386} for those scripts
- set use_sysroot to "yes", to enable LIB_PATH to work in genscripts.sh
- get rid of building an a.out-happy ldd (but keep supporting a.out
  binaries for the ELF version.)
- convert a.out, elf32 and elf64 support into convience libraries and
  link them right ones in.  if elf_ldd() fails on 64 bit platforms,
  try elf32_ldd() before aout_ldd().
now ldd on 64 bit platforms works for 32 bit binaries, aka PR#40199,
and it seems that all the issues from README are gone too.
add some (uintptr_t) to some casts, so these compile with ELFSIZE=32
*and _LP64.  necessary for 32/64 bit combo ldd support.
- rework this a bunch to make it work inside /rescue/ldd.
- fix alpha build.
make sure we set LIBISPRIVATE.
fixes build issues reported by moof.
make sure we set LIBISPRIVATE.
fixes build issues reported by moof.

#	$NetBSD: Makefile,v 1.21.10.1 2009/01/16 22:21:30 bouyer Exp $

.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"

WARNS=		1
# XXX
.if ${MACHINE_ARCH} != "m68000"
DBG=		-Os
.endif

CRUNCHGEN_FLAGS=-d "${DBG}"

RESCUEDIR=	/rescue
CRUNCHBIN=	rescue
CRUNCHENV=	RESCUEDIR=${RESCUEDIR}
SMALLPROG=	0
LISTS=		${.CURDIR}/list
TARGETDIR=	${DESTDIR}/rescue
PARSELISTENV+=  TARGETDIR=${TARGETDIR:Q}

.for f in edlabel ldconfig pdisk
PROG_${f}!=	cd ${NETBSDSRCDIR}/sbin/${f} && ${MAKE} -V PROG
.if (${PROG_${f}} != "")
LISTS+=		${.CURDIR}/list.${f}
.endif
.endfor

.if ${USE_INET6} != "no"
LISTS+=		${.CURDIR}/list.inet6
.endif

.if ${MKCRYPTO} != "no"
LISTS+=		${.CURDIR}/list.crypto
CRUNCHENV+=	MKKERBEROS=no		# for ssh
.endif

LISTS+=		${.CURDIR}/list.ldd
LDD_AOUTDIR!=	cd ${NETBSDSRCDIR}/usr.bin/ldd/aout && ${PRINTOBJDIR}
LDD_ELF32DIR!=	cd ${NETBSDSRCDIR}/usr.bin/ldd/elf32 && ${PRINTOBJDIR}
LDD_ELF64DIR!=	cd ${NETBSDSRCDIR}/usr.bin/ldd/elf64 && ${PRINTOBJDIR}
PARSELISTENV+=	LDD_AOUTDIR=${LDD_AOUTDIR} LDD_ELF32DIR=${LDD_ELF32DIR} LDD_ELF64DIR=${LDD_ELF64DIR}

#	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}
	${_MKTARGET_LINK}
	${LD} -r -o $@ ${OVERRIDEOBJS}

CLEANFILES+=	${OVERRIDEOBJS} ${LIBOVERRIDE}

${CRUNCHBIN}:	${LIBOVERRIDE}


#	The primary target ...
#

CLEANFILES+=	rescue.unstripped

.include "${DISTRIBDIR}/common/Makefile.crunch"

realall: ${CRUNCHBIN}

install: ${CRUNCHBIN}
# XXX this MKMSG doesn't line up
	${_MKMSG} "populate ${TARGETDIR}"
	${PARSELIST} -v mode=install ${LISTS} | ${MAKE} -f - install

.include <bsd.prog.mk>