binutils220: add our build infrastructure
[dragonfly.git] / gnu / usr.bin / binutils220 / ld / Makefile.i386
1 TARGET_TUPLE?=  i386-just-dragonfly
2
3 .if ${TARGET_ARCH} == "i386"
4 NATIVE_EMULATION=       elf_i386
5 HOST=   ${TARGET_TUPLE}
6 CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\"
7 CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
8 _i386_path=     ${USRDATA_PREFIX}/usr/lib
9 .else
10 _i386_path=     /usr/cross/i386-dragonfly/usr/lib
11 .endif
12 EMS+=           ${NATIVE_EMULATION}
13 .for ext in ${ELF_SCR_EXT}
14 LDSCRIPTS_${NATIVE_EMULATION}+= ${NATIVE_EMULATION}.${ext}
15 .endfor
16 LDSCRIPTS+=     ${LDSCRIPTS_${NATIVE_EMULATION}}
17 SRCS+=  e${NATIVE_EMULATION}.c
18 CLEANFILES+=    e${NATIVE_EMULATION}.c
19
20 e${NATIVE_EMULATION}.c ${LDSCRIPTS_${NATIVE_EMULATION}}: \
21     emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \
22     scripttempl/elf.sc genscripts.sh stringify.sed
23         sh ${SRCDIR}/ld/genscripts.sh \
24                 ${SRCDIR:Q}/ld \
25                 ${_i386_path:Q} \
26                 "" \
27                 "" \
28                 ${HOST} \
29                 ${TARGET_TUPLE:Q} \
30                 ${TARGET_TUPLE:Q} \
31                 ${NATIVE_EMULATION:Q} \
32                 "" \
33                 no \
34                 ${NATIVE_EMULATION:Q} \
35                 ${TARGET_TUPLE:Q}