Initial import from FreeBSD RELENG_4:
[dragonfly.git] / gnu / usr.bin / binutils / Makefile.inc0
1 # $FreeBSD: src/gnu/usr.bin/binutils/Makefile.inc0,v 1.9.2.4 2002/09/01 23:39:12 obrien Exp $
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.12.1 [FreeBSD] 2002-07-20"
8 VERSION_DATE=   20020720
9
10 TARGET_ARCH?=   ${MACHINE_ARCH}
11 BINUTIL_ARCH=   ${TARGET_ARCH}
12
13 # RELTOP is the relative path to this point in the source or object
14 # tree, from any subdirectory of same.  It gets extra "../" prefixes
15 # added to it as we descend into subdirectories.
16 RELTOP:= ..
17
18 RELSRC= ${RELTOP}/../../../contrib/binutils
19 SRCDIR= ${.CURDIR}/${RELSRC}
20
21 .if (${TARGET_ARCH} == "alpha")
22 WARNS=  2
23 .endif
24 CFLAGS+= -D_GNU_SOURCE
25 CFLAGS+= -I.
26 .if exists(${.CURDIR}/${BINUTIL_ARCH})
27 CFLAGS+= -I${.CURDIR}/${BINUTIL_ARCH}
28 .endif
29 CFLAGS+= -I${.CURDIR}
30 CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd/${BINUTIL_ARCH}
31 CFLAGS+= -I${SRCDIR}/include
32
33 .if exists(${.CURDIR}/${BINUTIL_ARCH})
34 .PATH: ${.CURDIR}/${BINUTIL_ARCH}
35 .endif
36
37 ARCHS=  ${BINUTIL_ARCH}
38
39 .for _arch in ${CROSS_ARCH}
40 .if (${ARCHS:R:M${_arch:R}} == "")
41 ARCHS+= $(_arch)
42 .endif
43 .endfor
44
45 .for _arch in ${ARCHS}
46 .if exists(${.CURDIR}/Makefile.${_arch})
47 .include "${.CURDIR}/Makefile.${_arch}"
48 .endif
49 .endfor