Makefile.inc0 revision 131832
150472Speter# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 131832 2004-07-08 17:05:34Z obrien $
233975Sjdp#
333975Sjdp# This is included explicitly at the top of each sub-Makefile.  We can't
433975Sjdp# use the normal "Makefile.inc" mechanism, because we need some of these
533975Sjdp# definitions before the sub-Makefile is processed.
633975Sjdp
7130575SobrienVERSION=	"2.15 [FreeBSD] 2004-05-23"
884947Sobrien
954748SmarcelTARGET_ARCH?=	${MACHINE_ARCH}
10130575Sobrien.if ${TARGET_ARCH} == "amd64"
11130575SobrienBINUTILS_ARCH=x86_64
12130575Sobrien.else
13130575SobrienBINUTILS_ARCH=${TARGET_ARCH}
14130575Sobrien.endif
15130575SobrienTARGET_TUPLE?=	${BINUTILS_ARCH}-obrien-freebsd
1644360Simp
1733975Sjdp# RELTOP is the relative path to this point in the source or object
1833975Sjdp# tree, from any subdirectory of same.  It gets extra "../" prefixes
1933975Sjdp# added to it as we descend into subdirectories.
2084902SobrienRELTOP:= ..
2133975Sjdp
2284902SobrienRELSRC=	${RELTOP}/../../../contrib/binutils
2384902SobrienSRCDIR=	${.CURDIR}/${RELSRC}
2433975Sjdp
2590353SobrienCFLAGS+= -I.
26103780Sobrien.if exists(${.CURDIR}/${TARGET_ARCH})
27103780SobrienCFLAGS+= -I${.CURDIR}/${TARGET_ARCH}
2834495Sjdp.endif
2984902SobrienCFLAGS+= -I${.CURDIR}
30131832SobrienCFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd
31130575SobrienCFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd
3284902SobrienCFLAGS+= -I${SRCDIR}/include
3334495Sjdp
34103780Sobrien.if exists(${.CURDIR}/${TARGET_ARCH})
35103780Sobrien.PATH: ${.CURDIR}/${TARGET_ARCH}
3634495Sjdp.endif
3734495Sjdp
38103780SobrienARCHS=	${TARGET_ARCH}
3935709Sjb
4052927Sjb.for _arch in ${CROSS_ARCH}
4152927Sjb.if (${ARCHS:R:M${_arch:R}} == "")
4284902SobrienARCHS+= $(_arch)
4352927Sjb.endif
4452927Sjb.endfor
4552927Sjb
4635709Sjb.for _arch in ${ARCHS}
4735709Sjb.if exists(${.CURDIR}/Makefile.${_arch})
4835709Sjb.include "${.CURDIR}/Makefile.${_arch}"
4934495Sjdp.endif
5035709Sjb.endfor
51