freebsd-dev/gnu/usr.bin/binutils/Makefile.inc0
John Birrell dd67e6bff7 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.
1998-05-04 21:10:56 +00:00

44 lines
1.1 KiB
Makefile

#
# $Id: Makefile.inc0,v 1.3 1998/03/12 05:59:22 jb Exp $
#
#
# 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.8.1
# 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}/${MACHINE_ARCH})
CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH}
.endif
CFLAGS+= -I${.CURDIR}
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd/${MACHINE_ARCH}
CFLAGS+= -I${SRCDIR}/include
.if exists(${.CURDIR}/${MACHINE_ARCH})
.PATH: ${.CURDIR}/${MACHINE_ARCH}
.endif
ARCHS= ${MACHINE_ARCH} ${CROSS_TOOLS}
.for _arch in ${ARCHS}
.if exists(${.CURDIR}/Makefile.${_arch})
.include "${.CURDIR}/Makefile.${_arch}"
.endif
.endfor