c9ea9e7af8
Change-Id: I5235984746178ee30b5db18e7def0016d9a0e36f
50 lines
1.2 KiB
Text
50 lines
1.2 KiB
Text
# $NetBSD: Makefile.prog,v 1.9 2013/08/06 05:35:57 matt Exp $
|
|
#
|
|
# Common Makefile fragment for a binutils program.
|
|
#
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
BINUTILS_MACHINE_ARCH=${MACHINE_ARCH:C/armv[4-7]/arm/}
|
|
|
|
TOP= ${NETBSDSRCDIR}/external/gpl3/binutils
|
|
|
|
.include "${.CURDIR}/../common/Makefile.inc"
|
|
.include "${.CURDIR}/../common/arch/${BINUTILS_MACHINE_ARCH}/defs.mk"
|
|
|
|
# Might end in "-new" in GNU makefile
|
|
XPROG= ${PROG:c++filt=cxxfilt}
|
|
BUPROG= ${G_PROGRAMS:M${XPROG}*:S/-/_/}
|
|
|
|
SRCS= ${G_${BUPROG}_OBJECTS:.o=.c} \
|
|
${G_${BUPROG}_DEPENDENCIES:M*.o:.o=.c}
|
|
MAN= ${G_man_MANS:M${PROG}.1}
|
|
|
|
CPPFLAGS+= -I${.CURDIR}/../common/arch/${BINUTILS_MACHINE_ARCH}
|
|
|
|
.if !empty(G_${BUPROG}_DEPENDENCIES:M*/libopcodes*)
|
|
PROGDPLIBS+= opcodes ${TOP}/${BFDSUBDIR}/libopcodes
|
|
.endif
|
|
|
|
.if !empty(G_${BUPROG}_DEPENDENCIES:M*/libbfd*)
|
|
PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
|
|
.endif
|
|
|
|
.if !empty(G_${BUPROG}_DEPENDENCIES:M*/libiberty*)
|
|
PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
|
|
.endif
|
|
|
|
.PATH: ${DIST}/binutils ${DIST}/binutils/doc
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
.if !defined(__MINIX)
|
|
LDADD+= -lintl -lz -lm
|
|
DPADD+= ${LIBINTL} ${LIBZ} ${LIBM}
|
|
.else
|
|
LDADD+= -lz -lm
|
|
DPADD+= ${LIBZ} ${LIBM}
|
|
.endif # !defined(__MINIX)
|
|
|
|
# Override the .y.c and .y.l rules *after* <bsd.prog.mk>
|
|
.y.c .l.c:
|