Makefile.inc0 revision 217942
1# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 217942 2011-01-27 14:16:12Z jchandra $ 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 9.if defined(TARGET_ARCH) 10TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} 11.else 12TARGET_CPUARCH=${MACHINE_CPUARCH} 13.endif 14TARGET_ARCH?= ${MACHINE_ARCH} 15BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/} 16TARGET_TUPLE?= ${BINUTILS_ARCH}-obrien-freebsd 17.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH:Mmips*eb} != "" 18TARGET_BIG_ENDIAN=t 19.endif 20 21# RELTOP is the relative path to this point in the source or object 22# tree, from any subdirectory of same. It gets extra "../" prefixes 23# added to it as we descend into subdirectories. 24RELTOP:= .. 25 26RELSRC= ${RELTOP}/../../../contrib/binutils 27SRCDIR= ${.CURDIR}/${RELSRC} 28 29.if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \ 30 ${TARGET_ARCH} == "powerpc" || \ 31 (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips64*} == "") 32CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 33.else 34CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 35.endif 36 37CFLAGS+= -I. 38CFLAGS+= -I${.CURDIR} 39CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd 40CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd 41CFLAGS+= -I${SRCDIR}/include 42 43ARCHS= ${TARGET_CPUARCH} 44 45.if exists(${.CURDIR}/Makefile.${TARGET_ARCH}) 46.include "${.CURDIR}/Makefile.${TARGET_ARCH}" 47.elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH}) 48.include "${.CURDIR}/Makefile.${TARGET_CPUARCH}" 49.endif 50