34 lines
1.2 KiB
Makefile
34 lines
1.2 KiB
Makefile
# $FreeBSD$
|
|
|
|
TARGET_TUPLE?= ia64-unknown-freebsd
|
|
|
|
.if ${TARGET_ARCH} == "ia64"
|
|
NATIVE_EMULATION= elf64_ia64_fbsd
|
|
HOST= ${TARGET_TUPLE}
|
|
CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\"
|
|
CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
|
|
_ia64_path= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\"
|
|
.else
|
|
_ia64_path= \"/usr/cross/ia64-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 ${_ia64_path} \
|
|
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
|
|
"${NATIVE_EMULATION}" "" ${NATIVE_EMULATION} "${TARGET_TUPLE}"
|
|
|
|
SRCS+= eelf64_ia64.c
|
|
CLEANFILES+= eelf64_ia64.c
|
|
eelf64_ia64.c: emulparams/elf64_ia64.sh emultempl/elf32.em \
|
|
scripttempl/elf.sc genscripts.sh stringify.sed
|
|
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_ia64_path} \
|
|
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
|
|
"elf64_ia64" "" elf64_ia64 ${TARGET_TUPLE}
|