mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Change CROSS_TARGETS to CROSS_FORMATS because that makes more sense.
Check if already cross-compiling and only build the cross-tools if not cross-compiling (to save time).
This commit is contained in:
parent
53149093a0
commit
19bf8ac856
1 changed files with 21 additions and 1 deletions
|
|
@ -5,11 +5,31 @@
|
|||
.include "${.CURDIR}/../Makefile.inc0"
|
||||
|
||||
GASES= ${BINUTIL_ARCH}
|
||||
GASES+= ${CROSS_TOOLS} ${CROSS_TARGETS}
|
||||
|
||||
# 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
|
||||
.endif
|
||||
|
||||
.for _g in ${GASES}
|
||||
.if exists(${.CURDIR}/as_${_g})
|
||||
SUBDIR+= as_${_g}
|
||||
.endif
|
||||
.if defined(CROSS_FORMATS)
|
||||
.for _f in ${CROSS_FORMATS}
|
||||
.if exists(${.CURDIR}/${_g}-${_f})
|
||||
SUBDIR+= ${_g}-${_f}
|
||||
.endif
|
||||
.endfor
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
|
|
|||
Loading…
Reference in a new issue