Makefile.inc0 revision 60777
1# 2# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 60777 2000-05-22 08:09:42Z obrien $ 3# 4 5# 6# This is included explicitly at the top of each sub-Makefile. We can't 7# use the normal "Makefile.inc" mechanism, because we need some of these 8# definitions before the sub-Makefile is processed. 9# 10 11VERSION= 2.10-anoncvs-20000512 12TARGET_ARCH?= ${MACHINE_ARCH} 13 14.if ${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb" 15BINUTIL_ARCH=mips 16.else 17BINUTIL_ARCH=${TARGET_ARCH} 18.endif 19 20# RELTOP is the relative path to this point in the source or object 21# tree, from any subdirectory of same. It gets extra "../" prefixes 22# added to it as we descend into subdirectories. 23RELTOP:= .. 24 25RELSRC= ${RELTOP}/../../../contrib/binutils 26SRCDIR= ${.CURDIR}/${RELSRC} 27 28CFLAGS+= -D_GNU_SOURCE 29 30# We use "-I-" because without it our yacc-generated parser tries to 31# use GNU's bison-generated header files. 32CFLAGS+= -I- -I. 33.if exists(${.CURDIR}/${BINUTIL_ARCH}) 34CFLAGS+= -I${.CURDIR}/${BINUTIL_ARCH} 35.endif 36CFLAGS+= -I${.CURDIR} 37CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd/${BINUTIL_ARCH} 38CFLAGS+= -I${SRCDIR}/include 39 40.if exists(${.CURDIR}/${BINUTIL_ARCH}) 41.PATH: ${.CURDIR}/${BINUTIL_ARCH} 42.endif 43 44ARCHS= ${BINUTIL_ARCH} 45 46.for _arch in ${CROSS_ARCH} 47.if (${ARCHS:R:M${_arch:R}} == "") 48ARCHS+=$(_arch) 49.endif 50.endfor 51 52.for _arch in ${ARCHS} 53.if exists(${.CURDIR}/Makefile.${_arch}) 54.include "${.CURDIR}/Makefile.${_arch}" 55.endif 56.endfor 57