1# $Id: Makefile 3107 2014-12-20 08:31:58Z kaiwang27 $ 2 3TOP= .. 4 5PROG= ar 6SRCS= ar.c read.c util.c write.c 7LSRC= acplex.l 8YSRC= acpyacc.y 9 10WARNS?= 5 11 12DPADD= ${LIBARCHIVE} ${LIBELFTC} ${LIBELF} ${LIBZ} 13LDADD= -larchive -lelftc -lelf -lz 14 15CFLAGS+=-I. -I${.CURDIR} 16 17LINKS= ${BINDIR}/ar ${BINDIR}/ranlib 18 19EXTRA_TARGETS= ranlib 20 21CLEANFILES+= ${EXTRA_TARGETS} 22 23MAN= ar.1 ranlib.1 ar.5 24 25all: ${EXTRA_TARGETS} 26 27${EXTRA_TARGETS}: ${PROG} 28 ln -s ${PROG} ${.TARGET} 29 30.include "${TOP}/mk/elftoolchain.prog.mk" 31 32.if ${OS_HOST} == "OpenBSD" 33CFLAGS+= -I/usr/local/include 34LDFLAGS+= -L/usr/local/lib 35.endif 36