1# @(#)Makefile 8.1 (Berkeley) 6/4/93 2# $FreeBSD$ 3 4.include <src.opts.mk> 5 6# The SUBDIR_BOOTSTRAP 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_BOOTSTRAP= \ 12 csu \ 13 .WAIT \ 14 libc \ 15 libc_nonshared \ 16 libcompiler_rt \ 17 ${_libclang_rt} \ 18 ${_libcplusplus} \ 19 ${_libcxxrt} \ 20 libelf \ 21 libssp \ 22 libssp_nonshared \ 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 libdevinfo \ 51 libdevstat \ 52 libdl \ 53 libdwarf \ 54 libedit \ 55 libelftc \ 56 libevent1 \ 57 libexecinfo \ 58 libexpat \ 59 libfetch \ 60 libgcc_eh \ 61 libgcc_s \ 62 libgeom \ 63 libifconfig \ 64 libipsec \ 65 libiscsiutil \ 66 libjail \ 67 libkiconv \ 68 libkvm \ 69 liblua \ 70 liblzma \ 71 libmemstat \ 72 libmd \ 73 libmixer \ 74 libmt \ 75 lib80211 \ 76 libnetbsd \ 77 libnetmap \ 78 libnv \ 79 libopenbsd \ 80 libopie \ 81 libpam \ 82 libpathconv \ 83 libpcap \ 84 libpjdlog \ 85 libproc \ 86 libprocstat \ 87 libregex \ 88 librpcsvc \ 89 librss \ 90 librt \ 91 librtld_db \ 92 libsbuf \ 93 libsmb \ 94 libstdbuf \ 95 libstdthreads \ 96 libsysdecode \ 97 libtacplus \ 98 libthr \ 99 libthread_db \ 100 libucl \ 101 libufs \ 102 libugidfw \ 103 libulog \ 104 libutil \ 105 ${_libvgl} \ 106 libwrap \ 107 libxo \ 108 liby \ 109 libz \ 110 libzstd \ 111 ncurses 112 113# Inter-library dependencies. When the makefile for a library contains LDADD 114# libraries, those libraries should be listed as build order dependencies here. 115 116SUBDIR_DEPEND_geom= libufs 117SUBDIR_DEPEND_googletest= libregex 118SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd 119SUBDIR_DEPEND_libauditdm= libbsm 120SUBDIR_DEPEND_libbsddialog= ncurses 121SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} 122SUBDIR_DEPEND_libc++:= libcxxrt 123# libssp_nonshared doesn't need to be linked into libc on every arch, but it is 124# small enough to build that this bit of serialization is likely insignificant. 125SUBDIR_DEPEND_libc= libcompiler_rt libssp_nonshared 126SUBDIR_DEPEND_libcam= libsbuf 127SUBDIR_DEPEND_libcasper= libnv 128SUBDIR_DEPEND_libdevstat= libkvm 129SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil 130SUBDIR_DEPEND_libedit= ncurses 131SUBDIR_DEPEND_libgeom= libexpat libsbuf 132SUBDIR_DEPEND_librpcsec_gss= libgssapi 133SUBDIR_DEPEND_libmagic= libz 134SUBDIR_DEPEND_libmemstat= libkvm 135SUBDIR_DEPEND_libopie= libmd 136SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} 137SUBDIR_DEPEND_libpjdlog= libutil 138SUBDIR_DEPEND_libprocstat= libkvm libutil 139SUBDIR_DEPEND_libradius= libmd 140SUBDIR_DEPEND_libsmb= libkiconv 141SUBDIR_DEPEND_libtacplus= libmd 142SUBDIR_DEPEND_libulog= libmd 143SUBDIR_DEPEND_libunbound= ${_libldns} 144SUBDIR_DEPEND_liblzma= libthr 145.if ${MK_OFED} != "no" 146SUBDIR_DEPEND_libpcap= ofed 147.endif 148 149.if !defined(COMPAT_32BIT) 150SUBDIR+= flua 151SUBDIR_DEPEND_flua= libjail 152.endif 153 154# NB: keep these sorted by MK_* knobs 155 156SUBDIR.${MK_ATM}+= libngatm 157SUBDIR.${MK_BEARSSL}+= libbearssl libsecureboot 158SUBDIR.${MK_BLACKLIST}+=libblacklist 159SUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp 160SUBDIR.${MK_BSNMP}+= libbsnmp 161 162.if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP) 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_CXX}+= libdevdctl 171SUBDIR.${MK_TOOLCHAIN}+=libpe 172SUBDIR.${MK_DIALOG}+= libdpv libfigpar 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 and when we enable 182# C++ support. 183.if ${COMPILER_TYPE} == "clang" && ${MK_CXX} != "no" 184_libclang_rt= libclang_rt 185.elif (${MK_ASAN} != "no" || ${MK_UBSAN} != "no") && make(all) 186.error Requested build with sanitizers but cannot build runtime libraries! 187.endif 188 189.if ${MK_CXX} != "no" 190_libcxxrt= libcxxrt 191_libcplusplus= libc++ 192_libcplusplus+= libc++experimental 193.endif 194 195SUBDIR.${MK_EFI}+= libefivar 196SUBDIR.${MK_GOOGLETEST}+= googletest 197SUBDIR.${MK_NETGRAPH}+= libnetgraph 198SUBDIR.${MK_NIS}+= libypclnt 199 200.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" 201_libvgl= libvgl 202.endif 203 204.if ${MACHINE_CPUARCH} == "aarch64" 205SUBDIR.${MK_PMC}+= libopencsd 206.endif 207 208.if ${MACHINE_CPUARCH} == "amd64" 209SUBDIR.${MK_PMC}+= libipt 210SUBDIR.${MK_BHYVE}+= libvmmapi 211.endif 212 213.if ${MACHINE_ARCH} != "powerpc" 214SUBDIR.${MK_OPENMP}+= libomp 215.endif 216.if !defined(COMPAT_32BIT) && ${MK_USB} != "no" 217SUBDIR.${MK_OPENSSH}+= libcbor libfido2 218.endif 219SUBDIR.${MK_OPENSSL}+= libmp 220SUBDIR.${MK_PF}+= libpfctl 221SUBDIR.${MK_PMC}+= libpmc libpmcstat 222SUBDIR.${MK_RADIUS_SUPPORT}+= libradius 223SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil 224SUBDIR.${MK_TELNET}+= libtelnet 225SUBDIR.${MK_TESTS_SUPPORT}+= atf 226SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= liblutok 227SUBDIR.${MK_TESTS}+= tests 228SUBDIR.${MK_UNBOUND}+= libunbound 229SUBDIR.${MK_USB}+= libusbhid libusb 230SUBDIR.${MK_OFED}+= ofed 231SUBDIR.${MK_VERIEXEC}+= libveriexec 232SUBDIR.${MK_ZFS}+= libbe 233 234.if !make(install) 235SUBDIR_PARALLEL= 236.endif 237 238.include <bsd.subdir.mk> 239