1999-11-06 22:52:33 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2001-10-14 02:13:55 +00:00
|
|
|
TARGET_TUPLE?= powerpc-unknown-freebsd
|
2001-10-14 02:12:40 +00:00
|
|
|
|
2001-10-14 01:57:19 +00:00
|
|
|
.if ${TARGET_ARCH} == "powerpc"
|
2002-03-29 00:41:01 +00:00
|
|
|
NATIVE_EMULATION= elf32ppc
|
2001-10-14 02:12:40 +00:00
|
|
|
HOST= ${TARGET_TUPLE}
|
2002-05-17 03:10:33 +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
|
|
|
_powerpc_path= \"${TOOLS_PREFIX}/usr/lib\"
|
1999-11-06 22:52:33 +00:00
|
|
|
.else
|
1999-11-07 06:01:35 +00:00
|
|
|
_powerpc_path= \"/usr/cross/powerpc-freebsd/usr/lib\"
|
1999-11-06 22:52:33 +00:00
|
|
|
.endif
|
2002-05-17 03:10:33 +00:00
|
|
|
EMS+= ${NATIVE_EMULATION}
|
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 \
|
2002-05-17 03:10:33 +00:00
|
|
|
${NATIVE_EMULATION}.xsc
|
|
|
|
SRCS+= e${NATIVE_EMULATION}.c
|
|
|
|
CLEANFILES+= e${NATIVE_EMULATION}.c
|
|
|
|
|
|
|
|
e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \
|
|
|
|
scripttempl/elfppc.sc genscripts.sh stringify.sed
|
|
|
|
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_powerpc_path} \
|
|
|
|
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
|
|
|
|
${NATIVE_EMULATION} "" ${NATIVE_EMULATION} ${TARGET_TUPLE}
|