1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1998-03-12 02:55:43 +00:00
|
|
|
|
2001-10-14 02:13:55 +00:00
|
|
|
TARGET_TUPLE?= i386-unknown-freebsd
|
2001-10-14 02:12:40 +00:00
|
|
|
|
2001-10-14 01:57:19 +00:00
|
|
|
.if ${TARGET_ARCH} == "i386"
|
2001-10-14 02:12:40 +00:00
|
|
|
HOST= ${TARGET_TUPLE}
|
2001-10-14 01:57:19 +00:00
|
|
|
CFLAGS+= -DDEFAULT_EMULATION=\"elf_i386\"
|
2001-10-14 02:12:40 +00:00
|
|
|
CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
|
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
|
2001-10-14 01:57:19 +00:00
|
|
|
SRCS+= eelf_i386.c
|
1998-03-30 02:21:27 +00:00
|
|
|
CLEANFILES+= eelf_i386.c
|
1998-03-12 02:55:43 +00:00
|
|
|
|
2001-10-14 01:57:19 +00:00
|
|
|
eelf_i386.c: emulparams/elf_i386.sh emultempl/elf32.em scripttempl/elf.sc \
|
|
|
|
genscripts.sh stringify.sed
|
1999-11-06 22:46:45 +00:00
|
|
|
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_i386_path} \
|
2001-10-14 02:12:40 +00:00
|
|
|
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
|
|
|
|
elf_i386 "" elf_i386 ${TARGET_TUPLE}
|
1999-11-06 22:46:45 +00:00
|
|
|
|
2001-10-14 01:57:19 +00:00
|
|
|
.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
|
1999-11-06 22:46:45 +00:00
|
|
|
EMS+= ld_i386pe_emulation
|
|
|
|
LDSCRIPTS+= i386pe.x \
|
|
|
|
i386pe.xbn \
|
|
|
|
i386pe.xn \
|
|
|
|
i386pe.xr \
|
|
|
|
i386pe.xu
|
2001-10-14 01:57:19 +00:00
|
|
|
SRCS+= ei386pe.c
|
1999-11-06 22:46:45 +00:00
|
|
|
CLEANFILES+= ei386pe.c
|
|
|
|
|
2001-10-14 01:57:19 +00:00
|
|
|
ei386pe.c: emulparams/i386pe.sh emultempl/pe.em scripttempl/pe.sc \
|
|
|
|
genscripts.sh stringify.sed
|
1999-11-06 22:46:45 +00:00
|
|
|
sh ${.CURDIR}/genscripts.sh ${BINUTILSDISTDIR}/ld \
|
2001-10-14 02:12:40 +00:00
|
|
|
/usr/cross/winnt/lib ${HOST} ${TARGET_TUPLE}winnt \
|
|
|
|
${TARGET_TUPLE}winnt i386pe "" i386pe \
|
|
|
|
${TARGET_TUPLE}winnt
|
1999-11-06 22:46:45 +00:00
|
|
|
.endif
|