xref: /freebsd/contrib/elftoolchain/ar/Makefile (revision 715d1396d6233158b94e85414b57520ee3e536cc)
1*715d1396SEd Maste# $Id: Makefile 3608 2018-04-14 21:23:04Z jkoshy $
23fe401a5SEd Maste
33fe401a5SEd MasteTOP=	..
43fe401a5SEd Maste
53fe401a5SEd MastePROG=	ar
63fe401a5SEd MasteSRCS=	ar.c read.c util.c write.c
73fe401a5SEd MasteLSRC=	acplex.l
83fe401a5SEd MasteYSRC=	acpyacc.y
93fe401a5SEd Maste
103fe401a5SEd MasteWARNS?=	5
113fe401a5SEd Maste
123fe401a5SEd MasteDPADD=	${LIBARCHIVE} ${LIBELFTC} ${LIBELF} ${LIBZ}
133fe401a5SEd MasteLDADD=	-larchive -lelftc -lelf -lz
143fe401a5SEd Maste
153fe401a5SEd MasteCFLAGS+=-I. -I${.CURDIR}
163fe401a5SEd Maste
173fe401a5SEd MasteLINKS=	${BINDIR}/ar ${BINDIR}/ranlib
183fe401a5SEd Maste
193fe401a5SEd MasteEXTRA_TARGETS=	ranlib
203fe401a5SEd Maste
213fe401a5SEd MasteCLEANFILES+= 	${EXTRA_TARGETS}
223fe401a5SEd Maste
233fe401a5SEd MasteMAN=	ar.1 ranlib.1 ar.5
243fe401a5SEd Maste
253fe401a5SEd Masteall:	${EXTRA_TARGETS}
263fe401a5SEd Maste
273fe401a5SEd Maste${EXTRA_TARGETS}:	${PROG}
283fe401a5SEd Maste	ln -s ${PROG} ${.TARGET}
293fe401a5SEd Maste
303fe401a5SEd Maste.include "${TOP}/mk/elftoolchain.prog.mk"
313fe401a5SEd Maste
323fe401a5SEd Maste.if ${OS_HOST} == "OpenBSD"
333fe401a5SEd MasteCFLAGS+=	-I/usr/local/include
343fe401a5SEd MasteLDFLAGS+=	-L/usr/local/lib
35*715d1396SEd Maste.elif ${OS_HOST} == "DragonFly"
36*715d1396SEd MasteLDADD+=	-lbz2
373fe401a5SEd Maste.endif
38