]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - gnu/usr.bin/binutils/Makefile.inc0
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / gnu / usr.bin / binutils / Makefile.inc0
1 # $FreeBSD$
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
7 VERSION=        "2.15 [FreeBSD] 2004-05-23"
8
9 TARGET_ARCH?=   ${MACHINE_ARCH}
10 .if ${TARGET_ARCH} == "amd64"
11 BINUTILS_ARCH=x86_64
12 .else
13 BINUTILS_ARCH=${TARGET_ARCH}
14 .endif
15 TARGET_TUPLE?=  ${BINUTILS_ARCH}-obrien-freebsd
16
17 # RELTOP is the relative path to this point in the source or object
18 # tree, from any subdirectory of same.  It gets extra "../" prefixes
19 # added to it as we descend into subdirectories.
20 RELTOP:= ..
21
22 RELSRC= ${RELTOP}/../../../contrib/binutils
23 SRCDIR= ${.CURDIR}/${RELSRC}
24
25 .if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "powerpc"
26 CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32
27 .else
28 CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64
29 .endif
30
31 CFLAGS+= -I.
32 .if exists(${.CURDIR}/${TARGET_ARCH})
33 CFLAGS+= -I${.CURDIR}/${TARGET_ARCH}
34 .endif
35 CFLAGS+= -I${.CURDIR}
36 CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd
37 CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd
38 CFLAGS+= -I${SRCDIR}/include
39
40 .if exists(${.CURDIR}/${TARGET_ARCH})
41 .PATH: ${.CURDIR}/${TARGET_ARCH}
42 .endif
43
44 ARCHS=  ${TARGET_ARCH}
45
46 .for _arch in ${CROSS_ARCH}
47 .if (${ARCHS:R:M${_arch:R}} == "")
48 ARCHS+= $(_arch)
49 .endif
50 .endfor
51
52 .for _arch in ${ARCHS}
53 .if exists(${.CURDIR}/Makefile.${_arch})
54 .include "${.CURDIR}/Makefile.${_arch}"
55 .endif
56 .endfor