1.include "../../Makefile.inc1"
2.include "../Makefile.block2"
3
4.PATH: ${SRCDIR}/binutils ${SRCDIR}/binutils/doc
5
6PROG=	ar
7SRCS=	ar.c not-ranlib.c arsup.c rename.c binemul.c emul_vanilla.c \
8	arparse.y arlex.l
9MFILE=	ar${MANPAGEVER}.1
10MAN=	${MFILE}
11DPADD=	${LIBL} ${LIBZ}
12LDADD=	${STD_LDADD} -ll -lz
13
14CFLAGS+=	-I${SRCDIR}/binutils \
15		-Dbin_dummy_emulation=bin_vanilla_emulation
16
17# link-time optimization requires dlopen() which means ar cannot be built
18# statically and also support -plugin, not even for cross-tools.
19.if !defined(REALLY_NOSHARED)
20.undef NOSHARED
21.endif
22
23${MFILE}: ${SRCDIR}/binutils/doc/ar.1
24	cp ${.ALLSRC} ${.TARGET}
25
26CLEANFILES+=	${MFILE}
27
28.if defined(IS_PRIMARY)
29MLINKS+=	${MFILE} ar.1
30.endif
31
32.include <bsd.prog.mk>
33