From e23f821a54d936951d0997a9948044b2967b00bf Mon Sep 17 00:00:00 2001 From: jb Date: Mon, 4 May 1998 21:10:56 +0000 Subject: Add makefile support for cross-architectures. Allow CROSS_TOOLS to be defined (in /etc/make.conf, say) and set to the additional architectures that need to be compiled in. So on alpha I set CROSS_TOOLS = i386. On i386 you can't build alpha due to lack of 64-bit support on 32-bit architectures, but that's a GNU problem. This change relies on makefiles in the binutils sub-directories having the extension defined in the CROSS_TOOLS, instead of those makefiles being selected based on the host architecture. --- gnu/usr.bin/binutils/Makefile.inc0 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gnu') diff --git a/gnu/usr.bin/binutils/Makefile.inc0 b/gnu/usr.bin/binutils/Makefile.inc0 index c028a91..8cc9c22 100644 --- a/gnu/usr.bin/binutils/Makefile.inc0 +++ b/gnu/usr.bin/binutils/Makefile.inc0 @@ -1,5 +1,5 @@ # -# $Id: Makefile.inc0,v 1.2 1998/03/12 02:54:39 jdp Exp $ +# $Id: Makefile.inc0,v 1.3 1998/03/12 05:59:22 jb Exp $ # # @@ -34,6 +34,10 @@ CFLAGS+= -I${SRCDIR}/include .PATH: ${.CURDIR}/${MACHINE_ARCH} .endif -.if exists(${.CURDIR}/Makefile.${MACHINE_ARCH}) -.include "${.CURDIR}/Makefile.${MACHINE_ARCH}" +ARCHS= ${MACHINE_ARCH} ${CROSS_TOOLS} + +.for _arch in ${ARCHS} +.if exists(${.CURDIR}/Makefile.${_arch}) +.include "${.CURDIR}/Makefile.${_arch}" .endif +.endfor -- cgit v1.1