42 lines
973 B
Makefile
42 lines
973 B
Makefile
# $NetBSD: Makefile.prog,v 1.1 2001/08/06 19:12:01 tv Exp $
|
|
#
|
|
# Common Makefile fragment for a binutils program.
|
|
#
|
|
|
|
.include <bsd.own.mk>
|
|
TOP= ${.CURDIR}/../../..
|
|
DIST= ${TOP}/dist/toolchain
|
|
|
|
.include "${.CURDIR}/../common/arch/${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/${MACHINE_ARCH}
|
|
|
|
LDADD= -lintl
|
|
DPADD= ${LIBINTL}
|
|
|
|
.if !empty(G_${BUPROG}_DEPENDENCIES:M*/libbfd*)
|
|
BFDOBJ!= cd ${TOP}/lib/libbfd && ${PRINTOBJDIR}
|
|
LDADD+= -L${BFDOBJ} -lbfd
|
|
DPADD+= ${BFDOBJ}/libbfd_pic.a
|
|
.endif
|
|
|
|
.if !empty(G_${BUPROG}_DEPENDENCIES:M*/libiberty*)
|
|
IBERTYOBJ!= cd ${TOP}/lib/libiberty && ${PRINTOBJDIR}
|
|
LDADD+= -L${IBERTYOBJ} -liberty
|
|
DPADD+= ${IBERTYOBJ}/libiberty.a
|
|
.endif
|
|
|
|
.y.c .l.c:
|
|
|
|
.PATH: ${DIST}/binutils
|
|
|
|
.include <bsd.prog.mk>
|