blob: 9b7f7fd9b40699163ca3fae03455a638e020c948 (
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
43
|
# $FreeBSD$
TARGET_TUPLE?= sparc64-unknown-freebsd
.if ${TARGET_ARCH} == "sparc64"
NATIVE_EMULATION= elf64_sparc_fbsd
HOST= ${TARGET_TUPLE}
CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\"
CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
_sparc_path= \"${TOOLS_PREFIX}/lib:${TOOLS_PREFIX}/usr/lib\"
.else
_sparc_path= \"/usr/cross/sparc-freebsd/usr/lib\"
.endif
EMS+= ${NATIVE_EMULATION} elf64_sparc
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 ${_sparc_path} \
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
${NATIVE_EMULATION} "" ${NATIVE_EMULATION} ${TARGET_TUPLE}
.for BITS in 64 32
EMS+= elf${BITS}_sparc
LDSCRIPTS+= elf${BITS}_sparc.x elf${BITS}_sparc.xbn elf${BITS}_sparc.xn \
elf${BITS}_sparc.xr \
elf${BITS}_sparc.xs elf${BITS}_sparc.xu elf${BITS}_sparc.xc \
elf${BITS}_sparc.xsc
SRCS+= eelf${BITS}_sparc.c
CLEANFILES+= eelf${BITS}_sparc.c
eelf${BITS}_sparc.c: emulparams/elf${BITS}_sparc.sh emultempl/elf32.em \
scripttempl/elf.sc genscripts.sh stringify.sed
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_sparc_path} \
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
elf${BITS}_sparc "" elf${BITS}_sparc ${TARGET_TUPLE}
.endfor # BITS
|