2000-04-02 22:36:56 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2001-10-14 02:13:55 +00:00
|
|
|
TARGET_TUPLE?= sparc64-unknown-freebsd
|
2001-10-14 02:12:40 +00:00
|
|
|
|
2001-10-14 01:57:19 +00:00
|
|
|
.if ${TARGET_ARCH} == "sparc64"
|
2002-12-05 18:25:09 +00:00
|
|
|
NATIVE_EMULATION= elf64_sparc_fbsd
|
2001-10-14 02:12:40 +00:00
|
|
|
HOST= ${TARGET_TUPLE}
|
2002-03-29 00:41:01 +00:00
|
|
|
CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\"
|
2001-10-14 02:12:40 +00:00
|
|
|
CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
|
2002-02-07 01:37:53 +00:00
|
|
|
_sparc_path= \"${TOOLS_PREFIX}/usr/lib\"
|
2000-04-02 22:36:56 +00:00
|
|
|
.else
|
|
|
|
_sparc_path= \"/usr/cross/sparc-freebsd/usr/lib\"
|
|
|
|
.endif
|
2000-04-03 03:42:07 +00:00
|
|
|
|
2002-12-05 18:25:09 +00:00
|
|
|
EMS+= ${NATIVE_EMULATION} elf64_sparc
|
2002-03-29 00:41:01 +00:00
|
|
|
LDSCRIPTS+= ${NATIVE_EMULATION}.x ${NATIVE_EMULATION}.xbn ${NATIVE_EMULATION}.xn ${NATIVE_EMULATION}.xr \
|
|
|
|
${NATIVE_EMULATION}.xs ${NATIVE_EMULATION}.xu ${NATIVE_EMULATION}.xc ${NATIVE_EMULATION}.xsc
|
|
|
|
SRCS+= e${NATIVE_EMULATION}.c
|
|
|
|
CLEANFILES+= e${NATIVE_EMULATION}.c
|
2000-04-02 22:36:56 +00:00
|
|
|
|
2002-03-29 00:41:01 +00:00
|
|
|
e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \
|
2001-10-14 01:57:19 +00:00
|
|
|
scripttempl/elf.sc genscripts.sh stringify.sed
|
2000-04-02 22:36:56 +00:00
|
|
|
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_sparc_path} \
|
2001-10-14 02:12:40 +00:00
|
|
|
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
|
2002-03-29 00:41:01 +00:00
|
|
|
${NATIVE_EMULATION} "" ${NATIVE_EMULATION} ${TARGET_TUPLE}
|
2000-04-02 22:36:56 +00:00
|
|
|
|
2002-12-05 18:25:09 +00:00
|
|
|
.for BITS in 64 32
|
|
|
|
|
|
|
|
EMS+= elf${BITS}_sparc
|
|
|
|
LDSCRIPTS+= elf${BITS}_sparc.x elf${BITS}_sparc.xbn elf${BITS}_sparc.xn \
|
|
|
|
elf${BITS}_sparc.xr \
|
|
|
|
elf${BITS}_sparc.xs elf${BITS}_sparc.xu elf${BITS}_sparc.xc \
|
|
|
|
elf${BITS}_sparc.xsc
|
|
|
|
SRCS+= eelf${BITS}_sparc.c
|
|
|
|
CLEANFILES+= eelf${BITS}_sparc.c
|
|
|
|
|
|
|
|
eelf${BITS}_sparc.c: emulparams/elf${BITS}_sparc.sh emultempl/elf32.em \
|
2001-10-14 01:57:19 +00:00
|
|
|
scripttempl/elf.sc genscripts.sh stringify.sed
|
2000-04-03 03:42:07 +00:00
|
|
|
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_sparc_path} \
|
2001-10-14 02:12:40 +00:00
|
|
|
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
|
2002-12-05 18:25:09 +00:00
|
|
|
elf${BITS}_sparc "" elf${BITS}_sparc ${TARGET_TUPLE}
|
|
|
|
|
|
|
|
.endfor # BITS
|