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