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