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 libkvm \ 70 liblua \ 71 liblzma \ 72 libmemstat \ 73 libmd \ 74 libmixer \ 75 libmt \ 76 lib80211 \ 77 libnetbsd \ 78 libnetmap \ 79 libnv \ 80 libnvmf \ 81 libopenbsd \ 82 libpam \ 83 libpathconv \ 84 libpcap \ 85 libpjdlog \ 86 libproc \ 87 libprocstat \ 88 libregex \ 89 librpcsvc \ 90 librss \ 91 librt \ 92 librtld_db \ 93 libsbuf \ 94 libsmb \ 95 libstdbuf \ 96 libstdthreads \ 97 libsysdecode \ 98 libtacplus \ 99 libthr \ 100 libthread_db \ 101 libucl \ 102 libufs \ 103 libugidfw \ 104 libulog \ 105 libutil \ 106 ${_libvgl} \ 107 libwrap \ 108 libxo \ 109 liby \ 110 libz \ 111 libzstd \ 112 ncurses \ 113 nss_tacplus 114 115# Inter-library dependencies. When the makefile for a library contains LDADD 116# libraries, those libraries should be listed as build order dependencies here. 117 118SUBDIR_DEPEND_geom= libufs 119SUBDIR_DEPEND_googletest= libregex 120SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd 121SUBDIR_DEPEND_libauditdm= libbsm 122SUBDIR_DEPEND_libbsddialog= ncurses 123SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} 124SUBDIR_DEPEND_libc++:= libcxxrt 125# libssp_nonshared doesn't need to be linked into libc on every arch, but it is 126# small enough to build that this bit of serialization is likely insignificant. 127SUBDIR_DEPEND_libc= libsys libcompiler_rt libssp_nonshared 128SUBDIR_DEPEND_libcam= libsbuf 129SUBDIR_DEPEND_libcasper= libnv 130SUBDIR_DEPEND_libdevstat= libkvm 131SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil 132SUBDIR_DEPEND_libedit= ncurses 133SUBDIR_DEPEND_libgeom= libexpat libsbuf 134SUBDIR_DEPEND_librpcsec_gss= libgssapi 135SUBDIR_DEPEND_libmagic= libz 136SUBDIR_DEPEND_libmemstat= libkvm 137SUBDIR_DEPEND_libpam= libcrypt ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 138SUBDIR_DEPEND_libpjdlog= libutil 139SUBDIR_DEPEND_libprocstat= libkvm libutil 140SUBDIR_DEPEND_libradius= libmd 141SUBDIR_DEPEND_libsmb= libkiconv 142# See comment above about libssp_nonshared 143SUBDIR_DEPEND_libsys= libcompiler_rt libssp_nonshared 144SUBDIR_DEPEND_libtacplus= libmd 145SUBDIR_DEPEND_libulog= libmd 146SUBDIR_DEPEND_libunbound= ${_libldns} 147SUBDIR_DEPEND_liblzma= libthr 148.if ${MK_OFED} != "no" 149SUBDIR_DEPEND_libpcap= ofed 150.endif 151SUBDIR_DEPEND_nss_tacplus= libtacplus 152 153.if !defined(COMPAT_LIBCOMPAT) 154SUBDIR+= flua 155SUBDIR_DEPEND_flua= libjail 156.endif 157 158# NB: keep these sorted by MK_* knobs 159 160SUBDIR.${MK_BEARSSL}+= libbearssl libsecureboot 161SUBDIR.${MK_BLACKLIST}+=libblacklist 162SUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp 163SUBDIR.${MK_BSNMP}+= libbsnmp 164 165.if !defined(COMPAT_LIBCOMPAT) 166.if ${MK_CLANG} != "no" || ${MK_LLD} != "no" || \ 167 ${MK_LLDB} != "no" || ${MK_LLVM_BINUTILS} != "no" 168SUBDIR+= clang 169.endif 170.endif 171 172SUBDIR.${MK_CUSE}+= libcuse 173SUBDIR.${MK_TOOLCHAIN}+=libpe 174SUBDIR.${MK_DIALOG}+= libdpv libfigpar 175SUBDIR.${MK_FDT}+= libfdt 176SUBDIR.${MK_FILE}+= libmagic 177SUBDIR.${MK_GPIO}+= libgpio 178SUBDIR.${MK_GSSAPI}+= libgssapi librpcsec_gss 179SUBDIR.${MK_ICONV}+= libiconv_modules 180SUBDIR.${MK_KERBEROS_SUPPORT}+= libcom_err 181SUBDIR.${MK_LDNS}+= libldns 182SUBDIR.${MK_STATS}+= libstats 183 184# The libraries under libclang_rt can only be built by clang. 185.if ${COMPILER_TYPE} == "clang" && ${MK_CLANG} != "no" 186_libclang_rt= libclang_rt 187.elif (${MK_ASAN} != "no" || ${MK_UBSAN} != "no") && make(all) 188.error Requested build with sanitizers but cannot build runtime libraries! 189.endif 190 191SUBDIR.${MK_EFI}+= libefivar 192SUBDIR.${MK_GOOGLETEST}+= googletest 193SUBDIR.${MK_NETGRAPH}+= libnetgraph 194SUBDIR.${MK_NIS}+= libypclnt 195 196.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 197_libvgl= libvgl 198.endif 199 200.if ${MACHINE_CPUARCH} == "aarch64" 201SUBDIR.${MK_PMC}+= libopencsd 202.endif 203 204.if ${MACHINE_CPUARCH} == "amd64" 205SUBDIR.${MK_PMC}+= libipt 206.endif 207 208.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64" 209SUBDIR.${MK_BHYVE}+= libvmmapi 210.endif 211 212.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" 213SUBDIR.${MK_OPENMP}+= libomp 214.endif 215.if ${MK_USB} != "no" 216SUBDIR.${MK_OPENSSH}+= libcbor libfido2 217.endif 218SUBDIR.${MK_OPENSSL}+= libmp 219SUBDIR.${MK_PF}+= libpfctl 220SUBDIR.${MK_PMC}+= libpmc libpmcstat 221SUBDIR.${MK_RADIUS_SUPPORT}+= libradius 222SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil 223SUBDIR.${MK_TELNET}+= libtelnet 224SUBDIR.${MK_TESTS_SUPPORT}+= atf 225SUBDIR.${MK_TESTS_SUPPORT}+= liblutok 226SUBDIR.${MK_TESTS}+= tests 227SUBDIR.${MK_UNBOUND}+= libunbound 228SUBDIR.${MK_USB}+= libusbhid libusb 229SUBDIR.${MK_OFED}+= ofed 230SUBDIR.${MK_VERIEXEC}+= libveriexec 231SUBDIR.${MK_ZFS}+= libbe 232 233.if !make(install) 234SUBDIR_PARALLEL= 235.endif 236 237.include <bsd.subdir.mk> 238