2014-02-17 16:55:07 +01:00
|
|
|
# $NetBSD: Makefile,v 1.11 2013/09/29 14:20:38 christos Exp $
|
2012-06-06 15:06:52 +02:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
.if (defined(HOSTPROG) && \
|
|
|
|
(${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))) || \
|
|
|
|
${MKBINUTILS} != "no"
|
|
|
|
TOP= ${NETBSDSRCDIR}/external/gpl3/binutils
|
|
|
|
DIST= ${TOP}/dist
|
|
|
|
BFDSUBDIR= lib
|
|
|
|
|
|
|
|
PROG= dbsym
|
|
|
|
MAN= dbsym.8
|
|
|
|
|
2014-02-17 16:55:07 +01:00
|
|
|
CPPFLAGS+= -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include
|
2012-06-06 15:06:52 +02:00
|
|
|
|
2014-02-17 16:55:07 +01:00
|
|
|
.if !defined(HOSTPROG)
|
|
|
|
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
|
|
|
|
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
|
2012-06-06 15:06:52 +02:00
|
|
|
.else
|
2014-02-17 16:55:07 +01:00
|
|
|
CPPFLAGS+= -I${BFDDIR}
|
2012-06-06 15:06:52 +02:00
|
|
|
DPADD+= ${BFDDIR}/libbfd.a
|
|
|
|
LDADD+= -L${BFDDIR} -lbfd
|
|
|
|
DPADD+= ${IBERTYDIR}/libiberty.a
|
|
|
|
LDADD+= -L${IBERTYDIR} -liberty
|
2014-02-17 16:55:07 +01:00
|
|
|
.endif
|
2012-06-06 15:06:52 +02:00
|
|
|
|
2014-02-17 16:55:07 +01:00
|
|
|
.include <bsd.prog.mk>
|
2012-06-06 15:06:52 +02:00
|
|
|
|
2014-02-17 16:55:07 +01:00
|
|
|
.ifndef HOSTPROG
|
|
|
|
.include "${TOP}/${BFDSUBDIR}/libbfd/arch/${BINUTILS_MACHINE_ARCH}/defs.mk"
|
|
|
|
CPPFLAGS+= -I${TOP}/${BFDSUBDIR}/libbfd/arch/${BINUTILS_MACHINE_ARCH} ${G_INCLUDES}
|
2012-06-06 15:06:52 +02:00
|
|
|
LDADD+= -lintl
|
|
|
|
DPADD+= ${LIBINTL}
|
|
|
|
.endif # HOSTPROG
|
|
|
|
|
2014-02-17 16:55:07 +01:00
|
|
|
LDADD+= -lz
|
|
|
|
# No DPADD because we don't know the format and we didn't build it.
|
|
|
|
|
|
|
|
.endif # MKBINUTILS != no
|