xref: /freebsd/usr.bin/clang/llvm-symbolizer/Makefile (revision 41df1d60e3237df2106dddf357e3205bf29f85d5)
1c369979cSDimitry Andric# $FreeBSD$
2c369979cSDimitry Andric
3021385abSAlex Richardson.include <src.opts.mk>
4021385abSAlex Richardson
5c369979cSDimitry AndricPROG_CXX=	llvm-symbolizer
6bd74205dSDimitry AndricMAN=		llvm-symbolizer.1 llvm-addr2line.1
7c369979cSDimitry Andric
80b57cec5SDimitry AndricSRCDIR=		llvm/tools/llvm-symbolizer
9986e05bcSDimitry AndricSRCS+=		llvm-symbolizer.cpp
10c369979cSDimitry Andric
11e8d8bef9SDimitry Andric.include "${SRCTOP}/lib/clang/llvm.pre.mk"
12e8d8bef9SDimitry Andric
13e8d8bef9SDimitry AndricCFLAGS+=	-I${.OBJDIR}
14e8d8bef9SDimitry Andric
15d8ed7fa3SDimitry AndricINCFILE=	Opts.inc
16d8ed7fa3SDimitry AndricTDFILE=		${LLVM_BASE}/${SRCDIR}/Opts.td
17d8ed7fa3SDimitry AndricGENOPT=		-gen-opt-parser-defs
18d8ed7fa3SDimitry Andric${INCFILE}: ${TDFILE}
19d8ed7fa3SDimitry Andric	${LLVM_TBLGEN} ${GENOPT} -I ${LLVM_SRCS}/include -d ${.TARGET:C/$/.d/} \
20d8ed7fa3SDimitry Andric	    -o ${.TARGET} ${TDFILE}
21d8ed7fa3SDimitry AndricTGHDRS+=	${INCFILE}
22e8d8bef9SDimitry Andric
23e8d8bef9SDimitry AndricDEPENDFILES+=	${TGHDRS:C/$/.d/}
24e8d8bef9SDimitry AndricDPSRCS+=	${TGHDRS}
25e8d8bef9SDimitry AndricCLEANFILES+=	${TGHDRS} ${TGHDRS:C/$/.d/}
26e8d8bef9SDimitry Andric
27dbc595b2SDimitry AndricLIBADD+=	z
28c369979cSDimitry Andric
29bd74205dSDimitry AndricLINKS+=		${BINDIR}/llvm-symbolizer ${BINDIR}/llvm-addr2line
30bd74205dSDimitry Andric
31021385abSAlex Richardson.if ${MK_LLVM_BINUTILS} != "no"
32*41df1d60SEd MasteLINKS+=		${BINDIR}/llvm-symbolizer ${BINDIR}/addr2line
33*41df1d60SEd MasteMLINKS+=	llvm-addr2line.1 addr2line.1
34021385abSAlex Richardson.endif
35021385abSAlex Richardson
36986e05bcSDimitry Andric.include "../llvm.prog.mk"
37