Makefile.inc0 revision 218822
150472Speter# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 218822 2011-02-18 20:54:12Z dim $ 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 7218822SdimVERSION= "2.17.50 [FreeBSD] 2007-07-03" 884947Sobrien 9215082Simp.if defined(TARGET_ARCH) 10217123SimpTARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} 11130575Sobrien.else 12215082SimpTARGET_CPUARCH=${MACHINE_CPUARCH} 13130575Sobrien.endif 14215082SimpTARGET_ARCH?= ${MACHINE_ARCH} 15218822SdimTARGET_VENDOR?= unknown 16218822SdimTARGET_OS?= freebsd 17215082SimpBINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/} 18218822SdimTARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS} 19217123Simp.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH:Mmips*eb} != "" 20215082SimpTARGET_BIG_ENDIAN=t 21215082Simp.endif 2244360Simp 2333975Sjdp# RELTOP is the relative path to this point in the source or object 2433975Sjdp# tree, from any subdirectory of same. It gets extra "../" prefixes 2533975Sjdp# added to it as we descend into subdirectories. 2684902SobrienRELTOP:= .. 2733975Sjdp 2884902SobrienRELSRC= ${RELTOP}/../../../contrib/binutils 2984902SobrienSRCDIR= ${.CURDIR}/${RELSRC} 3033975Sjdp 31215082Simp.if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \ 32215276Simp ${TARGET_ARCH} == "powerpc" || \ 33217942Sjchandra (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips64*} == "") 34166638SmarcelCFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 35166638Smarcel.else 36166638SmarcelCFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 37166638Smarcel.endif 38166638Smarcel 3990353SobrienCFLAGS+= -I. 4084902SobrienCFLAGS+= -I${.CURDIR} 41131832SobrienCFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd 42130575SobrienCFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd 4384902SobrienCFLAGS+= -I${SRCDIR}/include 4434495Sjdp 45215082SimpARCHS= ${TARGET_CPUARCH} 4635709Sjb 47215351Snwhitehorn.if exists(${.CURDIR}/Makefile.${TARGET_ARCH}) 48215351Snwhitehorn.include "${.CURDIR}/Makefile.${TARGET_ARCH}" 49215351Snwhitehorn.elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH}) 50215351Snwhitehorn.include "${.CURDIR}/Makefile.${TARGET_CPUARCH}" 5152927Sjb.endif 52