Makefile (9f4dbff6669c8037f3b036bcf580d14f1a4f12a5) Makefile (f12128e4dfcb41c597fb9d0de1403026e8fb2ec1)
1##===- lib/Makefile ----------------------------------------*- Makefile -*-===##
2#
3# The LLVM Compiler Infrastructure
4#
5# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
7#
8##===----------------------------------------------------------------------===##
9CLANG_LEVEL := ..
1# @(#)Makefile 8.1 (Berkeley) 6/4/93
2# $FreeBSD$
10
3
11# ARCMigrate and Rewrite are always needed because of libclang.
12PARALLEL_DIRS = Headers Basic Lex Parse AST Sema CodeGen Analysis Frontend \
13 FrontendTool Tooling Driver Format Edit Rewrite Serialization \
14 Index ASTMatchers
4.include <src.opts.mk>
15
5
16include $(CLANG_LEVEL)/../../Makefile.config
6# The SUBDIR_ORDERED list is a small set of libraries which are used by many
7# of the other libraries. These are built first with a .WAIT between them
8# and the main list to avoid needing a SUBDIR_DEPEND line on every library
9# naming just these few items.
17
10
18ifeq ($(ENABLE_CLANG_STATIC_ANALYZER),1)
19PARALLEL_DIRS += StaticAnalyzer
20endif
11SUBDIR_ORDERED= ${_csu} \
12 .WAIT \
13 libc \
14 libc_nonshared \
15 libcompiler_rt \
16 ${_libcplusplus} \
17 ${_libcxxrt} \
18 libelf \
19 msun
21
20
22ifeq ($(ENABLE_CLANG_ARCMT),1)
23PARALLEL_DIRS += ARCMigrate
24endif
21# The main list; please keep these sorted alphabetically.
25
22
26include $(CLANG_LEVEL)/Makefile
23SUBDIR= ${SUBDIR_ORDERED} \
24 .WAIT \
25 libalias \
26 libarchive \
27 ${_libatm} \
28 libauditd \
29 libbegemot \
30 libblocksruntime \
31 ${_libbluetooth} \
32 ${_libbsnmp} \
33 libbsdstat \
34 libbsm \
35 libbz2 \
36 libcalendar \
37 libcam \
38 ${_libcapsicum} \
39 ${_libcasper} \
40 ${_libcom_err} \
41 libcompat \
42 libcrypt \
43 libdevinfo \
44 libdevstat \
45 libdpv \
46 libdwarf \
47 libedit \
48 ${_libevent} \
49 libexecinfo \
50 libexpat \
51 libfetch \
52 libfigpar \
53 libgeom \
54 ${_libgpib} \
55 libgpio \
56 ${_libgssapi} \
57 ${_librpcsec_gss} \
58 ${_libiconv_modules} \
59 libipsec \
60 libjail \
61 libkiconv \
62 libkvm \
63 ${_libldns} \
64 liblzma \
65 libmagic \
66 libmandoc \
67 libmemstat \
68 libmd \
69 ${_libmilter} \
70 ${_libmp} \
71 ${_libnandfs} \
72 libnetbsd \
73 ${_libnetgraph} \
74 ${_libngatm} \
75 libnv \
76 libohash \
77 libopie \
78 libpam \
79 libpcap \
80 libpjdlog \
81 ${_libpmc} \
82 ${_libproc} \
83 libprocstat \
84 libradius \
85 librpcsvc \
86 librt \
87 ${_librtld_db} \
88 libsbuf \
89 ${_libsdp} \
90 ${_libsm} \
91 ${_libsmb} \
92 ${_libsmdb} \
93 ${_libsmutil} \
94 libsqlite3 \
95 libstand \
96 libstdbuf \
97 libstdthreads \
98 libtacplus \
99 ${_libtelnet} \
100 ${_libthr} \
101 libthread_db \
102 libucl \
103 libufs \
104 libugidfw \
105 libulog \
106 ${_libunbound} \
107 ${_libusbhid} \
108 ${_libusb} \
109 libutil \
110 ${_libvgl} \
111 ${_libvmmapi} \
112 libwrap \
113 libxo \
114 liby \
115 ${_libypclnt} \
116 libz \
117 ncurses \
118 ${_atf} \
119 ${_clang} \
120 ${_cuse} \
121 ${_tests}
122
123# Inter-library dependencies. When the makefile for a library contains LDADD
124# libraries, those libraries should be listed as build order dependencies here.
125
126SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
127SUBDIR_DEPEND_libatm= libmd
128SUBDIR_DEPEND_libauditdm= libbsm
129SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}
130SUBDIR_DEPEND_libc++= libcxxrt
131SUBDIR_DEPEND_libc= libcompiler_rt
132SUBDIR_DEPEND_libcam= libsbuf
133SUBDIR_DEPEND_libcapsicum= libnv
134SUBDIR_DEPEND_libcasper= libcapsicum libnv libpjdlog
135SUBDIR_DEPEND_libdevstat= libkvm
136SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil
137SUBDIR_DEPEND_libedit= ncurses
138SUBDIR_DEPEND_libg++= msun
139SUBDIR_DEPEND_libgeom= libexpat libsbuf
140SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi
141SUBDIR_DEPEND_libmagic= libz
142SUBDIR_DEPEND_libmemstat= libkvm
143SUBDIR_DEPEND_libopie= libmd
144SUBDIR_DEPEND_libpam= libcrypt libopie libradius librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err}
145SUBDIR_DEPEND_libpjdlog= libutil
146SUBDIR_DEPEND_libprocstat= libkvm libutil
147SUBDIR_DEPEND_libradius= libmd
148SUBDIR_DEPEND_libreadline= ncurses
149SUBDIR_DEPEND_libsmb= libkiconv
150SUBDIR_DEPEND_libstdc++= msun
151SUBDIR_DEPEND_libtacplus= libmd
152SUBDIR_DEPEND_libulog= libmd
153SUBDIR_DEPEND_libunbound= ${_libldns}
154
155.if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
156_csu=csu/${MACHINE_ARCH}-elf
157.elif exists(${.CURDIR}/csu/${MACHINE_ARCH})
158_csu=csu/${MACHINE_ARCH}
159.elif exists(${.CURDIR}/csu/${MACHINE_CPUARCH}/Makefile)
160_csu=csu/${MACHINE_CPUARCH}
161.else
162_csu=csu
163.endif
164
165# NB: keep these sorted by MK_* knobs
166
167.if ${MK_ATM} != "no"
168_libngatm= libngatm
169.endif
170
171.if ${MK_BLUETOOTH} != "no"
172_libbluetooth= libbluetooth
173_libsdp= libsdp
174.endif
175
176.if ${MK_BSNMP} != "no"
177_libbsnmp= libbsnmp
178.endif
179
180.if ${MK_CASPER} != "no"
181_libcapsicum= libcapsicum
182_libcasper= libcasper
183.endif
184
185.if ${MK_CLANG} != "no" && !defined(COMPAT_32BIT)
186_clang= clang
187.endif
188
189.if ${MK_CUSE} != "no"
190_cuse= libcuse
191.endif
192
193.if ${MK_GPIB} != "no"
194_libgpib= libgpib
195.endif
196
197.if ${MK_GSSAPI} != "no"
198_libgssapi= libgssapi
199_librpcsec_gss= librpcsec_gss
200.endif
201
202.if ${MK_ICONV} != "no"
203_libiconv_modules= libiconv_modules
204.endif
205
206.if ${MK_KERBEROS_SUPPORT} != "no"
207_libcom_err= libcom_err
208.endif
209
210.if ${MK_LDNS} != "no"
211_libldns= libldns
212.endif
213
214.if ${MK_LIBCPLUSPLUS} != "no"
215_libcxxrt= libcxxrt
216_libcplusplus= libc++
217.endif
218
219.if ${MK_LIBTHR} != "no"
220_libthr= libthr
221.endif
222
223.if ${MK_NAND} != "no"
224_libnandfs= libnandfs
225.endif
226
227.if ${MK_NETGRAPH} != "no"
228_libnetgraph= libnetgraph
229.endif
230
231.if ${MK_NIS} != "no"
232_libypclnt= libypclnt
233.endif
234
235.if ${MK_PF} != "no"
236_libevent= libevent
237.endif
238
239.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
240_libsmb= libsmb
241_libvgl= libvgl
242_libproc= libproc
243_librtld_db= librtld_db
244.endif
245
246.if ${MACHINE_CPUARCH} == "amd64"
247_libvmmapi= libvmmapi
248.endif
249
250.if ${MACHINE_CPUARCH} == "mips"
251_libproc= libproc
252_librtld_db= librtld_db
253.endif
254
255.if ${MACHINE_CPUARCH} == "powerpc"
256_libproc= libproc
257_librtld_db= librtld_db
258_libsmb= libsmb
259.endif
260
261.if ${MACHINE_CPUARCH} == "sparc64"
262_libsmb= libsmb
263.endif
264
265.if ${MK_OPENSSL} != "no"
266_libmp= libmp
267.endif
268
269.if ${MK_PMC} != "no"
270_libpmc= libpmc
271.endif
272
273.if ${MK_SENDMAIL} != "no"
274_libmilter= libmilter
275_libsm= libsm
276_libsmdb= libsmdb
277_libsmutil= libsmutil
278.endif
279
280.if ${MK_TELNET} != "no"
281_libtelnet= libtelnet
282.endif
283
284.if ${MK_TESTS_SUPPORT} != "no"
285_atf= atf
286.endif
287.if ${MK_TESTS} != "no"
288_tests= tests
289.endif
290
291.if ${MK_UNBOUND} != "no"
292_libunbound= libunbound
293.endif
294
295.if ${MK_USB} != "no"
296_libusbhid= libusbhid
297_libusb= libusb
298.endif
299
300.if !defined(LIBRARIES_ONLY)
301afterinstall:
302 ${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include
303.endif
304
305.if !make(install)
306SUBDIR_PARALLEL=
307.endif
308
309.include <bsd.subdir.mk>