xref: /freebsd/contrib/elftoolchain/ar/Makefile (revision 3fe401a500cdfc73d8c066da3c577c4b9f0aa953)
1*3fe401a5SEd Maste# $Id: Makefile 3107 2014-12-20 08:31:58Z kaiwang27 $
2*3fe401a5SEd Maste
3*3fe401a5SEd MasteTOP=	..
4*3fe401a5SEd Maste
5*3fe401a5SEd MastePROG=	ar
6*3fe401a5SEd MasteSRCS=	ar.c read.c util.c write.c
7*3fe401a5SEd MasteLSRC=	acplex.l
8*3fe401a5SEd MasteYSRC=	acpyacc.y
9*3fe401a5SEd Maste
10*3fe401a5SEd MasteWARNS?=	5
11*3fe401a5SEd Maste
12*3fe401a5SEd MasteDPADD=	${LIBARCHIVE} ${LIBELFTC} ${LIBELF} ${LIBZ}
13*3fe401a5SEd MasteLDADD=	-larchive -lelftc -lelf -lz
14*3fe401a5SEd Maste
15*3fe401a5SEd MasteCFLAGS+=-I. -I${.CURDIR}
16*3fe401a5SEd Maste
17*3fe401a5SEd MasteLINKS=	${BINDIR}/ar ${BINDIR}/ranlib
18*3fe401a5SEd Maste
19*3fe401a5SEd MasteEXTRA_TARGETS=	ranlib
20*3fe401a5SEd Maste
21*3fe401a5SEd MasteCLEANFILES+= 	${EXTRA_TARGETS}
22*3fe401a5SEd Maste
23*3fe401a5SEd MasteMAN=	ar.1 ranlib.1 ar.5
24*3fe401a5SEd Maste
25*3fe401a5SEd Masteall:	${EXTRA_TARGETS}
26*3fe401a5SEd Maste
27*3fe401a5SEd Maste${EXTRA_TARGETS}:	${PROG}
28*3fe401a5SEd Maste	ln -s ${PROG} ${.TARGET}
29*3fe401a5SEd Maste
30*3fe401a5SEd Maste.include "${TOP}/mk/elftoolchain.prog.mk"
31*3fe401a5SEd Maste
32*3fe401a5SEd Maste.if ${OS_HOST} == "OpenBSD"
33*3fe401a5SEd MasteCFLAGS+=	-I/usr/local/include
34*3fe401a5SEd MasteLDFLAGS+=	-L/usr/local/lib
35*3fe401a5SEd Maste.endif
36