Makefile revision 1.269
11.269Schristos# $NetBSD: Makefile,v 1.269 2019/03/12 15:14:02 christos 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.158Splunky libbluetooth libbsdmalloc libbz2 \ 251.184Smatt libcompat libcrypt \ 261.265Smartin libintl libipsec libkvm libm \ 271.259Smaxv libossaudio libpci libposix libprop libpthread \ 281.249Skamil libpuffs libresolv librmt librpcsvc librt \ 291.187Schristos libtelnet libterminfo \ 301.158Splunky libusbhid libutil libwrap liby libz 311.158Splunky 321.206Smatt.if !defined(BSD_MK_COMPAT_FILE) 331.206SmattSUBDIR+= libkern 341.206Smatt.endif 351.206Smatt 361.226Smatt.if (${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "aarch64") 371.201SmattLIBC_MACHINE_ARCH?=${MACHINE_ARCH} 381.228SjoergLIBC_MACHINE_CPU?=${MACHINE_CPU} 391.228Sjoerg.if ${LIBC_MACHINE_CPU} == "arm" && empty(LIBC_MACHINE_ARCH:M*hf*) 401.197SmattSUBDIR+= libc_vfp 411.197Smatt.endif 421.201Smatt.endif 431.248Smacallan.if ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb" 441.247SmacallanSUBDIR+= libc_fp 451.247Smacallan.endif 461.187Schristos.if (${MKRUMP} != "no") 471.187SchristosSUBDIR+= librumpclient 481.187Schristos.endif 491.158Splunky.if (${MKSKEY} != "no") 501.158SplunkySUBDIR+= libskey 511.158Splunky.endif 521.60Sthorpej 531.265Smartin.if ${MACHINE_ARCH} == "x86_64" && ${MLIBDIR:Unone} != "i386" 541.265SmartinSUBDIR+= libnvmm 551.265Smartin.endif 561.265Smartin 571.266SmrgSUBDIR+= ../external/public-domain/sqlite/lib 581.266Smrg 591.155Splunky.if (${MKMDNS} != "no") 601.155SplunkySUBDIR+= ../external/apache2/mDNSResponder/lib 611.155Splunky.endif 621.155Splunky 631.155SplunkySUBDIR+= ../external/bsd/am-utils/lib 641.155Splunky 651.155SplunkySUBDIR+= ../external/bsd/flex/lib 661.180SchristosSUBDIR+= ../external/bsd/tre/lib 671.212SchristosSUBDIR+= ../external/bsd/elftoolchain/lib/libelf 681.163SmattSUBDIR+= ../external/bsd/liblzf/lib 691.158SplunkySUBDIR+= ../external/bsd/libpcap/lib 701.155Splunky 711.214Splunky.if ${MKSLJIT} != "no" 721.214SplunkySUBDIR+= ../external/bsd/sljit/lib 731.214SplunkySUBDIR+= libbpfjit 741.214Splunky.endif 751.214Splunky 761.261SchristosSUBDIR+= ../external/bsd/libnv/lib 771.261Schristos 781.224Smatt.if (${MKZFS} != "no") 791.224SmattSUBDIR+= ../external/cddl/osnet/lib/libavl 801.224SmattSUBDIR+= ../external/cddl/osnet/lib/libnvpair 811.224SmattSUBDIR+= ../external/cddl/osnet/lib/libumem 821.224SmattSUBDIR+= ../external/cddl/osnet/lib/libuutil 831.224Smatt.endif 841.224Smatt 851.182StronSUBDIR+= ../external/mit/expat/lib 861.155Splunky 871.238SchristosSUBDIR+= ../external/gpl2/libmalloc 881.155Splunky 891.269SchristosSUBDIR+= ../external/bsd/jemalloc/lib 901.269Schristos 911.155Splunky.if (${MKGCC} != "no") 921.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc 931.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp 941.173Smrg# Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5 951.173Smrg# specific build area, but we get better parallelism this way. 961.215Smrg# We don't build compat versions of these. 971.252Smrg. if !defined(MLIBDIR) && (${MKGCCCMDS} != "no") 981.172SmattSUBDIR+= ../external/lgpl3/gmp/lib/libgmp 991.174SplunkySUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr 1001.209SmrgSUBDIR+= ../external/lgpl3/mpc/lib/libmpc 1011.174Splunky. endif 1021.155Splunky.endif 1031.144Schristos 1041.89Slukem# 1051.89Slukem# Libraries that depend upon any listed previously 1061.93Slukem# (and those that depend upon these [and ...]) 1071.89Slukem# 1081.97Schristos#==================== 1st library dependency barrier ==================== 1091.97SchristosSUBDIR+= .WAIT 1101.97Schristos 1111.235Schristos.if ${MKDTRACE} != "no" 1121.229SchristosSUBDIR+= ../external/bsd/librtld_db/lib # depends on libutil 1131.234Schristos.endif 1141.229Schristos 1151.240Sriastrad.if ${MKCTF} != "no" 1161.227SchristosSUBDIR+= ../external/cddl/osnet/lib/libctf 1171.227Schristos.endif 1181.227Schristos 1191.221SmrgSUBDIR+= ../external/public-domain/xz/lib # depends on libpthread 1201.208SmrgSUBDIR+= ../crypto/external/bsd/netpgp/libmj 1211.208SmrgSUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz 1221.237SchristosSUBDIR+= ../external/bsd/blacklist/lib # depends on libpthread 1231.212SchristosSUBDIR+= ../external/bsd/elftoolchain/lib/libdwarf # depends on libelf 1241.208SmrgSUBDIR+= ../external/mit/lua/lib # depends on libm 1251.158SplunkySUBDIR+= libcurses # depends on libterminfo 1261.162ShaadSUBDIR+= libdm # depends on libprop 1271.158SplunkySUBDIR+= libedit # depends on libterminfo 1281.184SmattSUBDIR+= libexecinfo # depends on libelf 1291.176SdyoungSUBDIR+= libppath # depends on libprop 1301.175SplunkySUBDIR+= libperfuse # depends on libpuffs 1311.165SbouyerSUBDIR+= libquota # depends on libprop and librpcsvc 1321.113SpookaSUBDIR+= librefuse # depends on libpuffs 1331.207SjoergSUBDIR+= libisns # depends on libpthread 1341.187Schristos.if (${MKRUMP} != "no") 1351.253SchristosSUBDIR+= librumphijack # depends on librumpclient and libpthread 1361.253SchristosSUBDIR+= librumpres # depends on librumpclient 1371.126SpookaSUBDIR+= librumpuser # depends on libpthread 1381.187Schristos.endif 1391.126Spooka 1401.161Srmind.if (${MKNPF} != "no") 1411.261SchristosSUBDIR+= libnpf # depends on libnv 1421.161Srmind.endif 1431.161Srmind 1441.254SchristosSUBDIR+= ../crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib # depends on libcrypt 1451.155SplunkySUBDIR+= ../external/bsd/file/lib # depends on libz 1461.155Splunky 1471.155Splunky.if (${MKISCSI} != "no") 1481.155SplunkySUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread 1491.155Splunky.endif 1501.155Splunky 1511.224Smatt.if (${MKZFS} != "no") 1521.257SchsSUBDIR+= ../external/cddl/osnet/lib/libzfs_core 1531.224SmattSUBDIR+= ../external/cddl/osnet/lib/libzpool 1541.224Smatt.endif 1551.224Smatt 1561.163Smatt.if (${MKLVM} != "no") 1571.163SmattSUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop 1581.163Smatt.endif 1591.163Smatt 1601.155Splunky.if (${MKBINUTILS} != "no") 1611.239SchristosSUBDIR+= ../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/lib # libbfd depends on libz 1621.155Splunky.endif 1631.155Splunky 1641.202Sjoerg.if (${MKLIBCXX} != "no") 1651.202SjoergSUBDIR+= ../external/bsd/libc++ 1661.202Sjoerg.endif 1671.202Sjoerg 1681.203Sjoerg.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no") 1691.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3 1701.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++ 1711.155Splunky.endif 1721.222Schristos 1731.222Schristos#==================== 2nd library dependency barrier ==================== 1741.222SchristosSUBDIR+= .WAIT 1751.222Schristos 1761.258Schristos.for sanitizer in asan lsan ubsan 1771.245Schristos.if exists(../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer}) 1781.245SchristosSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer} 1791.245Schristos.endif 1801.245Schristos.endfor 1811.155Splunky 1821.221SmrgSUBDIR+= ../external/bsd/libarchive/lib # depends on libxz 1831.221Smrg 1841.208Smrg.if (${MKNPF} != "no") 1851.208SmrgSUBDIR+= npf # depends on libnpf 1861.208Smrg.endif 1871.208Smrg 1881.185Schristos.if (${MKATF} != "no") 1891.186SchristosSUBDIR+= ../external/bsd/atf/lib # depends on libstdc++ 1901.185Schristos.endif 1911.185Schristos 1921.198Sjmmv.if (${MKKYUA} != "no") 1931.198SjmmvSUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++ 1941.198Sjmmv.endif 1951.198Sjmmv 1961.158SplunkySUBDIR+= libform # depends on libcurses 1971.175SplunkySUBDIR+= libmenu # depends on libcurses 1981.236SkamilSUBDIR+= libpanel # depends on libcurses 1991.251SriastradSUBDIR+= libradius # depends on libcrypto 2001.187Schristos.if (${MKRUMP} != "no") 2011.175SplunkySUBDIR+= librump # depends on librumpuser 2021.187Schristos.endif 2031.158Splunky 2041.100Schristos.if (${MKKERBEROS} != "no") 2051.166SelricSUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto 2061.166Selric # libedit, libterminfo, 2071.100Schristos.endif 2081.100Schristos 2091.158SplunkySUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz 2101.158SplunkySUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ... 2111.199SchristosSUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto 2121.235Schristos.if ${MKDTRACE} != "no" 2131.234SchristosSUBDIR+= ../external/bsd/libproc/lib # depends on libstdc++, libctf 2141.234Schristos.endif 2151.158SplunkySUBDIR+= ../external/bsd/fetch/lib # depends on libssl 2161.158Splunky 2171.158Splunky.if (${MKLDAP} != "no") 2181.158SplunkySUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ... 2191.158Splunky.endif 2201.158Splunky 2211.257Schs.if (${MKZFS} != "no") 2221.257SchsSUBDIR+= ../external/cddl/osnet/lib/libzfs 2231.257Schs.endif 2241.257Schs 2251.256SsevanSUBDIR+= ../libexec/httpd/libbozohttpd # depends on libssl & libcrypto 2261.256Ssevan 2271.124Slukem#==================== 3rd library dependency barrier ==================== 2281.124SlukemSUBDIR+= .WAIT 2291.124Slukem 2301.255SchristosSUBDIR+= ../crypto/external/bsd/netpgp/bindings/lua # depends on netpgp/lib 2311.260SchristosSUBDIR+= ../external/mpl/bind/lib # depends on heimdal, libcrypto 2321.251Sriastrad.if ${MKUNBOUND} != "no" 2331.246SchristosSUBDIR+= ../external/bsd/unbound/lib # depends on libcrypto 2341.246Schristos.endif 2351.204Sjoerg 2361.230Schristos.if ${MKDTRACE} != "no" 2371.230SchristosSUBDIR+= ../external/cddl/osnet/lib/libdtrace # depends on libproc 2381.230Schristos.endif 2391.230Schristos 2401.187Schristos.if (${MKRUMP} != "no") 2411.143SpookaSUBDIR+= librumpdev # depends on librump 2421.128SpookaSUBDIR+= librumpnet # depends on librump 2431.130SpookaSUBDIR+= librumpvfs # depends on librump 2441.187Schristos.endif 2451.126Spooka 2461.175Splunky.if (${MKPAM} != "no") 2471.175SplunkySUBDIR+= libpam # depends on heimdal 2481.175Splunky.endif 2491.175Splunky 2501.175SplunkySUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl 2511.181SjoergSUBDIR+= ../external/bsd/mdocml/lib 2521.181Sjoerg 2531.187Schristos.if (${MKRUMP} != "no") 2541.126Spooka#==================== 4th library dependency barrier ==================== 2551.126SpookaSUBDIR+= .WAIT 2561.158Splunky 2571.158SplunkySUBDIR+= libukfs # depends on librumpvfs, librump 2581.131Spooka 2591.190Schristos.if (${MKTPM} != "no") 2601.190SchristosSUBDIR+= ../crypto/external/cpl/trousers/lib 2611.190Schristos.endif 2621.190Schristos 2631.131Spooka#==================== 5th library dependency barrier ==================== 2641.131SpookaSUBDIR+= .WAIT 2651.158Splunky 2661.158SplunkySUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs 2671.188Sjoerg 2681.192Schristos.if (${MKTPM} != "no") 2691.192SchristosSUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers 2701.192Schristos.endif 2711.192Schristos 2721.188Sjoerg.if !defined(BSD_MK_COMPAT_FILE) 2731.188SjoergSUBDIR+= ../sys/rump/dev/lib 2741.188SjoergSUBDIR+= ../sys/rump/fs/lib 2751.188SjoergSUBDIR+= ../sys/rump/kern/lib 2761.188SjoergSUBDIR+= ../sys/rump/net/lib 2771.188Sjoerg.endif 2781.187Schristos.endif 2791.158Splunky 2801.178Smbalmer# Lua bindings come last, they might depend on anything 2811.178SmbalmerSUBDIR+= lua 2821.178Smbalmer 2831.210Schristos# Needed by rump and rescue which are outside the smbfs tree 2841.210SchristosSUBDIR+= ../external/bsd/smbfs/lib 2851.210Schristos 2861.251Sriastrad.for S in ${SUBDIR} 2871.251Sriastrad.if ${S} != ".WAIT" 2881.251SriastradSUBLIB_${S}!= cd ${S} && ${MAKE} -V LIB 2891.251SriastradSUBDEP_${S}!= cd ${S} && ${MAKE} -V LIBDPLIBS 2901.251Sriastrad.endif 2911.251Sriastrad.endfor 2921.251Sriastrad 2931.251Sriastradshowdeps: 2941.251Sriastrad.for S in ${SUBDIR} 2951.251Sriastrad.if ${S} != ".WAIT" 2961.251Sriastrad.for DL DD in ${SUBDEP_${S}} 2971.251Sriastrad @echo ${S} ${SUBLIB_${S}} ${DL} ${DD:C,^${.CURDIR}/,,} 2981.251Sriastrad.endfor 2991.251Sriastrad.endif 3001.251Sriastrad.endfor 3011.251Sriastrad 3021.195Sjoerg.include <bsd.buildinstall.mk> 3031.1Scgd.include <bsd.subdir.mk> 304