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.
7 VERSION= "2.17.50 [FreeBSD] 2007-07-03"
9 .if defined(TARGET_ARCH)
10 TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
12 TARGET_CPUARCH=${MACHINE_CPUARCH}
14 TARGET_ARCH?= ${MACHINE_ARCH}
15 TARGET_VENDOR?= unknown
17 BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/}
18 TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS}
19 .if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH:Mmips*eb} != ""
23 # RELTOP is the relative path to this point in the source or object
24 # tree, from any subdirectory of same. It gets extra "../" prefixes
25 # added to it as we descend into subdirectories.
28 RELSRC= ${RELTOP}/../../../contrib/binutils
29 SRCDIR= ${.CURDIR}/${RELSRC}
31 .if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \
32 ${TARGET_ARCH} == "powerpc" || \
33 (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips64*} == "")
34 CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32
36 CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64
41 CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd
42 CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd
43 CFLAGS+= -I${SRCDIR}/include
45 ARCHS= ${TARGET_CPUARCH}
47 .if exists(${.CURDIR}/Makefile.${TARGET_ARCH})
48 .include "${.CURDIR}/Makefile.${TARGET_ARCH}"
49 .elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH})
50 .include "${.CURDIR}/Makefile.${TARGET_CPUARCH}"