1999-08-27 19:37:10 -04:00
|
|
|
# $FreeBSD$
|
1998-03-01 18:41:17 -05:00
|
|
|
#
|
|
|
|
|
# This is included explicitly at the top of each sub-Makefile. We can't
|
|
|
|
|
# use the normal "Makefile.inc" mechanism, because we need some of these
|
|
|
|
|
# definitions before the sub-Makefile is processed.
|
|
|
|
|
|
2010-11-01 15:39:10 -04:00
|
|
|
VERSION= "2.17.50 [FreeBSD] 2007-07-03"
|
1998-03-01 18:41:17 -05:00
|
|
|
|
2010-11-10 01:39:49 -05:00
|
|
|
.if defined(TARGET_ARCH)
|
2011-01-07 15:26:33 -05:00
|
|
|
TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
|
2004-06-16 03:09:44 -04:00
|
|
|
.else
|
2010-11-10 01:39:49 -05:00
|
|
|
TARGET_CPUARCH=${MACHINE_CPUARCH}
|
2004-06-16 03:09:44 -04:00
|
|
|
.endif
|
2010-11-10 01:39:49 -05:00
|
|
|
TARGET_ARCH?= ${MACHINE_ARCH}
|
2010-10-21 15:58:20 -04:00
|
|
|
TARGET_VENDOR?= unknown
|
|
|
|
|
TARGET_OS?= freebsd
|
2010-11-10 01:39:49 -05:00
|
|
|
BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/}
|
2010-10-21 15:58:20 -04:00
|
|
|
TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS}
|
2011-01-07 15:26:33 -05:00
|
|
|
.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH:Mmips*eb} != ""
|
2010-11-10 01:39:49 -05:00
|
|
|
TARGET_BIG_ENDIAN=t
|
|
|
|
|
.endif
|
1999-02-28 23:01:57 -05:00
|
|
|
|
1998-03-01 18:41:17 -05:00
|
|
|
# RELTOP is the relative path to this point in the source or object
|
|
|
|
|
# tree, from any subdirectory of same. It gets extra "../" prefixes
|
|
|
|
|
# added to it as we descend into subdirectories.
|
2001-10-13 20:58:59 -04:00
|
|
|
RELTOP:= ..
|
1998-03-01 18:41:17 -05:00
|
|
|
|
2001-10-13 20:58:59 -04:00
|
|
|
RELSRC= ${RELTOP}/../../../contrib/binutils
|
|
|
|
|
SRCDIR= ${.CURDIR}/${RELSRC}
|
1998-03-01 18:41:17 -05:00
|
|
|
|
2010-11-10 01:39:49 -05:00
|
|
|
.if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \
|
2010-11-13 20:52:19 -05:00
|
|
|
${TARGET_ARCH} == "powerpc" || \
|
2011-01-27 09:16:12 -05:00
|
|
|
(${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips64*} == "")
|
2007-02-11 02:15:06 -05:00
|
|
|
CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32
|
|
|
|
|
.else
|
|
|
|
|
CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64
|
|
|
|
|
.endif
|
|
|
|
|
|
2002-02-07 12:35:49 -05:00
|
|
|
CFLAGS+= -I.
|
2001-10-13 20:58:59 -04:00
|
|
|
CFLAGS+= -I${.CURDIR}
|
2004-07-08 13:05:34 -04:00
|
|
|
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd
|
2004-06-16 03:09:44 -04:00
|
|
|
CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd
|
2001-10-13 20:58:59 -04:00
|
|
|
CFLAGS+= -I${SRCDIR}/include
|
1998-03-11 21:55:43 -05:00
|
|
|
|
2010-11-10 01:39:49 -05:00
|
|
|
ARCHS= ${TARGET_CPUARCH}
|
1999-11-06 16:13:47 -05:00
|
|
|
|
2010-11-15 17:11:18 -05:00
|
|
|
.if exists(${.CURDIR}/Makefile.${TARGET_ARCH})
|
|
|
|
|
.include "${.CURDIR}/Makefile.${TARGET_ARCH}"
|
|
|
|
|
.elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH})
|
|
|
|
|
.include "${.CURDIR}/Makefile.${TARGET_CPUARCH}"
|
1998-03-11 21:55:43 -05:00
|
|
|
.endif
|