Makefile.inc0 revision 201850
1344957Smarcel# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 201850 2010-01-08 23:06:56Z imp $ 2344957Smarcel# 3344957Smarcel# This is included explicitly at the top of each sub-Makefile. We can't 4344957Smarcel# use the normal "Makefile.inc" mechanism, because we need some of these 5344957Smarcel# definitions before the sub-Makefile is processed. 6344957Smarcel 7344957SmarcelVERSION= "2.15 [FreeBSD] 2004-05-23" 8344957Smarcel 9344957SmarcelTARGET_ARCH?= ${MACHINE_ARCH} 10344957Smarcel.if ${TARGET_ARCH} == "amd64" 11344957SmarcelBINUTILS_ARCH=x86_64 12344957Smarcel.else 13344957SmarcelBINUTILS_ARCH=${TARGET_ARCH} 14344957Smarcel.endif 15344957SmarcelTARGET_TUPLE?= ${BINUTILS_ARCH}-obrien-freebsd 16344957Smarcel 17344957Smarcel# RELTOP is the relative path to this point in the source or object 18344957Smarcel# tree, from any subdirectory of same. It gets extra "../" prefixes 19344957Smarcel# added to it as we descend into subdirectories. 20344957SmarcelRELTOP:= .. 21344957Smarcel 22344957SmarcelRELSRC= ${RELTOP}/../../../contrib/binutils 23344957SmarcelSRCDIR= ${.CURDIR}/${RELSRC} 24344957Smarcel 25344957Smarcel.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "i386" || \ 26344957Smarcel ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "mips" 27344957SmarcelCFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 28344957Smarcel.else 29344957SmarcelCFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 30344957Smarcel.endif 31344957Smarcel 32344957SmarcelCFLAGS+= -I. 33344957Smarcel.if exists(${.CURDIR}/${TARGET_ARCH}) 34344957SmarcelCFLAGS+= -I${.CURDIR}/${TARGET_ARCH} 35344957Smarcel.endif 36344957SmarcelCFLAGS+= -I${.CURDIR} 37344957SmarcelCFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd 38344957SmarcelCFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd 39344957SmarcelCFLAGS+= -I${SRCDIR}/include 40344957Smarcel 41344957Smarcel.if exists(${.CURDIR}/${TARGET_ARCH}) 42344957Smarcel.PATH: ${.CURDIR}/${TARGET_ARCH} 43344957Smarcel.endif 44344957Smarcel 45344957SmarcelARCHS= ${TARGET_ARCH} 46344957Smarcel 47344957Smarcel.for _arch in ${CROSS_ARCH} 48344957Smarcel.if (${ARCHS:R:M${_arch:R}} == "") 49344957SmarcelARCHS+= $(_arch) 50344957Smarcel.endif 51344957Smarcel.endfor 52344957Smarcel 53344957Smarcel.for _arch in ${ARCHS} 54344957Smarcel.if exists(${.CURDIR}/Makefile.${_arch}) 55344957Smarcel.include "${.CURDIR}/Makefile.${_arch}" 56344957Smarcel.endif 57344957Smarcel.endfor 58344957Smarcel