Makefile.inc0 revision 208737
1# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 208737 2010-06-02 11:06:03Z jmallett $ 2# 3# This is included explicitly at the top of each sub-Makefile. We can't 4# use the normal "Makefile.inc" mechanism, because we need some of these 5# definitions before the sub-Makefile is processed. 6 7VERSION= "2.15 [FreeBSD] 2004-05-23" 8 9TARGET_ARCH?= ${MACHINE_ARCH} 10.if ${TARGET_ARCH} == "amd64" 11BINUTILS_ARCH=x86_64 12.else 13BINUTILS_ARCH=${TARGET_ARCH} 14.endif 15TARGET_TUPLE?= ${BINUTILS_ARCH}-obrien-freebsd 16 17# RELTOP is the relative path to this point in the source or object 18# tree, from any subdirectory of same. It gets extra "../" prefixes 19# added to it as we descend into subdirectories. 20RELTOP:= .. 21 22RELSRC= ${RELTOP}/../../../contrib/binutils 23SRCDIR= ${.CURDIR}/${RELSRC} 24 25.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "i386" || \ 26 ${TARGET_ARCH} == "powerpc" || \ 27 (${TARGET_ARCH} == "mips" && (!defined(TARGET_ABI) || ${TARGET_ABI} != "n64")) 28CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 29.else 30CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 31.endif 32 33CFLAGS+= -I. 34.if exists(${.CURDIR}/${TARGET_ARCH}) 35CFLAGS+= -I${.CURDIR}/${TARGET_ARCH} 36.endif 37CFLAGS+= -I${.CURDIR} 38CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd 39CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd 40CFLAGS+= -I${SRCDIR}/include 41 42.if exists(${.CURDIR}/${TARGET_ARCH}) 43.PATH: ${.CURDIR}/${TARGET_ARCH} 44.endif 45 46ARCHS= ${TARGET_ARCH} 47 48.for _arch in ${CROSS_ARCH} 49.if (${ARCHS:R:M${_arch:R}} == "") 50ARCHS+= $(_arch) 51.endif 52.endfor 53 54.for _arch in ${ARCHS} 55.if exists(${.CURDIR}/Makefile.${_arch}) 56.include "${.CURDIR}/Makefile.${_arch}" 57.endif 58.endfor 59