1 1.1 christos # $NetBSD: Makefile,v 1.1 2016/01/26 17:27:00 christos Exp $ 2 1.1 christos 3 1.1 christos .include <bsd.own.mk> 4 1.1 christos 5 1.1 christos .if (defined(HOSTPROG) && \ 6 1.1 christos (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))) || \ 7 1.1 christos ${MKBINUTILS} != "no" 8 1.1 christos TOP= ${NETBSDSRCDIR}/external/gpl3/binutils 9 1.1 christos DIST= ${TOP}/dist 10 1.1 christos BFDSUBDIR= lib 11 1.1 christos 12 1.1 christos PROG= mdsetimage 13 1.1 christos MAN= mdsetimage.8 14 1.1 christos 15 1.1 christos CPPFLAGS+= -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include 16 1.1 christos 17 1.1 christos .if !defined(HOSTPROG) 18 1.1 christos PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd 19 1.1 christos PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty 20 1.1 christos .else 21 1.1 christos DPADD+= ${BFDDIR}/libbfd.a 22 1.1 christos LDADD+= -L${BFDDIR} -lbfd 23 1.1 christos DPADD+= ${IBERTYDIR}/libiberty.a 24 1.1 christos LDADD+= -L${IBERTYDIR} -liberty 25 1.1 christos CPPFLAGS+= -I${BFDDIR} 26 1.1 christos .endif 27 1.1 christos 28 1.1 christos .include <bsd.prog.mk> 29 1.1 christos 30 1.1 christos .ifndef HOSTPROG 31 1.1 christos .include "${TOP}/${BFDSUBDIR}/libbfd/arch/${BINUTILS_MACHINE_ARCH}/defs.mk" 32 1.1 christos 33 1.1 christos CPPFLAGS+= -I${TOP}/${BFDSUBDIR}/libbfd/arch/${BINUTILS_MACHINE_ARCH} ${G_INCLUDES} 34 1.1 christos LDADD+= -lintl 35 1.1 christos DPADD+= ${LIBINTL} 36 1.1 christos DPADD+= ${LIBZ} 37 1.1 christos .endif # HOSTPROG 38 1.1 christos 39 1.1 christos LDADD+= -lz 40 1.1 christos # No DPADD because we don't know the format and we didn't build it. 41 1.1 christos 42 1.1 christos .endif # MKBINUTILS != no 43