Makefile.inc0 revision 217942
150472Speter# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 217942 2011-01-27 14:16:12Z jchandra $ 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) 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} 15215082SimpBINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/} 16130575SobrienTARGET_TUPLE?= ${BINUTILS_ARCH}-obrien-freebsd 17217123Simp.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH:Mmips*eb} != "" 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" || \ 31217942Sjchandra (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips64*} == "") 32166638SmarcelCFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 33166638Smarcel.else 34166638SmarcelCFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 35166638Smarcel.endif 36166638Smarcel 3790353SobrienCFLAGS+= -I. 3884902SobrienCFLAGS+= -I${.CURDIR} 39131832SobrienCFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd 40130575SobrienCFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd 4184902SobrienCFLAGS+= -I${SRCDIR}/include 4234495Sjdp 43215082SimpARCHS= ${TARGET_CPUARCH} 4435709Sjb 45215351Snwhitehorn.if exists(${.CURDIR}/Makefile.${TARGET_ARCH}) 46215351Snwhitehorn.include "${.CURDIR}/Makefile.${TARGET_ARCH}" 47215351Snwhitehorn.elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH}) 48215351Snwhitehorn.include "${.CURDIR}/Makefile.${TARGET_CPUARCH}" 4952927Sjb.endif 50