freebsd-dev/gnu/usr.bin/binutils/as/Makefile
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

37 lines
589 B
Makefile

#
# $FreeBSD$
#
.include "${.CURDIR}/../Makefile.inc0"
GASES= ${BINUTIL_ARCH}
FORMATS= freebsd
# Only build the cross tools when not cross-compiling.
.if ${TARGET_ARCH} == ${MACHINE_ARCH}
.if defined(CROSS_ARCH)
.for _g in ${CROSS_ARCH}
.if (${GASES:R:M${_g:R}} == "")
GASES+=$(_g)
.endif
.endfor
.endif
.if defined(CROSS_FORMATS)
.for _f in ${CROSS_FORMATS}
.if (${FORMATS:R:M${_f:R}} == "")
FORMATS+=$(_f)
.endif
.endfor
.endif
.endif
.for _g in ${GASES}
.for _f in ${FORMATS}
.if exists(${.CURDIR}/${_g}-${_f})
SUBDIR+= ${_g}-${_f}
.endif
.endfor
.endfor
.include <bsd.subdir.mk>