1999-03-01 04:01:57 +00:00
|
|
|
#
|
1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1999-03-01 04:01:57 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
.if ${MACHINE_ARCH} == "mipseb"
|
|
|
|
HOST= mipseb-unknown-freebsdelf
|
1999-04-21 07:46:06 +00:00
|
|
|
CFLAGS+= -DDEFAULT_EMULATION=\"elf32bmip\"
|
|
|
|
CFLAGS+= -DTARGET=\"elf32-bigmips\"
|
1999-11-06 22:44:32 +00:00
|
|
|
_mips_path= \"/usr/lib\"
|
|
|
|
.elif ${MACHINE_ARCH} == "mipsel"
|
1999-03-01 04:01:57 +00:00
|
|
|
HOST= mipsel-unknown-freebsdelf
|
1999-04-21 07:46:06 +00:00
|
|
|
CFLAGS+= -DDEFAULT_EMULATION=\"elf32lmip\"
|
|
|
|
CFLAGS+= -DTARGET=\"elf32-littlemips\"
|
1999-11-06 22:44:32 +00:00
|
|
|
_mips_path= \"/usr/lib\"
|
|
|
|
.else
|
1999-11-07 06:01:35 +00:00
|
|
|
_mips_path= \"/usr/cross/mips-freebsd/usr/lib\"
|
1999-03-01 04:01:57 +00:00
|
|
|
.endif
|
|
|
|
EMS+= ld_elf32bmip_emulation ld_elf32lmip_emulation
|
|
|
|
LDSCRIPTS+= elf32bmip.x elf32bmip.xbn elf32bmip.xn elf32bmip.xr \
|
|
|
|
elf32bmip.xs elf32bmip.xu elf32lmip.x elf32lmip.xbn \
|
|
|
|
elf32lmip.xn elf32lmip.xr elf32lmip.xs elf32lmip.xu
|
|
|
|
SRCS+= eelf32bmip.c
|
|
|
|
SRCS+= eelf32lmip.c
|
|
|
|
CLEANFILES+= eelf32bmip.c
|
|
|
|
CLEANFILES+= eelf32lmip.c
|
|
|
|
|
|
|
|
eelf32bmip.c: emulparams/elf32ebmip.sh emultempl/elf32.em \
|
|
|
|
scripttempl/elf.sc genscripts.sh emultempl/stringify.sed
|
1999-11-06 22:44:32 +00:00
|
|
|
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_mips_path} \
|
1999-03-01 04:01:57 +00:00
|
|
|
${HOST} mipseb-unknown-freebsdelf mipseb-unknown-freebsdelf \
|
|
|
|
elf32bmip "" elf32bmip mipseb-unknown-freebsdelf
|
|
|
|
|
|
|
|
eelf32lmip.c: emulparams/elf32elmip.sh emultempl/elf32.em \
|
|
|
|
scripttempl/elf.sc genscripts.sh emultempl/stringify.sed
|
1999-11-06 22:44:32 +00:00
|
|
|
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_mips_path} \
|
1999-03-01 04:01:57 +00:00
|
|
|
${HOST} mipsel-unknown-freebsdelf mipsel-unknown-freebsdelf \
|
|
|
|
elf32lmip "" elf32lmip mipsel-unknown-freebsdelf
|
|
|
|
|