xref: /freebsd/usr.bin/clang/llvm.prog.mk (revision 8ddb146abcdf061be9f2c0db7e391697dafad85c)
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