Makefile.inc0 revision 52927
1207753Smm#
2207753Smm# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 52927 1999-11-06 21:13:47Z jb $
3207753Smm#
4207753Smm
5207753Smm#
6207753Smm# This is included explicitly at the top of each sub-Makefile.  We can't
7207753Smm# use the normal "Makefile.inc" mechanism, because we need some of these
8207753Smm# definitions before the sub-Makefile is processed.
9207753Smm#
10207753Smm
11207753SmmVERSION=	2.9.1
12207753Smm
13207753Smm.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
14207753SmmBINUTIL_ARCH=mips
15207753Smm.else
16207753SmmBINUTIL_ARCH=${MACHINE_ARCH}
17207753Smm.endif
18207753Smm
19207753Smm# RELTOP is the relative path to this point in the source or object
20207753Smm# tree, from any subdirectory of same.  It gets extra "../" prefixes
21207753Smm# added to it as we descend into subdirectories.
22207753SmmRELTOP:=	..
23207753Smm
24207753SmmRELSRC=		${RELTOP}/../../../contrib/binutils
25207753SmmSRCDIR=		${.CURDIR}/${RELSRC}
26207753Smm
27207753SmmCFLAGS+=	-D_GNU_SOURCE
28207753Smm
29207753Smm# We use "-I-" because without it our yacc-generated parser tries to
30207753Smm# use GNU's bison-generated header files.
31207753SmmCFLAGS+=	-I- -I.
32207753Smm.if exists(${.CURDIR}/${BINUTIL_ARCH})
33207753SmmCFLAGS+=	-I${.CURDIR}/${BINUTIL_ARCH}
34207753Smm.endif
35207753SmmCFLAGS+=	-I${.CURDIR}
36207753SmmCFLAGS+=	-I${.CURDIR}/${RELTOP}/libbfd/${BINUTIL_ARCH}
37207753SmmCFLAGS+=	-I${SRCDIR}/include
38207753Smm
39207753Smm.if exists(${.CURDIR}/${BINUTIL_ARCH})
40207753Smm.PATH: ${.CURDIR}/${BINUTIL_ARCH}
41207753Smm.endif
42207753Smm
43207753SmmARCHS=		${BINUTIL_ARCH}
44207753Smm
45207753Smm.for _arch in ${CROSS_ARCH}
46207753Smm.if (${ARCHS:R:M${_arch:R}} == "")
47207753SmmARCHS+=$(_arch)
48207753Smm.endif
49207753Smm.endfor
50207753Smm
51207753Smm.for _arch in ${ARCHS}
52207753Smm.if exists(${.CURDIR}/Makefile.${_arch})
53207753Smm.include "${.CURDIR}/Makefile.${_arch}"
54207753Smm.endif
55207753Smm.endfor
56207753Smm