1# @(#)Makefile 8.1 (Berkeley) 6/4/93 2# $FreeBSD$ 3 4.include <src.opts.mk> 5 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. 10 11SUBDIR_ORDERED= csu \ 12 .WAIT \ 13 libc \ 14 libc_nonshared \ 15 libcompiler_rt \ 16 ${_libclang_rt} \ 17 ${_libcplusplus} \ 18 ${_libcxxrt} \ 19 libelf \ 20 msun 21 22# The main list; please keep these sorted alphabetically. 23 24SUBDIR= ${SUBDIR_ORDERED} \ 25 .WAIT \ 26 libalias \ 27 libasl \ 28 libarchive \ 29 ${_libatm} \ 30 libauditd \ 31 libbegemot \ 32 libblocksruntime \ 33 ${_libbluetooth} \ 34 ${_libbsnmp} \ 35 libbsdstat \ 36 libbsm \ 37 libbz2 \ 38 libcalendar \ 39 libcam \ 40 ${_libcapsicum} \ 41 ${_libcasper} \ 42 ${_libcom_err} \ 43 libcompat \ 44 libcrypt \ 45 libdevctl \ 46 libdevinfo \ 47 libdevstat \ 48 libdispatch \ 49 libdpv \ 50 libdwarf \ 51 libedit \ 52 ${_libelftc} \ 53 libevent \ 54 libexecinfo \ 55 libexpat \ 56 libfetch \ 57 libfigpar \ 58 libgeom \ 59 ${_libgpio} \ 60 ${_libgssapi} \ 61 ${_librpcsec_gss} \ 62 ${_libiconv_modules} \ 63 libipsec \ 64 libjail \ 65 libjansson \ 66 libkiconv \ 67 libkvm \ 68 liblaunch \ 69 ${_libldns} \ 70 liblzma \ 71 ${_libmagic} \ 72 libmach \ 73 libmemstat \ 74 libmd \ 75 ${_libmp} \ 76 libmt \ 77 ${_libnandfs} \ 78 lib80211 \ 79 libnetbsd \ 80 ${_libnetgraph} \ 81 ${_libngatm} \ 82 libnotify \ 83 libnv \ 84 libopenbsd \ 85 libopie \ 86 libosxsupport \ 87 libpam \ 88 libpcap \ 89 libpjdlog \ 90 ${_libpmc} \ 91 ${_libproc} \ 92 libprocstat \ 93 ${_libradius} \ 94 librpcsvc \ 95 librt \ 96 ${_librtld_db} \ 97 libsbuf \ 98 ${_libsdp} \ 99 ${_libsm} \ 100 libsmb \ 101 ${_libsmdb} \ 102 ${_libsmutil} \ 103 libsqlite3 \ 104 libstand \ 105 libstdbuf \ 106 libstdthreads \ 107 libSystem \ 108 libsysdecode \ 109 libtacplus \ 110 ${_libtelnet} \ 111 ${_libthr} \ 112 libthread_db \ 113 libucl \ 114 libufs \ 115 libugidfw \ 116 libulog \ 117 ${_libunbound} \ 118 ${_libusbhid} \ 119 ${_libusb} \ 120 libutil \ 121 ${_libvgl} \ 122 ${_libvmmapi} \ 123 libwrap \ 124 libxo \ 125 libxpc \ 126 liby \ 127 ${_libypclnt} \ 128 libz \ 129 ncurses \ 130 ${_atf} \ 131 ${_clang} \ 132 ${_cuse} \ 133 ${_tests} 134 135# Inter-library dependencies. When the makefile for a library contains LDADD 136# libraries, those libraries should be listed as build order dependencies here. 137 138SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd 139SUBDIR_DEPEND_libatm= libmd 140SUBDIR_DEPEND_libauditdm= libbsm 141SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} 142SUBDIR_DEPEND_libc++:= libcxxrt 143SUBDIR_DEPEND_libc= libcompiler_rt 144SUBDIR_DEPEND_libcam= libsbuf 145SUBDIR_DEPEND_libcapsicum= libnv 146SUBDIR_DEPEND_libcasper= libcapsicum libnv libpjdlog 147SUBDIR_DEPEND_libdevstat= libkvm 148SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil 149SUBDIR_DEPEND_libedit= ncurses 150SUBDIR_DEPEND_libgeom= libexpat libsbuf 151SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi 152SUBDIR_DEPEND_libmagic= libz 153SUBDIR_DEPEND_libmemstat= libkvm 154SUBDIR_DEPEND_libopie= libmd 155SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 156SUBDIR_DEPEND_libpjdlog= libutil 157SUBDIR_DEPEND_libprocstat= libkvm libutil 158SUBDIR_DEPEND_libradius= libmd 159SUBDIR_DEPEND_libsmb= libkiconv 160SUBDIR_DEPEND_libtacplus= libmd 161SUBDIR_DEPEND_libulog= libmd 162SUBDIR_DEPEND_libunbound= ${_libldns} 163SUBDIR_DEPEND_liblzma= ${_libthr} 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_TOOLCHAIN} != "no" 194_libelftc= libelftc 195.endif 196 197.if ${MK_FILE} != "no" 198_libmagic= libmagic 199.endif 200 201.if ${MK_GPIO} != "no" 202_libgpio= libgpio 203.endif 204 205.if ${MK_GSSAPI} != "no" 206_libgssapi= libgssapi 207_librpcsec_gss= librpcsec_gss 208.endif 209 210.if ${MK_ICONV} != "no" 211_libiconv_modules= libiconv_modules 212.endif 213 214.if ${MK_KERBEROS_SUPPORT} != "no" 215_libcom_err= libcom_err 216.endif 217 218.if ${MK_LDNS} != "no" 219_libldns= libldns 220.endif 221 222# The libraries under libclang_rt can only be built by clang, and only make 223# sense to build when clang is enabled at all. Furthermore, they can only be 224# built for certain architectures. 225.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \ 226 (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ 227 (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") || \ 228 (${MACHINE_CPUARCH} == "i386")) 229_libclang_rt= libclang_rt 230.endif 231 232.if ${MK_LIBCPLUSPLUS} != "no" 233_libcxxrt= libcxxrt 234_libcplusplus= libc++ 235.endif 236 237.if ${MK_LIBTHR} != "no" 238_libthr= libthr 239.endif 240 241.if ${MK_NAND} != "no" 242_libnandfs= libnandfs 243.endif 244 245.if ${MK_NETGRAPH} != "no" 246_libnetgraph= libnetgraph 247.endif 248 249.if ${MK_NIS} != "no" 250_libypclnt= libypclnt 251.endif 252 253.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 254_libvgl= libvgl 255_libproc= libproc 256_librtld_db= librtld_db 257.endif 258 259.if ${MACHINE_CPUARCH} == "amd64" 260.if ${MK_BHYVE} != "no" 261_libvmmapi= libvmmapi 262.endif 263.endif 264 265.if ${MACHINE_CPUARCH} == "mips" 266_libproc= libproc 267_librtld_db= librtld_db 268.endif 269 270 271.if ${MACHINE_CPUARCH} == "powerpc" 272_libproc= libproc 273_librtld_db= librtld_db 274.endif 275 276.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" 277_libproc= libproc 278_librtld_db= librtld_db 279.endif 280 281.if ${MK_OPENSSL} != "no" 282_libmp= libmp 283.endif 284 285.if ${MK_PMC} != "no" 286_libpmc= libpmc 287.endif 288 289.if ${MK_RADIUS_SUPPORT} != "no" 290_libradius= libradius 291.endif 292 293.if ${MK_TELNET} != "no" 294_libtelnet= libtelnet 295.endif 296 297.if ${MK_TESTS_SUPPORT} != "no" 298_atf= atf 299.endif 300.if ${MK_TESTS} != "no" 301_tests= tests 302.endif 303 304.if ${MK_UNBOUND} != "no" 305_libunbound= libunbound 306.endif 307 308.if ${MK_USB} != "no" 309_libusbhid= libusbhid 310_libusb= libusb 311.endif 312 313.if !make(install) 314SUBDIR_PARALLEL= 315.endif 316 317.include <bsd.subdir.mk> 318