coverity appeasement - redundant check
[minix.git] / external / gpl3 / binutils / usr.bin / common / Makefile.prog
blob2450b91b0fea4d014c33c37d8745c4ac27170a5b
1 #       $NetBSD: Makefile.prog,v 1.1 2009/08/18 20:22:08 skrll Exp $
3 # Common Makefile fragment for a binutils program.
6 .include <bsd.own.mk>
8 TOP=            ${NETBSDSRCDIR}/external/gpl3/binutils
10 .include "${.CURDIR}/../common/Makefile.inc"
11 .include "${.CURDIR}/../common/arch/${MACHINE_ARCH}/defs.mk"
13 # Might end in "-new" in GNU makefile
14 XPROG=          ${PROG:c++filt=cxxfilt}
15 BUPROG=         ${G_PROGRAMS:M${XPROG}*:S/-/_/}
17 SRCS=           ${G_${BUPROG}_OBJECTS:.o=.c} \
18                 ${G_${BUPROG}_DEPENDENCIES:M*.o:.o=.c}
19 MAN=            ${G_man_MANS:M${PROG}.1}
21 CPPFLAGS+=      -I${.CURDIR}/../common/arch/${MACHINE_ARCH}
23 LDADD+=         -lintl
24 DPADD+=         ${LIBINTL}
26 .if !empty(G_${BUPROG}_DEPENDENCIES:M*/libopcodes*)
27 OPCODESOBJ!=    cd ${TOP}/${BFDSUBDIR}/libopcodes && ${PRINTOBJDIR}
28 LDADD+=         -L${OPCODESOBJ} -lopcodes
29 .if ${MKPICLIB} != "no"
30 DPADD+=         ${OPCODESOBJ}/libopcodes_pic.a
31 .else
32 DPADD+=         ${OPCODESOBJ}/libopcodes.a
33 .endif
34 .endif
36 .if !empty(G_${BUPROG}_DEPENDENCIES:M*/libbfd*)
37 BFDOBJ!=        cd ${TOP}/${BFDSUBDIR}/libbfd && ${PRINTOBJDIR}
38 LDADD+=         -L${BFDOBJ} -lbfd
39 .if ${MKPICLIB} != "no"
40 DPADD+=         ${BFDOBJ}/libbfd_pic.a
41 .else
42 DPADD+=         ${BFDOBJ}/libbfd.a
43 .endif
44 .endif
46 .if !empty(G_${BUPROG}_DEPENDENCIES:M*/libiberty*)
47 IBERTYOBJ!=     cd ${TOP}/${BFDSUBDIR}/libiberty && ${PRINTOBJDIR}
48 LDADD+=         -L${IBERTYOBJ} -liberty
49 DPADD+=         ${IBERTYOBJ}/libiberty.a
50 .endif
52 .PATH: ${DIST}/binutils ${DIST}/binutils/doc
54 .include <bsd.prog.mk>
56 # Override the .y.c and .y.l rules *after* <bsd.prog.mk>
57 .y.c .l.c: