da93b590fb
tidy up the logic that works out which sub-directories to build. The new directories with freebsdelf suffixes now have freebsd suffixes after a repo move by Peter at the request of David O'Brien.
39 lines
676 B
Makefile
39 lines
676 B
Makefile
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
.include "${.CURDIR}/../Makefile.inc0"
|
|
|
|
GASES= ${BINUTIL_ARCH}
|
|
FORMATS= freebsd
|
|
|
|
# Only build the cross tools when not cross-compiling.
|
|
__MA!=/sbin/sysctl -b hw.machine_arch
|
|
__M!=/sbin/sysctl -b hw.machine
|
|
.if ${__MA} == ${MACHINE_ARCH} || ${__M} == ${MACHINE}
|
|
.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>
|