Makefile.inc0 revision 52927
133975Sjdp#
250472Speter# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 52927 1999-11-06 21:13:47Z jb $
333975Sjdp#
433975Sjdp
533975Sjdp#
633975Sjdp# This is included explicitly at the top of each sub-Makefile.  We can't
733975Sjdp# use the normal "Makefile.inc" mechanism, because we need some of these
833975Sjdp# definitions before the sub-Makefile is processed.
933975Sjdp#
1033975Sjdp
1138892SjdpVERSION=	2.9.1
1233975Sjdp
1344360Simp.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
1444360SimpBINUTIL_ARCH=mips
1544360Simp.else
1644360SimpBINUTIL_ARCH=${MACHINE_ARCH}
1744360Simp.endif
1844360Simp
1933975Sjdp# RELTOP is the relative path to this point in the source or object
2033975Sjdp# tree, from any subdirectory of same.  It gets extra "../" prefixes
2133975Sjdp# added to it as we descend into subdirectories.
2233975SjdpRELTOP:=	..
2333975Sjdp
2433975SjdpRELSRC=		${RELTOP}/../../../contrib/binutils
2533975SjdpSRCDIR=		${.CURDIR}/${RELSRC}
2633975Sjdp
2733975SjdpCFLAGS+=	-D_GNU_SOURCE
2833975Sjdp
2933975Sjdp# We use "-I-" because without it our yacc-generated parser tries to
3033975Sjdp# use GNU's bison-generated header files.
3134495SjdpCFLAGS+=	-I- -I.
3244360Simp.if exists(${.CURDIR}/${BINUTIL_ARCH})
3344360SimpCFLAGS+=	-I${.CURDIR}/${BINUTIL_ARCH}
3434495Sjdp.endif
3534495SjdpCFLAGS+=	-I${.CURDIR}
3644360SimpCFLAGS+=	-I${.CURDIR}/${RELTOP}/libbfd/${BINUTIL_ARCH}
3733975SjdpCFLAGS+=	-I${SRCDIR}/include
3834495Sjdp
3944360Simp.if exists(${.CURDIR}/${BINUTIL_ARCH})
4044360Simp.PATH: ${.CURDIR}/${BINUTIL_ARCH}
4134495Sjdp.endif
4234495Sjdp
4352927SjbARCHS=		${BINUTIL_ARCH}
4435709Sjb
4552927Sjb.for _arch in ${CROSS_ARCH}
4652927Sjb.if (${ARCHS:R:M${_arch:R}} == "")
4752927SjbARCHS+=$(_arch)
4852927Sjb.endif
4952927Sjb.endfor
5052927Sjb
5135709Sjb.for _arch in ${ARCHS}
5235709Sjb.if exists(${.CURDIR}/Makefile.${_arch})
5335709Sjb.include "${.CURDIR}/Makefile.${_arch}"
5434495Sjdp.endif
5535709Sjb.endfor
56