xref: /freebsd/usr.bin/clang/llvm.prog.mk (revision 3332f1b444d4a73238e9f59cca27bfc95fe936bd)
1# $FreeBSD$
2
3.include "${SRCTOP}/lib/clang/llvm.pre.mk"
4
5CFLAGS+=	-I${OBJTOP}/lib/clang/libllvm
6
7.include "${SRCTOP}/lib/clang/llvm.build.mk"
8
9# Special case for the bootstrap-tools phase.
10.if (defined(TOOLS_PREFIX) || ${MACHINE} == "host") && \
11    (${PROG_CXX} == "clang-tblgen" || ${PROG_CXX} == "lldb-tblgen" || \
12     ${PROG_CXX} == "llvm-tblgen")
13LIBDEPS+=	llvmminimal
14.else
15LIBDEPS+=	llvm
16.endif
17
18.for lib in ${LIBDEPS}
19DPADD+=		${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a
20LDADD+=		${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a
21.endfor
22
23PACKAGE=	clang
24
25.if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING)
26LIBADD+=	execinfo
27LIBADD+=	tinfow
28.endif
29LIBADD+=	pthread
30
31.include <bsd.prog.mk>
32