xref: /freebsd/usr.bin/clang/llvm-symbolizer/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1.include <src.opts.mk>
2
3PROG_CXX=	llvm-symbolizer
4MAN=		llvm-symbolizer.1 llvm-addr2line.1
5
6SRCDIR=		llvm/tools/llvm-symbolizer
7SRCS+=		llvm-symbolizer-driver.cpp
8SRCS+=		llvm-symbolizer.cpp
9
10.include "${SRCTOP}/lib/clang/llvm.pre.mk"
11
12CFLAGS+=	-I${.OBJDIR}
13
14INCFILE=	Opts.inc
15TDFILE=		${LLVM_BASE}/${SRCDIR}/Opts.td
16GENOPT=		-gen-opt-parser-defs
17${INCFILE}: ${TDFILE}
18	${LLVM_TBLGEN} ${GENOPT} -I ${LLVM_SRCS}/include -d ${.TARGET:C/$/.d/} \
19	    -o ${.TARGET} ${TDFILE}
20TGHDRS+=	${INCFILE}
21
22DEPENDFILES+=	${TGHDRS:C/$/.d/}
23DPSRCS+=	${TGHDRS}
24CLEANFILES+=	${TGHDRS} ${TGHDRS:C/$/.d/}
25
26LINKS+=		${BINDIR}/llvm-symbolizer ${BINDIR}/llvm-addr2line
27
28.if ${MK_LLVM_BINUTILS} != "no"
29LINKS+=		${BINDIR}/llvm-symbolizer ${BINDIR}/addr2line
30MLINKS+=	llvm-addr2line.1 addr2line.1
31.endif
32
33.include "../llvm.prog.mk"
34