Makefile.inc0 revision 84947
1178825Sdfr# $FreeBSD: head/gnu/usr.bin/binutils/Makefile.inc0 84947 2001-10-15 01:18:51Z obrien $
2233294Sstas#
3233294Sstas# This is included explicitly at the top of each sub-Makefile.  We can't
4233294Sstas# use the normal "Makefile.inc" mechanism, because we need some of these
5178825Sdfr# definitions before the sub-Makefile is processed.
6233294Sstas
7233294SstasVERSION=	"2.11.2 20010719 [FreeBSD]"
8233294Sstas
9178825SdfrTARGET_ARCH?=	${MACHINE_ARCH}
10233294SstasBINUTIL_ARCH= ${TARGET_ARCH}
11233294Sstas
12178825Sdfr# RELTOP is the relative path to this point in the source or object
13233294Sstas# tree, from any subdirectory of same.  It gets extra "../" prefixes
14233294Sstas# added to it as we descend into subdirectories.
15233294SstasRELTOP:= ..
16178825Sdfr
17233294SstasRELSRC=	${RELTOP}/../../../contrib/binutils
18233294SstasSRCDIR=	${.CURDIR}/${RELSRC}
19233294Sstas
20178825SdfrCFLAGS+= -D_GNU_SOURCE
21233294Sstas
22233294Sstas# We use "-I-" because without it our yacc-generated parser tries to
23233294Sstas# use GNU's bison-generated header files.
24233294SstasCFLAGS+= -I- -I.
25233294Sstas.if exists(${.CURDIR}/${BINUTIL_ARCH})
26233294SstasCFLAGS+= -I${.CURDIR}/${BINUTIL_ARCH}
27233294Sstas.endif
28233294SstasCFLAGS+= -I${.CURDIR}
29233294SstasCFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd/${BINUTIL_ARCH}
30233294SstasCFLAGS+= -I${SRCDIR}/include
31233294Sstas
32178825Sdfr.if exists(${.CURDIR}/${BINUTIL_ARCH})
33178825Sdfr.PATH: ${.CURDIR}/${BINUTIL_ARCH}
34233294Sstas.endif
35178825Sdfr
36233294SstasARCHS=	${BINUTIL_ARCH}
37178825Sdfr
38178825Sdfr.for _arch in ${CROSS_ARCH}
39178825Sdfr.if (${ARCHS:R:M${_arch:R}} == "")
40178825SdfrARCHS+= $(_arch)
41178825Sdfr.endif
42178825Sdfr.endfor
43178825Sdfr
44178825Sdfr.for _arch in ${ARCHS}
45178825Sdfr.if exists(${.CURDIR}/Makefile.${_arch})
46178825Sdfr.include "${.CURDIR}/Makefile.${_arch}"
47178825Sdfr.endif
48178825Sdfr.endfor
49178825Sdfr