1.include <src.opts.mk> 2 3# The SUBDIR_BOOTSTRAP list is a small set of libraries which are used by many 4# of the other libraries. These are built first with a .WAIT between them 5# and the main list to avoid needing a SUBDIR_DEPEND line on every library 6# naming just these few items. 7 8SUBDIR_BOOTSTRAP= \ 9 csu \ 10 .WAIT \ 11 libc \ 12 libc_nonshared \ 13 libcompiler_rt \ 14 ${_libclang_rt} \ 15 libc++ \ 16 libc++experimental \ 17 libcxxrt \ 18 libdiff \ 19 libelf \ 20 libssp \ 21 libssp_nonshared \ 22 libsys \ 23 msun 24 25# The main list; please keep these sorted alphabetically. 26# The only exception is sqlite3: we place it at the start of the list since it 27# takes a long time to build and starting it first improves parallelism. 28 29SUBDIR= ${SUBDIR_BOOTSTRAP} \ 30 .WAIT \ 31 libsqlite3 \ 32 geom \ 33 lib9p \ 34 libalias \ 35 libarchive \ 36 libauditd \ 37 libbegemot \ 38 libblocksruntime \ 39 libbsddialog \ 40 libbsdstat \ 41 libbsm \ 42 libbz2 \ 43 libcalendar \ 44 libcam \ 45 libcapsicum \ 46 libcasper \ 47 libcompat \ 48 libcrypt \ 49 libdevctl \ 50 libdevdctl \ 51 libdevinfo \ 52 libdevstat \ 53 libdl \ 54 libdwarf \ 55 libedit \ 56 libelftc \ 57 libevent1 \ 58 libexecinfo \ 59 libexpat \ 60 libfetch \ 61 libgcc_eh \ 62 libgcc_s \ 63 libgeom \ 64 libifconfig \ 65 libipsec \ 66 libiscsiutil \ 67 libjail \ 68 libkiconv \ 69 libkldelf \ 70 libkvm \ 71 liblua \ 72 liblzma \ 73 libmemstat \ 74 libmd \ 75 libmixer \ 76 libmt \ 77 lib80211 \ 78 libnetbsd \ 79 libnetmap \ 80 libnv \ 81 libnvmf \ 82 libopenbsd \ 83 libpam \ 84 libpathconv \ 85 libpcap \ 86 libpjdlog \ 87 libproc \ 88 libprocstat \ 89 libregex \ 90 librpcsvc \ 91 librss \ 92 librt \ 93 librtld_db \ 94 libsbuf \ 95 libsmb \ 96 libstdbuf \ 97 libstdthreads \ 98 libsysdecode \ 99 libtacplus \ 100 libthr \ 101 libthread_db \ 102 libucl \ 103 libufs \ 104 libugidfw \ 105 libulog \ 106 libutil \ 107 ${_libvgl} \ 108 libwrap \ 109 libxo \ 110 liby \ 111 libz \ 112 libzstd \ 113 ncurses \ 114 nss_tacplus 115 116# Inter-library dependencies. When the makefile for a library contains LDADD 117# libraries, those libraries should be listed as build order dependencies here. 118 119SUBDIR_DEPEND_geom= libufs 120SUBDIR_DEPEND_googletest= libregex 121SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd 122SUBDIR_DEPEND_libauditdm= libbsm 123SUBDIR_DEPEND_libbsddialog= ncurses 124SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} 125SUBDIR_DEPEND_libc++:= libcxxrt 126# libssp_nonshared doesn't need to be linked into libc on every arch, but it is 127# small enough to build that this bit of serialization is likely insignificant. 128SUBDIR_DEPEND_libc= libsys libcompiler_rt libssp_nonshared 129SUBDIR_DEPEND_libcam= libsbuf 130SUBDIR_DEPEND_libcasper= libnv 131SUBDIR_DEPEND_libcrypt= libmd 132SUBDIR_DEPEND_libdevstat= libkvm 133SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil 134SUBDIR_DEPEND_libedit= ncurses 135SUBDIR_DEPEND_libgeom= libexpat libsbuf 136SUBDIR_DEPEND_librpcsec_gss= libgssapi 137SUBDIR_DEPEND_libmagic= libz 138SUBDIR_DEPEND_libmemstat= libkvm 139SUBDIR_DEPEND_libpam= libcrypt ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 140SUBDIR_DEPEND_libpjdlog= libutil 141SUBDIR_DEPEND_libprocstat= libkvm libutil 142SUBDIR_DEPEND_libradius= libmd 143SUBDIR_DEPEND_libsmb= libkiconv 144# See comment above about libssp_nonshared 145SUBDIR_DEPEND_libsys= libcompiler_rt libssp_nonshared 146SUBDIR_DEPEND_libtacplus= libmd 147SUBDIR_DEPEND_libulog= libmd 148SUBDIR_DEPEND_libunbound= ${_libldns} 149SUBDIR_DEPEND_liblzma= libthr 150.if ${MK_OFED} != "no" 151SUBDIR_DEPEND_libpcap= ofed 152.endif 153SUBDIR_DEPEND_nss_tacplus= libtacplus 154 155# NB: keep these sorted by MK_* knobs 156 157SUBDIR.${MK_BEARSSL}+= libbearssl libsecureboot 158SUBDIR.${MK_BLACKLIST}+=libblacklist 159SUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp 160SUBDIR.${MK_BSNMP}+= libbsnmp 161 162.if !defined(COMPAT_LIBCOMPAT) 163.if ${MK_CLANG} != "no" || ${MK_LLD} != "no" || \ 164 ${MK_LLDB} != "no" || ${MK_LLVM_BINUTILS} != "no" 165SUBDIR+= clang 166.endif 167.endif 168 169SUBDIR.${MK_CUSE}+= libcuse 170SUBDIR.${MK_TOOLCHAIN}+=libpe 171SUBDIR.${MK_DIALOG}+= libdpv libfigpar 172SUBDIR.${MK_FDT}+= libfdt 173SUBDIR.${MK_FILE}+= libmagic 174SUBDIR.${MK_GPIO}+= libgpio 175SUBDIR.${MK_GSSAPI}+= libgssapi librpcsec_gss 176SUBDIR.${MK_ICONV}+= libiconv_modules 177SUBDIR.${MK_KERBEROS_SUPPORT}+= libcom_err 178SUBDIR.${MK_LDNS}+= libldns 179SUBDIR.${MK_STATS}+= libstats 180 181# The libraries under libclang_rt can only be built by clang. 182.if ${COMPILER_TYPE} == "clang" && ${MK_CLANG} != "no" 183_libclang_rt= libclang_rt 184.elif (${MK_ASAN} != "no" || ${MK_UBSAN} != "no") && make(all) 185.error Requested build with sanitizers but cannot build runtime libraries! 186.endif 187 188SUBDIR.${MK_EFI}+= libefivar 189SUBDIR.${MK_GOOGLETEST}+= googletest 190SUBDIR.${MK_NETGRAPH}+= libnetgraph 191SUBDIR.${MK_NIS}+= libypclnt 192 193.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 194_libvgl= libvgl 195.endif 196 197.if ${MACHINE_CPUARCH} == "aarch64" 198SUBDIR.${MK_PMC}+= libopencsd 199.endif 200 201.if ${MACHINE_CPUARCH} == "amd64" 202SUBDIR.${MK_PMC}+= libipt 203.endif 204 205.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64" || \ 206 ${MACHINE_CPUARCH} == "riscv" 207SUBDIR.${MK_BHYVE}+= libvmmapi 208.endif 209 210.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" 211SUBDIR.${MK_OPENMP}+= libomp 212.endif 213.if ${MK_USB} != "no" 214SUBDIR.${MK_OPENSSH}+= libcbor libfido2 215.endif 216SUBDIR.${MK_OPENSSL}+= libmp 217SUBDIR.${MK_PF}+= libpfctl 218SUBDIR.${MK_PMC}+= libpmc libpmcstat 219SUBDIR.${MK_RADIUS_SUPPORT}+= libradius 220SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil 221SUBDIR.${MK_TELNET}+= libtelnet 222SUBDIR.${MK_TESTS_SUPPORT}+= atf 223SUBDIR.${MK_TESTS_SUPPORT}+= liblutok 224SUBDIR.${MK_TESTS}+= tests 225SUBDIR.${MK_UNBOUND}+= libunbound 226SUBDIR.${MK_USB}+= libusbhid libusb 227SUBDIR.${MK_OFED}+= ofed 228SUBDIR.${MK_VERIEXEC}+= libveriexec 229SUBDIR.${MK_ZFS}+= libbe 230 231.if !make(install) 232SUBDIR_PARALLEL= 233.endif 234 235.include <bsd.subdir.mk> 236