Makefile revision 1.315
11.315Smrg# $NetBSD: Makefile,v 1.315 2026/01/19 02:45:15 mrg Exp $ 21.8Smycroft# from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91 31.21Scgd 41.62Sthorpej.include <bsd.own.mk> 51.62Sthorpej 61.188SjoergSUBDIR= csu .WAIT 71.155Splunky 81.155Splunky.if (${MKGCC} != "no") 91.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgcc .WAIT 101.155Splunky.endif 111.155Splunky 121.155SplunkySUBDIR+= libc 131.155SplunkySUBDIR+= .WAIT 141.155Splunky 151.155Splunky# 161.155Splunky# The SUBDIRs above are included here for completeness but should be built 171.155Splunky# and installed prior to make(dependall) in this file, as libraries listed 181.155Splunky# below will depend on versions from DESTDIR only. 191.155Splunky# 201.155Splunky 211.158SplunkySUBDIR+= i18n_module 221.158Splunky 231.158SplunkySUBDIR+= libarch \ 241.311Sthorpej libbsdmalloc libbz2 \ 251.184Smatt libcompat libcrypt \ 261.312Sthorpej libintl libkvm libm \ 271.259Smaxv libossaudio libpci libposix libprop libpthread \ 281.249Skamil libpuffs libresolv librmt librpcsvc librt \ 291.187Schristos libtelnet libterminfo \ 301.314Sthorpej libutil liby libz 311.158Splunky 321.206Smatt.if !defined(BSD_MK_COMPAT_FILE) 331.206SmattSUBDIR+= libkern 341.206Smatt.endif 351.206Smatt 361.294Srin.if (${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc") 371.294SrinSUBDIR+= libc_aligned 381.294Srin.endif 391.226Smatt.if (${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "aarch64") 401.201SmattLIBC_MACHINE_ARCH?=${MACHINE_ARCH} 411.228SjoergLIBC_MACHINE_CPU?=${MACHINE_CPU} 421.228Sjoerg.if ${LIBC_MACHINE_CPU} == "arm" && empty(LIBC_MACHINE_ARCH:M*hf*) 431.197SmattSUBDIR+= libc_vfp 441.197Smatt.endif 451.201Smatt.endif 461.292Schristos.if ${MACHINE_MIPS64} 471.247SmacallanSUBDIR+= libc_fp 481.247Smacallan.endif 491.311Sthorpej.if (${MKBLUETOOTH} != "no") 501.311SthorpejSUBDIR+= libbluetooth 511.311Sthorpej.endif 521.312Sthorpej.if (${MKIPSEC} != "no") 531.312SthorpejSUBDIR+= libipsec 541.312Sthorpej.endif 551.187Schristos.if (${MKRUMP} != "no") 561.187SchristosSUBDIR+= librumpclient 571.187Schristos.endif 581.158Splunky.if (${MKSKEY} != "no") 591.158SplunkySUBDIR+= libskey 601.158Splunky.endif 611.60Sthorpej 621.285Sjmcneill.if ${HAVE_NVMM:Uno} == "yes" && !defined(MLIBDIR) 631.265SmartinSUBDIR+= libnvmm 641.265Smartin.endif 651.265Smartin 661.314Sthorpej.if (${MKUSB} != "no") 671.314SthorpejSUBDIR+= libusbhid 681.314Sthorpej.endif 691.314Sthorpej 701.293Snia.if (${MKARGON2} != "no") 711.293SniaSUBDIR+= ../external/apache2/argon2/lib/libargon2 721.293Snia.endif 731.293Snia 741.155Splunky.if (${MKMDNS} != "no") 751.155SplunkySUBDIR+= ../external/apache2/mDNSResponder/lib 761.155Splunky.endif 771.155Splunky 781.155SplunkySUBDIR+= ../external/bsd/am-utils/lib 791.155Splunky 801.155SplunkySUBDIR+= ../external/bsd/flex/lib 811.180SchristosSUBDIR+= ../external/bsd/tre/lib 821.297SriastradELFTOOLCHAINLIB=../external/bsd/elftoolchain/lib/ 831.297Sriastrad.include "${ELFTOOLCHAINLIB}Makefile.subdir" 841.163SmattSUBDIR+= ../external/bsd/liblzf/lib 851.158SplunkySUBDIR+= ../external/bsd/libpcap/lib 861.155Splunky 871.214Splunky.if ${MKSLJIT} != "no" 881.214SplunkySUBDIR+= ../external/bsd/sljit/lib 891.214SplunkySUBDIR+= libbpfjit 901.214Splunky.endif 911.214Splunky 921.261SchristosSUBDIR+= ../external/bsd/libnv/lib 931.261Schristos 941.224Smatt.if (${MKZFS} != "no") 951.224SmattSUBDIR+= ../external/cddl/osnet/lib/libavl 961.224SmattSUBDIR+= ../external/cddl/osnet/lib/libnvpair 971.224SmattSUBDIR+= ../external/cddl/osnet/lib/libumem 981.224SmattSUBDIR+= ../external/cddl/osnet/lib/libuutil 991.224Smatt.endif 1001.224Smatt 1011.182StronSUBDIR+= ../external/mit/expat/lib 1021.155Splunky 1031.238SchristosSUBDIR+= ../external/gpl2/libmalloc 1041.155Splunky 1051.302SchristosSUBDIR+= ../external/bsd/${EXTERNAL_JEMALLOC_SUBDIR}/lib 1061.269Schristos 1071.155Splunky.if (${MKGCC} != "no") 1081.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc 1091.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp 1101.155Splunky.endif 1111.144Schristos 1121.296Srin# GCC and GDB >= 13 require GMP. 1131.301Schristos# We don't build compat versions of these 1141.301Schristos.if !defined(MLIBDIR) && (${MKGCCCMDS} != "no" || ${MKGDB} != "no") 1151.301SchristosSUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr 1161.301SchristosSUBDIR+= ../external/lgpl3/mpc/lib/libmpc 1171.296SrinSUBDIR+= ../external/lgpl3/gmp/lib/libgmp 1181.296Srin.endif 1191.296Srin 1201.89Slukem# 1211.89Slukem# Libraries that depend upon any listed previously 1221.93Slukem# (and those that depend upon these [and ...]) 1231.89Slukem# 1241.97Schristos#==================== 1st library dependency barrier ==================== 1251.97SchristosSUBDIR+= .WAIT 1261.97Schristos 1271.235Schristos.if ${MKDTRACE} != "no" 1281.229SchristosSUBDIR+= ../external/bsd/librtld_db/lib # depends on libutil 1291.234Schristos.endif 1301.229Schristos 1311.240Sriastrad.if ${MKCTF} != "no" 1321.227SchristosSUBDIR+= ../external/cddl/osnet/lib/libctf 1331.227Schristos.endif 1341.227Schristos 1351.221SmrgSUBDIR+= ../external/public-domain/xz/lib # depends on libpthread 1361.208SmrgSUBDIR+= ../crypto/external/bsd/netpgp/libmj 1371.208SmrgSUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz 1381.284SchristosSUBDIR+= ../external/bsd/blocklist/lib # depends on libpthread 1391.208SmrgSUBDIR+= ../external/mit/lua/lib # depends on libm 1401.286SniaSUBDIR+= ../external/public-domain/sqlite/lib # depends on libm 1411.158SplunkySUBDIR+= libcurses # depends on libterminfo 1421.162ShaadSUBDIR+= libdm # depends on libprop 1431.158SplunkySUBDIR+= libedit # depends on libterminfo 1441.184SmattSUBDIR+= libexecinfo # depends on libelf 1451.176SdyoungSUBDIR+= libppath # depends on libprop 1461.175SplunkySUBDIR+= libperfuse # depends on libpuffs 1471.165SbouyerSUBDIR+= libquota # depends on libprop and librpcsvc 1481.113SpookaSUBDIR+= librefuse # depends on libpuffs 1491.207SjoergSUBDIR+= libisns # depends on libpthread 1501.187Schristos.if (${MKRUMP} != "no") 1511.253SchristosSUBDIR+= librumphijack # depends on librumpclient and libpthread 1521.253SchristosSUBDIR+= librumpres # depends on librumpclient 1531.126SpookaSUBDIR+= librumpuser # depends on libpthread 1541.187Schristos.endif 1551.126Spooka 1561.161Srmind.if (${MKNPF} != "no") 1571.261SchristosSUBDIR+= libnpf # depends on libnv 1581.161Srmind.endif 1591.161Srmind 1601.308SchristosOSSL=../crypto/external/${EXTERNAL_OPENSSL_SUBDIR}/lib/ 1611.295Schristos.include "${.CURDIR}/${OSSL}Makefile.subdir" # depends on libcrypt 1621.155Splunky 1631.155Splunky.if (${MKISCSI} != "no") 1641.155SplunkySUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread 1651.155Splunky.endif 1661.155Splunky 1671.224Smatt.if (${MKZFS} != "no") 1681.257SchsSUBDIR+= ../external/cddl/osnet/lib/libzfs_core 1691.224SmattSUBDIR+= ../external/cddl/osnet/lib/libzpool 1701.224Smatt.endif 1711.224Smatt 1721.163Smatt.if (${MKLVM} != "no") 1731.163SmattSUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop 1741.163Smatt.endif 1751.163Smatt 1761.155Splunky.if (${MKBINUTILS} != "no") 1771.239SchristosSUBDIR+= ../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/lib # libbfd depends on libz 1781.155Splunky.endif 1791.155Splunky 1801.202Sjoerg.if (${MKLIBCXX} != "no") 1811.202SjoergSUBDIR+= ../external/bsd/libc++ 1821.202Sjoerg.endif 1831.202Sjoerg 1841.203Sjoerg.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no") 1851.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3 1861.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++ 1871.155Splunky.endif 1881.222Schristos 1891.271Snakayama.if (${MKLLVMRT} != "no" && (!defined(MLIBDIR) || ${MKCOMPATX11} != "no")) 1901.273SjoergSUBDIR+= ../external/apache2/llvm/include 1911.270Sjoerg.endif 1921.270Sjoerg 1931.275SchristosSUBDIR+= ../external/mit/libcbor/lib 1941.283Schristos 1951.304SmrgSUBDIR+= ../external/bsd/zstd/lib 1961.222Schristos#==================== 2nd library dependency barrier ==================== 1971.222SchristosSUBDIR+= .WAIT 1981.222Schristos 1991.287SchristosSUBDIR+= libwrap 2001.287Schristos 2011.299Smrg.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no") 2021.300Smrg.if ${MKGCCCMDS} != "no" 2031.258Schristos.for sanitizer in asan lsan ubsan 2041.245Schristos.if exists(../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer}) 2051.245SchristosSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer} 2061.245Schristos.endif 2071.245Schristos.endfor 2081.272Smrg.endif 2091.300Smrg.endif 2101.155Splunky 2111.271Snakayama.if (${MKLLVMRT} != "no" && (!defined(MLIBDIR) || ${MKCOMPATX11} != "no")) 2121.273SjoergSUBDIR+= ../external/apache2/llvm/librt 2131.270Sjoerg.endif 2141.270Sjoerg 2151.303SchristosSUBDIR+= ../external/bsd/libarchive/lib # depends on libxz, zstd 2161.221Smrg 2171.304SmrgSUBDIR+= ../external/bsd/file/lib # depends on libz, libbz2, libxz, zstd 2181.274Schristos 2191.208Smrg.if (${MKNPF} != "no") 2201.208SmrgSUBDIR+= npf # depends on libnpf 2211.208Smrg.endif 2221.208Smrg 2231.185Schristos.if (${MKATF} != "no") 2241.297SriastradATFLIB= ../external/bsd/atf/lib/ 2251.297Sriastrad.include "${ATFLIB}Makefile.subdir" # depends on libstdc++ 2261.185Schristos.endif 2271.185Schristos 2281.198Sjmmv.if (${MKKYUA} != "no") 2291.198SjmmvSUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++ 2301.198Sjmmv.endif 2311.198Sjmmv 2321.158SplunkySUBDIR+= libform # depends on libcurses 2331.175SplunkySUBDIR+= libmenu # depends on libcurses 2341.236SkamilSUBDIR+= libpanel # depends on libcurses 2351.251SriastradSUBDIR+= libradius # depends on libcrypto 2361.187Schristos.if (${MKRUMP} != "no") 2371.175SplunkySUBDIR+= librump # depends on librumpuser 2381.187Schristos.endif 2391.158Splunky 2401.100Schristos.if (${MKKERBEROS} != "no") 2411.297Sriastrad# heimdal depends on libcrypto, libedit, libterminfo 2421.297SriastradHEIMDALLIB= ../crypto/external/bsd/heimdal/lib/ 2431.297Sriastrad.include "${HEIMDALLIB}Makefile.subdir" # depends on libcrypto 2441.166Selric # libedit, libterminfo, 2451.100Schristos.endif 2461.100Schristos 2471.313Sthorpej.if (${MKFIDO2} != "no") 2481.275SchristosSUBDIR+= ../external/bsd/libfido2/lib # depends on libcbor 2491.313Sthorpej.endif 2501.313Sthorpej 2511.297SriastradNETPGPLIB= ../crypto/external/bsd/netpgp/lib/ 2521.297Sriastrad.include "${NETPGPLIB}Makefile.subdir" # depends on libcrypto, ... 2531.297SriastradLIBEVENTLIB= ../external/bsd/libevent/lib/ 2541.297Sriastrad.include "${LIBEVENTLIB}Makefile.subdir" # depends on libcrypto 2551.235Schristos.if ${MKDTRACE} != "no" 2561.234SchristosSUBDIR+= ../external/bsd/libproc/lib # depends on libstdc++, libctf 2571.234Schristos.endif 2581.158SplunkySUBDIR+= ../external/bsd/fetch/lib # depends on libssl 2591.158Splunky 2601.158Splunky.if (${MKLDAP} != "no") 2611.297SriastradOPENLDAPLIB= ../external/bsd/openldap/lib/ # depends on libcrypto, ... 2621.297Sriastrad.include "${OPENLDAPLIB}Makefile.subdir" 2631.158Splunky.endif 2641.158Splunky 2651.257Schs.if (${MKZFS} != "no") 2661.257SchsSUBDIR+= ../external/cddl/osnet/lib/libzfs 2671.257Schs.endif 2681.257Schs 2691.256SsevanSUBDIR+= ../libexec/httpd/libbozohttpd # depends on libssl & libcrypto 2701.256Ssevan 2711.305SchristosSUBDIR+= ../external/mit/libuv/lib 2721.307SchristosSUBDIR+= ../external/lgpl2/userspace-rcu/lib 2731.305Schristos 2741.124Slukem#==================== 3rd library dependency barrier ==================== 2751.124SlukemSUBDIR+= .WAIT 2761.124Slukem 2771.275SchristosSUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz, 2781.275Schristos # libfido2 2791.255SchristosSUBDIR+= ../crypto/external/bsd/netpgp/bindings/lua # depends on netpgp/lib 2801.260SchristosSUBDIR+= ../external/mpl/bind/lib # depends on heimdal, libcrypto 2811.305Schristos # libuv, userspace-rcu 2821.251Sriastrad.if ${MKUNBOUND} != "no" 2831.246SchristosSUBDIR+= ../external/bsd/unbound/lib # depends on libcrypto 2841.246Schristos.endif 2851.204Sjoerg 2861.230Schristos.if ${MKDTRACE} != "no" 2871.230SchristosSUBDIR+= ../external/cddl/osnet/lib/libdtrace # depends on libproc 2881.230Schristos.endif 2891.230Schristos 2901.187Schristos.if (${MKRUMP} != "no") 2911.143SpookaSUBDIR+= librumpdev # depends on librump 2921.128SpookaSUBDIR+= librumpnet # depends on librump 2931.130SpookaSUBDIR+= librumpvfs # depends on librump 2941.187Schristos.endif 2951.126Spooka 2961.175SplunkySUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl 2971.181SjoergSUBDIR+= ../external/bsd/mdocml/lib 2981.181Sjoerg 2991.126Spooka#==================== 4th library dependency barrier ==================== 3001.126SpookaSUBDIR+= .WAIT 3011.158Splunky 3021.277Schristos.if (${MKPAM} != "no") 3031.278SrinSUBDIR+= libpam # depends on heimdal, libssh 3041.277Schristos.endif 3051.277Schristos 3061.277Schristos 3071.280Schristos.if (${MKRUMP} != "no") 3081.158SplunkySUBDIR+= libukfs # depends on librumpvfs, librump 3091.280Schristos.endif 3101.131Spooka 3111.190Schristos.if (${MKTPM} != "no") 3121.190SchristosSUBDIR+= ../crypto/external/cpl/trousers/lib 3131.190Schristos.endif 3141.190Schristos 3151.131Spooka#==================== 5th library dependency barrier ==================== 3161.131SpookaSUBDIR+= .WAIT 3171.158Splunky 3181.279Schristos.if (${MKPAM} != "no") 3191.279SchristosSUBDIR+= ../external/bsd/pam-u2f/lib # depends on libpam 3201.279Schristos.endif 3211.279Schristos 3221.281Stnn.if (${MKRUMP} != "no") 3231.158SplunkySUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs 3241.281Stnn.endif 3251.188Sjoerg 3261.192Schristos.if (${MKTPM} != "no") 3271.192SchristosSUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers 3281.192Schristos.endif 3291.192Schristos 3301.280Schristos.if (${MKRUMP} != "no") 3311.188Sjoerg.if !defined(BSD_MK_COMPAT_FILE) 3321.188SjoergSUBDIR+= ../sys/rump/dev/lib 3331.188SjoergSUBDIR+= ../sys/rump/fs/lib 3341.188SjoergSUBDIR+= ../sys/rump/kern/lib 3351.188SjoergSUBDIR+= ../sys/rump/net/lib 3361.188Sjoerg.endif 3371.187Schristos.endif 3381.158Splunky 3391.178Smbalmer# Lua bindings come last, they might depend on anything 3401.178SmbalmerSUBDIR+= lua 3411.178Smbalmer 3421.315Smrg#==================== 6th library dependency barrier ==================== 3431.315SmrgSUBDIR+= .WAIT 3441.315Smrg 3451.315Smrg.if (${MKGCC} != "no" && ${HAVE_GCC:U0} >= 14) 3461.315Smrg.if ${HAVE_QUADMATH} != "no" 3471.315SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libquadmath 3481.315Smrg.endif 3491.315SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgfortran 3501.315Smrg.endif 3511.315Smrg 3521.195Sjoerg.include <bsd.buildinstall.mk> 3531.1Scgd.include <bsd.subdir.mk> 354