freebsd-dev/gnu/usr.bin/binutils/Makefile.inc0
Marcel Moolenaar ecc4dcbd82 s/MACHINE_ARCH/TARGET_ARCH/g
The target machine is represented by TARGET_ARCH. MACHINE_ARCH always
represents the host machine. When TARGET_ARCH is not defined, it is
assumed to be equal to MACHINE_ARCH. This means that we're building a
native toolset by default. We're creating cross-compilation tools when
MACHINE_ARCH != TARGET_ARCH.

TARGET_ARCH is defined when building binutils as part of the bootstrap
build and is set to reflect the architecture we're currently cross-
building. With this change binutils is ready for cross-building.
1999-12-17 15:50:45 +00:00

57 lines
1.3 KiB
Makefile

#
# $FreeBSD$
#
#
# 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.
#
VERSION= 2.9.1
TARGET_ARCH?= ${MACHINE_ARCH}
.if ${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb"
BINUTIL_ARCH=mips
.else
BINUTIL_ARCH=${TARGET_ARCH}
.endif
# 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:= ..
RELSRC= ${RELTOP}/../../../contrib/binutils
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.
CFLAGS+= -I- -I.
.if exists(${.CURDIR}/${BINUTIL_ARCH})
CFLAGS+= -I${.CURDIR}/${BINUTIL_ARCH}
.endif
CFLAGS+= -I${.CURDIR}
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd/${BINUTIL_ARCH}
CFLAGS+= -I${SRCDIR}/include
.if exists(${.CURDIR}/${BINUTIL_ARCH})
.PATH: ${.CURDIR}/${BINUTIL_ARCH}
.endif
ARCHS= ${BINUTIL_ARCH}
.for _arch in ${CROSS_ARCH}
.if (${ARCHS:R:M${_arch:R}} == "")
ARCHS+=$(_arch)
.endif
.endfor
.for _arch in ${ARCHS}
.if exists(${.CURDIR}/Makefile.${_arch})
.include "${.CURDIR}/Makefile.${_arch}"
.endif
.endfor