1998-03-01 18:41:17 -05:00
|
|
|
#
|
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.
|
|
|
|
|
#
|
|
|
|
|
|
2000-11-15 16:29:55 -05:00
|
|
|
VERSION= 2.10.1
|
1999-12-17 10:50:45 -05:00
|
|
|
TARGET_ARCH?= ${MACHINE_ARCH}
|
1998-03-01 18:41:17 -05:00
|
|
|
|
1999-12-17 10:50:45 -05:00
|
|
|
.if ${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb"
|
1999-02-28 23:01:57 -05:00
|
|
|
BINUTIL_ARCH=mips
|
|
|
|
|
.else
|
1999-12-17 10:50:45 -05:00
|
|
|
BINUTIL_ARCH=${TARGET_ARCH}
|
1999-02-28 23:01:57 -05:00
|
|
|
.endif
|
|
|
|
|
|
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.
|
|
|
|
|
RELTOP:= ..
|
|
|
|
|
|
2000-11-15 17:05:00 -05:00
|
|
|
RELSRC= ${RELTOP}/../../../contrib/binutils
|
1998-03-01 18:41:17 -05:00
|
|
|
SRCDIR= ${.CURDIR}/${RELSRC}
|
|
|
|
|
|
|
|
|
|
CFLAGS+= -D_GNU_SOURCE
|
|
|
|
|
|
|
|
|
|
# We use "-I-" because without it our yacc-generated parser tries to
|
|
|
|
|
# use GNU's bison-generated header files.
|
1998-03-11 21:55:43 -05:00
|
|
|
CFLAGS+= -I- -I.
|
1999-02-28 23:01:57 -05:00
|
|
|
.if exists(${.CURDIR}/${BINUTIL_ARCH})
|
|
|
|
|
CFLAGS+= -I${.CURDIR}/${BINUTIL_ARCH}
|
1998-03-11 21:55:43 -05:00
|
|
|
.endif
|
|
|
|
|
CFLAGS+= -I${.CURDIR}
|
1999-02-28 23:01:57 -05:00
|
|
|
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd/${BINUTIL_ARCH}
|
1998-03-01 18:41:17 -05:00
|
|
|
CFLAGS+= -I${SRCDIR}/include
|
1998-03-11 21:55:43 -05:00
|
|
|
|
1999-02-28 23:01:57 -05:00
|
|
|
.if exists(${.CURDIR}/${BINUTIL_ARCH})
|
|
|
|
|
.PATH: ${.CURDIR}/${BINUTIL_ARCH}
|
1998-03-11 21:55:43 -05:00
|
|
|
.endif
|
|
|
|
|
|
1999-11-06 16:13:47 -05:00
|
|
|
ARCHS= ${BINUTIL_ARCH}
|
|
|
|
|
|
|
|
|
|
.for _arch in ${CROSS_ARCH}
|
|
|
|
|
.if (${ARCHS:R:M${_arch:R}} == "")
|
|
|
|
|
ARCHS+=$(_arch)
|
|
|
|
|
.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
|