summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/binutils/Makefile.inc0
blob: 46160c5e29d5a65037f32a8ce1192d8891446ff9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
# $FreeBSD$
#

#
# This is included explicitly at the top of each sub-Makefile.  We can't
# use the normal "Makefile.inc" mechanism, because we need some of these
# definitions before the sub-Makefile is processed.
#

VERSION=	2.10.0
TARGET_ARCH?=	${MACHINE_ARCH}

.if ${TARGET_ARCH} == "mipsel" || ${TARGET_ARCH} == "mipseb"
BINUTIL_ARCH=mips
.else
BINUTIL_ARCH=${TARGET_ARCH}
.endif

# RELTOP is the relative path to this point in the source or object
# tree, from any subdirectory of same.  It gets extra "../" prefixes
# added to it as we descend into subdirectories.
RELTOP:=	..

RELSRC=		${RELTOP}/../../../contrib/binutils
SRCDIR=		${.CURDIR}/${RELSRC}

CFLAGS+=	-D_GNU_SOURCE

# We use "-I-" because without it our yacc-generated parser tries to
# use GNU's bison-generated header files.
CFLAGS+=	-I- -I.
.if exists(${.CURDIR}/${BINUTIL_ARCH})
CFLAGS+=	-I${.CURDIR}/${BINUTIL_ARCH}
.endif
CFLAGS+=	-I${.CURDIR}
CFLAGS+=	-I${.CURDIR}/${RELTOP}/libbfd/${BINUTIL_ARCH}
CFLAGS+=	-I${SRCDIR}/include

.if exists(${.CURDIR}/${BINUTIL_ARCH})
.PATH: ${.CURDIR}/${BINUTIL_ARCH}
.endif

ARCHS=		${BINUTIL_ARCH}

.for _arch in ${CROSS_ARCH}
.if (${ARCHS:R:M${_arch:R}} == "")
ARCHS+=$(_arch)
.endif
.endfor

.for _arch in ${ARCHS}
.if exists(${.CURDIR}/Makefile.${_arch})
.include "${.CURDIR}/Makefile.${_arch}"
.endif
.endfor
OpenPOWER on IntegriCloud