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.
|
|
|
|
|
|
2004-06-16 03:09:44 -04:00
|
|
|
VERSION= "2.15 [FreeBSD] 2004-05-23"
|
1998-03-01 18:41:17 -05:00
|
|
|
|
2001-10-14 21:18:51 -04:00
|
|
|
TARGET_ARCH?= ${MACHINE_ARCH}
|
2004-06-16 03:09:44 -04:00
|
|
|
.if ${TARGET_ARCH} == "amd64"
|
|
|
|
|
BINUTILS_ARCH=x86_64
|
|
|
|
|
.else
|
|
|
|
|
BINUTILS_ARCH=${TARGET_ARCH}
|
|
|
|
|
.endif
|
|
|
|
|
TARGET_TUPLE?= ${BINUTILS_ARCH}-obrien-freebsd
|
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
|
|
|
|
2007-02-11 02:15:06 -05:00
|
|
|
.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "powerpc"
|
|
|
|
|
CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32
|
|
|
|
|
.else
|
|
|
|
|
CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64
|
|
|
|
|
.endif
|
|
|
|
|
|
2002-02-07 12:35:49 -05:00
|
|
|
CFLAGS+= -I.
|
2002-09-22 01:29:37 -04:00
|
|
|
.if exists(${.CURDIR}/${TARGET_ARCH})
|
|
|
|
|
CFLAGS+= -I${.CURDIR}/${TARGET_ARCH}
|
1998-03-11 21:55:43 -05:00
|
|
|
.endif
|
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
|
|
|
|
2002-09-22 01:29:37 -04:00
|
|
|
.if exists(${.CURDIR}/${TARGET_ARCH})
|
|
|
|
|
.PATH: ${.CURDIR}/${TARGET_ARCH}
|
1998-03-11 21:55:43 -05:00
|
|
|
.endif
|
|
|
|
|
|
2002-09-22 01:29:37 -04:00
|
|
|
ARCHS= ${TARGET_ARCH}
|
1999-11-06 16:13:47 -05:00
|
|
|
|
|
|
|
|
.for _arch in ${CROSS_ARCH}
|
|
|
|
|
.if (${ARCHS:R:M${_arch:R}} == "")
|
2001-10-13 20:58:59 -04:00
|
|
|
ARCHS+= $(_arch)
|
1999-11-06 16:13:47 -05:00
|
|
|
.endif
|
|
|
|
|
.endfor
|
1998-05-04 17:10:56 -04:00
|
|
|
|
|
|
|
|
.for _arch in ${ARCHS}
|
|
|
|
|
.if exists(${.CURDIR}/Makefile.${_arch})
|
|
|
|
|
.include "${.CURDIR}/Makefile.${_arch}"
|
1998-03-11 21:55:43 -05:00
|
|
|
.endif
|
1998-05-04 17:10:56 -04:00
|
|
|
.endfor
|