Makefile.inc0 revision 215351
150472Speter# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 215351 2010-11-15 22:11:18Z nwhitehorn $ 233975Sjdp# 333975Sjdp# This is included explicitly at the top of each sub-Makefile. We can't 433975Sjdp# use the normal "Makefile.inc" mechanism, because we need some of these 533975Sjdp# definitions before the sub-Makefile is processed. 633975Sjdp 7130575SobrienVERSION= "2.15 [FreeBSD] 2004-05-23" 884947Sobrien 9215082Simp.if defined(TARGET_ARCH) 10215276SimpTARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} 11130575Sobrien.else 12215082SimpTARGET_CPUARCH=${MACHINE_CPUARCH} 13130575Sobrien.endif 14215082SimpTARGET_ARCH?= ${MACHINE_ARCH} 15215082SimpBINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/} 16130575SobrienTARGET_TUPLE?= ${BINUTILS_ARCH}-obrien-freebsd 17215082Simp.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb" 18215082SimpTARGET_BIG_ENDIAN=t 19215082Simp.endif 2044360Simp 2133975Sjdp# RELTOP is the relative path to this point in the source or object 2233975Sjdp# tree, from any subdirectory of same. It gets extra "../" prefixes 2333975Sjdp# added to it as we descend into subdirectories. 2484902SobrienRELTOP:= .. 2533975Sjdp 2684902SobrienRELSRC= ${RELTOP}/../../../contrib/binutils 2784902SobrienSRCDIR= ${.CURDIR}/${RELSRC} 2833975Sjdp 29215082Simp.if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \ 30215276Simp ${TARGET_ARCH} == "powerpc" || \ 31215082Simp (${TARGET_CPUARCH} == "mips" && \ 32215082Simp (!defined(TARGET_ABI) || ${TARGET_ABI} != "n64")) 33166638SmarcelCFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 34166638Smarcel.else 35166638SmarcelCFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 36166638Smarcel.endif 37166638Smarcel 3890353SobrienCFLAGS+= -I. 3984902SobrienCFLAGS+= -I${.CURDIR} 40131832SobrienCFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd 41130575SobrienCFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd 4284902SobrienCFLAGS+= -I${SRCDIR}/include 4334495Sjdp 44215082SimpARCHS= ${TARGET_CPUARCH} 4535709Sjb 46215351Snwhitehorn.if exists(${.CURDIR}/Makefile.${TARGET_ARCH}) 47215351Snwhitehorn.include "${.CURDIR}/Makefile.${TARGET_ARCH}" 48215351Snwhitehorn.elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH}) 49215351Snwhitehorn.include "${.CURDIR}/Makefile.${TARGET_CPUARCH}" 5052927Sjb.endif 51