]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - gnu/usr.bin/binutils/ld/Makefile.mips
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / gnu / usr.bin / binutils / ld / Makefile.mips
1 # $FreeBSD$
2
3 .if ${TARGET_ARCH:Mmips*el} != ""
4 _EMULATION_ENDIAN=l
5 .else
6 _EMULATION_ENDIAN=b
7 .endif
8
9 .if ${TARGET_ARCH:Mmips64*} != ""
10 NATIVE_EMULATION=elf64${_EMULATION_ENDIAN}tsmip_fbsd
11 .elif ${TARGET_ARCH:Mmipsn32*} != ""
12 NATIVE_EMULATION=elf32${_EMULATION_ENDIAN}tsmipn32_fbsd
13 .else
14 NATIVE_EMULATION?=elf32${_EMULATION_ENDIAN}tsmip_fbsd
15 .endif
16
17 MIPS_ABIS=elf32btsmip_fbsd elf32ltsmip_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd \
18     elf32btsmipn32_fbsd elf32ltsmipn32_fbsd
19 .for abi in ${MIPS_ABIS}
20 #.if (${abi} != ${NATIVE_EMULATION})
21 EMS+= ${abi}
22 #.endif
23 .for ext in ${ELF_SCR_EXT}
24 LDSCRIPTS+= ${abi}.${ext}
25 .endfor
26 SRCS+=  e${abi}.c 
27 CLEANFILES+=    e${abi}.c
28 # nb: elf32 handles both elf32 and elf64 targets
29 e${abi}.c:      ${.CURDIR}/${abi}.sh emultempl/elf32.em \
30     scripttempl/elf.sc genscripts.sh stringify.sed
31         sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \
32             ${TOOLS_PREFIX}/usr \
33             ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
34             ${abi} ""  no ${abi} ${TARGET_TUPLE} \
35             ${.CURDIR}/${abi}.sh
36 .endfor