tools/llvm: Do not build with symbols
[minix3.git] / external / bsd / llvm / link.mk
blobdd13901e68200ed0e4d8e97b1f8c5bd1b4443b50
1 # $NetBSD: link.mk,v 1.5 2013/09/29 12:11:59 joerg Exp $
3 .include <bsd.own.mk>
5 .if defined(HOSTPROG)
6 LIB_BASE= ${NETBSDSRCDIR}/tools/llvm-lib
7 .else
8 LIB_BASE= ${LLVM_TOPLEVEL}/lib
9 .endif
11 .for l in ${MCLINKER_LIBS}
12 MCLINKER_OBJDIR.${l}!= cd ${LIB_BASE}/libMCLinker${l} && ${PRINTOBJDIR}
13 LDADD+= -L${MCLINKER_OBJDIR.${l}} -lMCLinker${l}
14 DPADD+= ${MCLINKER_OBJDIR.${l}}/libMCLinker${l}.a
15 .endfor
17 .for l in ${LLDB_LIBS}
18 LLDB_OBJDIR.${l}!= cd ${LIB_BASE}/liblldb${l} && ${PRINTOBJDIR}
19 LDADD+= -L${LLDB_OBJDIR.${l}} -llldb${l}
20 DPADD+= ${LLDB_OBJDIR.${l}}/liblldb${l}.a
21 .endfor
23 .for l in ${CLANG_LIBS}
24 CLANG_OBJDIR.${l}!= cd ${LIB_BASE}/lib${l} && ${PRINTOBJDIR}
25 LDADD+= -L${CLANG_OBJDIR.${l}} -l${l}
26 DPADD+= ${CLANG_OBJDIR.${l}}/lib${l}.a
27 .endfor
29 .for l in ${LLD_LIBS}
30 LLD_OBJDIR.${l}!= cd ${LIB_BASE}/lib${l} && ${PRINTOBJDIR}
31 LDADD+= -L${LLD_OBJDIR.${l}} -l${l}
32 DPADD+= ${LLD_OBJDIR.${l}}/lib${l}.a
33 .endfor
35 .for l in ${LLVM_LIBS}
36 LLVM_OBJDIR.${l}!= cd ${LIB_BASE}/libLLVM${l} && ${PRINTOBJDIR}
37 LDADD+= -L${LLVM_OBJDIR.${l}} -lLLVM${l}
38 DPADD+= ${LLVM_OBJDIR.${l}}/libLLVM${l}.a
39 .endfor
41 .if defined(HOSTPROG)
42 LDADD_NEED_DL= cat ${LLVM_TOOLCONF_OBJDIR}/need-dl 2> /dev/null
43 LDADD_NEED_TERMINFO= cat ${LLVM_TOOLCONF_OBJDIR}/need-terminfo 2> /dev/null
44 LDADD+= ${LDADD_NEED_DL:sh} ${LDADD_NEED_TERMINFO:sh}
45 .else
46 LDADD+= -lterminfo
47 DPADD+= ${LIBTERMINFO}
48 .endif
50 .if defined(__MINIX) && defined(HOSTPROG) && ${HOST_OSTYPE:C/\-.*//} != "Minix"
51 LDADD+= -lpthread
52 .else
53 LDADD+= -lc++ -lmthread
54 .endif # defined(__MINIX)