aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/ld/Makefile.i386
blob: 6e4a4fafa5ed7bde82eaa0bc846af7ccf2ddd3c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#
# $FreeBSD$
#

.if	${TARGET_ARCH} == "i386"
HOST=		i386-unknown-freebsd
CFLAGS+=	-DDEFAULT_EMULATION=\"elf_i386\"
CFLAGS+=	-DTARGET=\"i386-unknown-freebsd\"
_i386_path=	\"/usr/lib\"
.else
_i386_path=	\"/usr/cross/i386-freebsd/usr/lib\"
.endif
EMS+=		ld_elf_i386_emulation
LDSCRIPTS+=	elf_i386.x elf_i386.xbn elf_i386.xn elf_i386.xr \
		elf_i386.xs elf_i386.xu
SRCS+=		eelf_i386.c
CLEANFILES+=	eelf_i386.c

eelf_i386.c:	emulparams/elf_i386.sh emultempl/elf32.em \
		scripttempl/elf.sc genscripts.sh stringify.sed
	sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_i386_path} \
	    ${HOST} i386-unknown-freebsd i386-unknown-freebsd \
	    elf_i386 "" elf_i386 i386-unknown-freebsd

.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 \
		scripttempl/pe.sc genscripts.sh stringify.sed
	sh ${.CURDIR}/genscripts.sh ${BINUTILSDISTDIR}/ld \
	    /usr/cross/winnt/lib ${HOST} i386-unknown-freebsdwinnt \
	    i386-unknown-freebsdwinnt i386pe "" i386pe \
	    i386-unknown-freebsdwinnt
.endif