freebsd-dev/gnu/usr.bin/binutils/ld/Makefile.sparc64
David E. O'Brien 25a59bcfe7 Set the SCRIPTDIR to be rooted at TOOLS_PREFIX rather than DESTDIR.
(the two may be different (ie, build vs. runtime))
Allow ldscript's SEARCH_DIR do be rooted somewhere other than `/'.
(in this case at TOOLS_PREFIX)

These changes are most helpful during `make buildworld' so that the shared
libs built in the middle of `make buildworld' are used vs. the ones in
/usr/lib on the build machine.

Submitted by:	ru
2002-02-07 01:37:53 +00:00

37 lines
1.2 KiB
Makefile

# $FreeBSD$
TARGET_TUPLE?= sparc64-unknown-freebsd
.if ${TARGET_ARCH} == "sparc64"
HOST= ${TARGET_TUPLE}
CFLAGS+= -DDEFAULT_EMULATION=\"elf32_sparc\"
CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
_sparc_path= \"${TOOLS_PREFIX}/usr/lib\"
.else
_sparc_path= \"/usr/cross/sparc-freebsd/usr/lib\"
.endif
EMS+= ld_elf64_sparc_emulation
LDSCRIPTS+= elf64_sparc.x elf64_sparc.xbn elf64_sparc.xn elf64_sparc.xr \
elf64_sparc.xs elf64_sparc.xu
SRCS+= eelf64_sparc.c
CLEANFILES+= eelf64_sparc.c
EMS+= ld_elf32_sparc_emulation
LDSCRIPTS+= elf32_sparc.x elf32_sparc.xbn elf32_sparc.xn elf32_sparc.xr \
elf32_sparc.xs elf32_sparc.xu
SRCS+= eelf32_sparc.c
CLEANFILES+= eelf32_sparc.c
eelf64_sparc.c: emulparams/elf64_sparc.sh emultempl/elf32.em \
scripttempl/elf.sc genscripts.sh stringify.sed
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_sparc_path} \
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
elf64_sparc "" elf64_sparc ${TARGET_TUPLE}
eelf32_sparc.c: emulparams/elf32_sparc.sh emultempl/elf32.em \
scripttempl/elf.sc genscripts.sh stringify.sed
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_sparc_path} \
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
elf32_sparc "" elf32_sparc ${TARGET_TUPLE}