xref: /freebsd/usr.bin/clang/lldb/Makefile (revision 7d536dc855c85c15bf45f033d108a61b1f3cecc3)
1# $FreeBSD$
2
3.include <bsd.own.mk>
4
5PROG_CXX=lldb
6
7LLDB_SRCS=${.CURDIR}/../../../contrib/llvm/tools/lldb
8
9CFLAGS+=	-I${LLDB_SRCS}/include
10CXXFLAGS+=	-std=c++11
11.if ${MACHINE_CPUARCH} == "arm"
12CFLAGS+=	-mlong-calls
13.endif
14
15SRCDIR=	tools/lldb/tools/driver
16SRCS=	Driver.cpp \
17	Platform.cpp
18
19# Man page directory
20.PATH: ${LLDB_SRCS}/docs
21
22LIBADD+=	edit panel ncursesw execinfo z
23
24LLDB_LIBS=\
25	lldb \
26	\
27	lldbAPI \
28	lldbBreakpoint \
29	lldbCommands \
30	lldbCore \
31	lldbDataFormatters \
32	lldbExpression \
33	lldbHostFreeBSD \
34	lldbHostCommon \
35	lldbHostPOSIX \
36	lldbInitialization \
37	lldbInterpreter \
38	lldbSymbol \
39	lldbTarget \
40	lldbUtility \
41	\
42	lldbPluginABISysV_arm \
43	lldbPluginABISysV_arm64 \
44	lldbPluginABISysV_i386 \
45	lldbPluginABISysV_mips \
46	lldbPluginABISysV_mips64 \
47	lldbPluginABISysV_ppc \
48	lldbPluginABISysV_ppc64 \
49	lldbPluginABISysV_x86_64 \
50	lldbPluginCXXItaniumABI \
51	lldbPluginDisassemblerLLVM \
52	lldbPluginExpressionParserClang \
53	lldbPluginExpressionParserGo \
54	lldbPluginInstructionARM \
55	lldbPluginInstructionARM64 \
56	lldbPluginInstructionMIPS \
57	lldbPluginInstructionMIPS64 \
58	lldbPluginInstrumentationRuntimeAddressSanitizer \
59	lldbPluginJITLoaderGDB \
60	lldbPluginLanguageCPlusPlus \
61	lldbPluginLanguageObjC \
62	lldbPluginSymbolFileDWARF \
63	lldbPluginSymbolFileSymtab \
64	lldbPluginDynamicLoaderStatic \
65	lldbPluginDynamicLoaderPosixDYLD \
66	lldbPluginMemoryHistoryASan \
67	lldbPluginObjectContainerBSDArchive \
68	lldbPluginObjectFileELF \
69	lldbPluginObjectFileJIT \
70	lldbPluginScriptInterpreterNone \
71	lldbPluginSymbolVendorELF \
72	lldbPluginPlatformFreeBSD \
73	lldbPluginPlatformGDB \
74	lldbPluginProcessElfCore \
75	lldbPluginProcessFreeBSD \
76	lldbPluginProcessGDBRemote \
77	lldbPluginProcessUtility \
78	lldbPluginProcessPOSIX \
79	lldbPluginProcessFreeBSD \
80	lldbPluginUnwindAssemblyInstEmulation \
81	lldbPluginUnwindAssemblyX86
82
83LDADD+=	-Wl,--start-group
84.for lib in ${LLDB_LIBS}
85DPADD+=	${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a
86LDADD+=	${.OBJDIR}/../../../lib/clang/lib${lib}/lib${lib}.a
87.endfor
88LDADD+=	-Wl,--end-group
89
90# Clang and LLVM libraries
91LIBDEPS=\
92	clangfrontend \
93	clangdriver \
94	clangserialization \
95	clangcodegen \
96	clangparse \
97	clangsema \
98	clanganalysis \
99	clangedit \
100	clangast \
101	clanglex \
102	clangbasic \
103	\
104	llvmoption \
105	llvmobjcarcopts \
106	llvmlinker \
107	llvmmcjit \
108	llvmruntimedyld \
109	llvmexecutionengine \
110	llvmirreader \
111	llvmipo \
112	llvmvectorize \
113	llvmbitwriter \
114	llvmasmparser \
115	llvmaarch64disassembler \
116	llvmaarch64codegen \
117	llvmaarch64asmparser \
118	llvmaarch64desc \
119	llvmaarch64info \
120	llvmaarch64asmprinter \
121	llvmaarch64utils \
122	llvmarmdisassembler \
123	llvmarmcodegen \
124	llvmarmasmparser \
125	llvmarmdesc \
126	llvmarminfo \
127	llvmarmasmprinter \
128	llvmmipsdisassembler \
129	llvmmipscodegen \
130	llvmmipsasmparser \
131	llvmmipsdesc \
132	llvmmipsinfo \
133	llvmmipsasmprinter \
134	llvmpowerpcdisassembler \
135	llvmpowerpccodegen \
136	llvmpowerpcasmparser \
137	llvmpowerpcdesc \
138	llvmpowerpcinfo \
139	llvmpowerpcasmprinter \
140	llvmsparcdisassembler \
141	llvmsparccodegen \
142	llvmsparcasmparser \
143	llvmsparcdesc \
144	llvmsparcinfo \
145	llvmsparcasmprinter \
146	llvmx86disassembler \
147	llvmx86asmparser \
148	llvmx86codegen \
149	llvmselectiondag \
150	llvmasmprinter \
151	llvmcodegen \
152	llvmtarget \
153	llvmscalaropts \
154	llvmprofiledata \
155	llvminstcombine \
156	llvmtransformutils \
157	llvmanalysis \
158	llvminstrumentation \
159	llvmx86desc \
160	llvmobject \
161	llvmmcparser \
162	llvmbitreader \
163	llvmmcdisassembler \
164	llvmx86info \
165	llvmx86asmprinter \
166	llvmmc \
167	llvmx86utils \
168	llvmcore \
169	llvmsupport
170
171LIBADD+=	pthread
172
173.include "../clang.prog.mk"
174