894dd16613203fb561206e8a3060e8afc4059586
[dragonfly.git] / gnu / usr.bin / binutils224 / 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.21
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${SRCDIR}/include
22
23 DPADD=  ${RELTOP}/libbinutils/libbinutils.a
24 LDADD=  ${RELTOP}/libbinutils/libbinutils.a
25 DPADD+= ${RELTOP}/libbfd/libbfd.a
26 LDADD+= ${RELTOP}/libbfd/libbfd.a
27 DPADD+= ${RELTOP}/libiberty/libiberty.a
28 LDADD+= ${RELTOP}/libiberty/libiberty.a
29
30 DPADD+= ${LIBZ}
31 LDADD+= -lz
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