]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - gnu/usr.bin/binutils/Makefile.inc0
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.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.17.50 [FreeBSD] 2007-07-03"
8
9 .if defined(TARGET_ARCH)
10 TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/}
11 .else
12 TARGET_CPUARCH=${MACHINE_CPUARCH}
13 .endif
14 TARGET_ARCH?=   ${MACHINE_ARCH}
15 TARGET_VENDOR?= unknown
16 TARGET_OS?=     freebsd
17 BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/}
18 TARGET_TUPLE?=  ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS}
19 .if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || \
20         (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el} == "")
21 TARGET_BIG_ENDIAN=t
22 .endif
23
24 # RELTOP is the relative path to this point in the source or object
25 # tree, from any subdirectory of same.  It gets extra "../" prefixes
26 # added to it as we descend into subdirectories.
27 RELTOP:= ..
28
29 RELSRC= ${RELTOP}/../../../contrib/binutils
30 SRCDIR= ${.CURDIR}/${RELSRC}
31
32 .if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \
33         ${TARGET_ARCH} == "powerpc" || \
34         (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips64*} == "")
35 CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32
36 .else
37 CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64
38 .endif
39
40 CFLAGS+= -I.
41 CFLAGS+= -I${.CURDIR}
42 CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd
43 CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd
44 CFLAGS+= -I${SRCDIR}/include
45
46 ARCHS=  ${TARGET_CPUARCH}
47
48 .if exists(${.CURDIR}/Makefile.${TARGET_ARCH})
49 .include "${.CURDIR}/Makefile.${TARGET_ARCH}"
50 .elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH})
51 .include "${.CURDIR}/Makefile.${TARGET_CPUARCH}"
52 .endif