Makefile.prog revision 1.5 1 # $NetBSD: Makefile.prog,v 1.5 2013/02/14 03:36:44 christos Exp $
2 #
3 # Common Makefile fragment for a binutils program.
4 #
5
6 .include <bsd.own.mk>
7
8 TOP= ${NETBSDSRCDIR}/external/gpl3/binutils
9
10 .include "${.CURDIR}/../common/Makefile.inc"
11 .include "${.CURDIR}/../common/arch/${MACHINE_ARCH}/defs.mk"
12
13 # Might end in "-new" in GNU makefile
14 XPROG= ${PROG:c++filt=cxxfilt}
15 BUPROG= ${G_PROGRAMS:M${XPROG}*:S/-/_/}
16
17 SRCS= ${G_${BUPROG}_OBJECTS:.o=.c} \
18 ${G_${BUPROG}_DEPENDENCIES:M*.o:.o=.c}
19 MAN= ${G_man_MANS:M${PROG}.1}
20
21 CPPFLAGS+= -I${.CURDIR}/../common/arch/${MACHINE_ARCH}
22
23 LDADD+= -lintl
24 DPADD+= ${LIBINTL}
25
26 .if !empty(G_${BUPROG}_DEPENDENCIES:M*/libopcodes*)
27 PROGDPLIBS+= opcodes ${TOP}/${BFDSUBDIR}/libopcodes
28 .endif
29
30 .if !empty(G_${BUPROG}_DEPENDENCIES:M*/libbfd*)
31 PROGDPLIBS+= bfd ${TOP}/${BFDSUBDIR}/libbfd
32 .endif
33
34 .if !empty(G_${BUPROG}_DEPENDENCIES:M*/libiberty*)
35 PROGDPLIBS+= iberty ${TOP}/${BFDSUBDIR}/libiberty
36 .endif
37
38 .PATH: ${DIST}/binutils ${DIST}/binutils/doc
39
40 .include <bsd.prog.mk>
41
42 # Override the .y.c and .y.l rules *after* <bsd.prog.mk>
43 .y.c .l.c:
44