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