# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 215276 2010-11-14 01:52:19Z imp $ # # This is included explicitly at the top of each sub-Makefile. We can't # use the normal "Makefile.inc" mechanism, because we need some of these # definitions before the sub-Makefile is processed. VERSION= "2.15 [FreeBSD] 2004-05-23" .if defined(TARGET_ARCH) TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif TARGET_ARCH?= ${MACHINE_ARCH} BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/} TARGET_TUPLE?= ${BINUTILS_ARCH}-obrien-freebsd .if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb" TARGET_BIG_ENDIAN=t .endif # RELTOP is the relative path to this point in the source or object # tree, from any subdirectory of same. It gets extra "../" prefixes # added to it as we descend into subdirectories. RELTOP:= .. RELSRC= ${RELTOP}/../../../contrib/binutils SRCDIR= ${.CURDIR}/${RELSRC} .if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \ ${TARGET_ARCH} == "powerpc" || \ (${TARGET_CPUARCH} == "mips" && \ (!defined(TARGET_ABI) || ${TARGET_ABI} != "n64")) CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 .else CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 .endif CFLAGS+= -I. .if exists(${.CURDIR}/${TARGET_CPUARCH}) CFLAGS+= -I${.CURDIR}/${TARGET_CPUARCH} .endif CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd CFLAGS+= -I${SRCDIR}/include .if exists(${.CURDIR}/${TARGET_CPUARCH}) .PATH: ${.CURDIR}/${TARGET_CPUARCH} .endif ARCHS= ${TARGET_CPUARCH} .for _arch in ${CROSS_ARCH} .if (${ARCHS:R:M${_arch:R}} == "") ARCHS+= $(_arch) .endif .endfor .for _arch in ${ARCHS} .if exists(${.CURDIR}/Makefile.${_arch}) .include "${.CURDIR}/Makefile.${_arch}" .endif .endfor