c9ea9e7af8
Change-Id: I5235984746178ee30b5db18e7def0016d9a0e36f
42 lines
1 KiB
Makefile
42 lines
1 KiB
Makefile
# $NetBSD: Makefile,v 1.10 2013/08/05 00:17:53 matt Exp $
|
|
|
|
.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= mdsetimage
|
|
MAN= mdsetimage.8
|
|
|
|
CPPFLAGS+= -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include
|
|
|
|
.if !defined(HOSTPROG)
|
|
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
|
|
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
|
|
.else
|
|
DPADD+= ${BFDDIR}/libbfd.a
|
|
LDADD+= -L${BFDDIR} -lbfd
|
|
DPADD+= ${IBERTYDIR}/libiberty.a
|
|
LDADD+= -L${IBERTYDIR} -liberty
|
|
CPPFLAGS+= -I${BFDDIR}
|
|
.endif
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
.ifndef HOSTPROG
|
|
.include "${TOP}/${BFDSUBDIR}/libbfd/arch/${BINUTILS_MACHINE_ARCH}/defs.mk"
|
|
|
|
CPPFLAGS+= -I${TOP}/${BFDSUBDIR}/libbfd/arch/${BINUTILS_MACHINE_ARCH} ${G_INCLUDES}
|
|
LDADD+= -lintl
|
|
DPADD+= ${LIBINTL}
|
|
DPADD+= ${LIBZ}
|
|
.endif # HOSTPROG
|
|
|
|
LDADD+= -lz
|
|
# No DPADD because we don't know the format and we didn't build it.
|
|
|
|
.endif # MKBINUTILS != no
|