1998-03-12 02:55:43 +00:00
|
|
|
#
|
1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1998-03-12 02:55:43 +00:00
|
|
|
#
|
|
|
|
|
1999-12-17 15:50:45 +00:00
|
|
|
.if ${TARGET_ARCH} == "i386"
|
2001-02-21 11:43:35 +00:00
|
|
|
HOST= i386-unknown-freebsd
|
1998-05-04 21:29:54 +00:00
|
|
|
CFLAGS+= -DDEFAULT_EMULATION=\"elf_i386\"
|
2001-02-21 11:43:35 +00:00
|
|
|
CFLAGS+= -DTARGET=\"i386-unknown-freebsd\"
|
1999-11-06 22:46:45 +00:00
|
|
|
_i386_path= \"/usr/lib\"
|
|
|
|
.else
|
1999-11-07 06:01:35 +00:00
|
|
|
_i386_path= \"/usr/cross/i386-freebsd/usr/lib\"
|
1998-05-04 21:29:54 +00:00
|
|
|
.endif
|
|
|
|
EMS+= ld_elf_i386_emulation
|
|
|
|
LDSCRIPTS+= elf_i386.x elf_i386.xbn elf_i386.xn elf_i386.xr \
|
1998-03-30 02:21:27 +00:00
|
|
|
elf_i386.xs elf_i386.xu
|
|
|
|
SRCS+= eelf_i386.c
|
|
|
|
CLEANFILES+= eelf_i386.c
|
1998-03-12 02:55:43 +00:00
|
|
|
|
|
|
|
eelf_i386.c: emulparams/elf_i386.sh emultempl/elf32.em \
|
2000-05-22 08:09:42 +00:00
|
|
|
scripttempl/elf.sc genscripts.sh stringify.sed
|
1999-11-06 22:46:45 +00:00
|
|
|
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_i386_path} \
|
2001-02-21 11:43:35 +00:00
|
|
|
${HOST} i386-unknown-freebsd i386-unknown-freebsd \
|
|
|
|
elf_i386 "" elf_i386 i386-unknown-freebsd
|
1999-11-06 22:46:45 +00:00
|
|
|
|
|
|
|
.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
|
|
|
|
EMS+= ld_i386pe_emulation
|
|
|
|
LDSCRIPTS+= i386pe.x \
|
|
|
|
i386pe.xbn \
|
|
|
|
i386pe.xn \
|
|
|
|
i386pe.xr \
|
|
|
|
i386pe.xu
|
|
|
|
SRCS+= ei386pe.c
|
|
|
|
CLEANFILES+= ei386pe.c
|
|
|
|
|
|
|
|
ei386pe.c: emulparams/i386pe.sh emultempl/pe.em \
|
2000-11-25 13:56:28 +00:00
|
|
|
scripttempl/pe.sc genscripts.sh stringify.sed
|
1999-11-06 22:46:45 +00:00
|
|
|
sh ${.CURDIR}/genscripts.sh ${BINUTILSDISTDIR}/ld \
|
|
|
|
/usr/cross/winnt/lib ${HOST} i386-unknown-freebsdwinnt \
|
|
|
|
i386-unknown-freebsdwinnt i386pe "" i386pe \
|
|
|
|
i386-unknown-freebsdwinnt
|
|
|
|
.endif
|