NetBSD/gnu/usr.sbin/mdsetimage/Makefile

45 lines
1.1 KiB
Makefile

# $NetBSD: Makefile,v 1.18 2004/01/03 14:04:27 lukem Exp $
.include <bsd.own.mk>
.if (defined(HOSTPROG) && \
(${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))) || \
${MKBFD} != "no"
TOP= ${NETBSDSRCDIR}/gnu
DIST= ${TOP}/dist/binutils
BFDSUBDIR= lib
PROG= mdsetimage
MAN= mdsetimage.8
CPPFLAGS+= -I${BFDDIR} -I${DIST}/bfd -I${DIST}/binutils -I${DIST}/include
# XXX GCC3/m68010 fails to compile mdsetimage.c
.if ${MACHINE_ARCH} == "m68000"
COPTS.mdsetimage.c= -O0
.endif
.if !defined(HOSTPROG) && ${MKPICLIB} != "no"
DPADD+= ${BFDDIR}/libbfd_pic.a
.else
DPADD+= ${BFDDIR}/libbfd.a
.endif
LDADD+= -L${BFDDIR} -lbfd
DPADD+= ${IBERTYDIR}/libiberty.a
LDADD+= -L${IBERTYDIR} -liberty
.ifndef HOSTPROG
.include "${TOP}/${BFDSUBDIR}/libbfd/arch/${MACHINE_ARCH}/defs.mk"
BFDDIR!= cd ${TOP}/${BFDSUBDIR}/libbfd && ${PRINTOBJDIR}
IBERTYDIR!= cd ${TOP}/${BFDSUBDIR}/libiberty && ${PRINTOBJDIR}
CPPFLAGS+= -I${TOP}/${BFDSUBDIR}/libbfd/arch/${MACHINE_ARCH} ${G_INCLUDES}
LDADD+= -lintl
DPADD+= ${LIBINTL}
.endif # HOSTPROG
.endif # MKBFD != no
.include <bsd.prog.mk>