Initial import of binutils 2.22 on the new vendor branch
[dragonfly.git] / gnu / usr.bin / binutils220 / Makefile.inc0
1 # This is included explicitly at the top of each sub-Makefile.  We can't
2 # use the normal "Makefile.inc" mechanism, because we need some of these
3 # definitions before the sub-Makefile is processed.
4
5 TARGET_ARCH?=   ${MACHINE_ARCH}
6 BINUTIL_ARCH=   ${TARGET_ARCH}
7
8 # RELTOP is the relative path to this point in the source or object
9 # tree, from any subdirectory of same.  It gets extra "../" prefixes
10 # added to it as we descend into subdirectories.
11 RELTOP:= ..
12
13 RELSRC= ${RELTOP}/../../../contrib/binutils-2.20
14 SRCDIR= ${.CURDIR}/${RELSRC}
15
16 CFLAGS+= -I.
17 .if exists(${.CURDIR}/${BINUTIL_ARCH})
18 CFLAGS+= -I${.CURDIR}/${BINUTIL_ARCH}
19 .endif
20 CFLAGS+= -I${.CURDIR}
21 CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd/${BINUTIL_ARCH}
22 CFLAGS+= -I${SRCDIR}/include
23
24 DPADD=  ${RELTOP}/libbinutils/libbinutils.a
25 LDADD=  ${RELTOP}/libbinutils/libbinutils.a
26 DPADD+= ${RELTOP}/libbfd/libbfd.a
27 LDADD+= ${RELTOP}/libbfd/libbfd.a
28 DPADD+= ${RELTOP}/libiberty/libiberty.a
29 LDADD+= ${RELTOP}/libiberty/libiberty.a
30
31 DPADD+= ${LIBZ}
32 LDADD+= -lz
33
34 .if exists(${.CURDIR}/${BINUTIL_ARCH})
35 .PATH: ${.CURDIR}/${BINUTIL_ARCH}
36 .endif
37
38 ARCHS=  ${BINUTIL_ARCH}
39
40 .for _arch in ${CROSS_ARCH}
41 .if (${ARCHS:R:M${_arch:R}} == "")
42 ARCHS+= $(_arch)
43 .endif
44 .endfor
45
46 .for _arch in ${ARCHS}
47 .if exists(${.CURDIR}/Makefile.${_arch})
48 .include "${.CURDIR}/Makefile.${_arch}"
49 .endif
50 .endfor