blob: b959aaf356be0a35359916431e16b8d471009c44 (
plain)
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
42
|
# $FreeBSD$
TARGET_TUPLE?= i386-unknown-freebsd
.if ${TARGET_ARCH} == "i386"
NATIVE_EMULATION= elf_i386_fbsd
HOST= ${TARGET_TUPLE}
CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\"
CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
_i386_path= \"${TOOLS_PREFIX}/lib:${TOOLS_PREFIX}/usr/lib\"
.else
_i386_path= \"/usr/cross/i386-freebsd/usr/lib\"
.endif
EMS+= ${NATIVE_EMULATION}
LDSCRIPTS+= ${NATIVE_EMULATION}.x ${NATIVE_EMULATION}.xbn ${NATIVE_EMULATION}.xn ${NATIVE_EMULATION}.xr \
${NATIVE_EMULATION}.xs ${NATIVE_EMULATION}.xu ${NATIVE_EMULATION}.xc ${NATIVE_EMULATION}.xsc
SRCS+= e${NATIVE_EMULATION}.c
CLEANFILES+= e${NATIVE_EMULATION}.c
e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em scripttempl/elf.sc \
genscripts.sh stringify.sed
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_i386_path} \
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
"${NATIVE_EMULATION}" "" ${NATIVE_EMULATION} "${TARGET_TUPLE}"
.if defined(BINUTILSDISTDIR) && exists(${BINUTILSDISTDIR})
EMS+= i386pe
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} ${TARGET_TUPLE}winnt \
${TARGET_TUPLE}winnt i386pe "" i386pe \
${TARGET_TUPLE}winnt
.endif
|