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.
5 TARGET_ARCH?= ${MACHINE_ARCH}
6 BINUTIL_ARCH= ${TARGET_ARCH}
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.
13 RELSRC= ${RELTOP}/../../../contrib/binutils-2.21
14 SRCDIR= ${.CURDIR}/${RELSRC}
17 .if exists(${.CURDIR}/${BINUTIL_ARCH})
18 CFLAGS+= -I${.CURDIR}/${BINUTIL_ARCH}
21 CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd/${BINUTIL_ARCH}
22 CFLAGS+= -I${SRCDIR}/include
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
34 .if exists(${.CURDIR}/${BINUTIL_ARCH})
35 .PATH: ${.CURDIR}/${BINUTIL_ARCH}
38 ARCHS= ${BINUTIL_ARCH}
40 .for _arch in ${CROSS_ARCH}
41 .if (${ARCHS:R:M${_arch:R}} == "")
46 .for _arch in ${ARCHS}
47 .if exists(${.CURDIR}/Makefile.${_arch})
48 .include "${.CURDIR}/Makefile.${_arch}"