Makefile revision 1.266
11.266Smrg# $NetBSD: Makefile,v 1.266 2018/12/24 22:02:32 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.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.155Splunky.if (${MKGCC} != "no") 901.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc 911.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp 921.173Smrg# Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5 931.173Smrg# specific build area, but we get better parallelism this way. 941.215Smrg# We don't build compat versions of these. 951.252Smrg. if !defined(MLIBDIR) && (${MKGCCCMDS} != "no") 961.172SmattSUBDIR+= ../external/lgpl3/gmp/lib/libgmp 971.174SplunkySUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr 981.209SmrgSUBDIR+= ../external/lgpl3/mpc/lib/libmpc 991.174Splunky. endif 1001.155Splunky.endif 1011.144Schristos 1021.89Slukem# 1031.89Slukem# Libraries that depend upon any listed previously 1041.93Slukem# (and those that depend upon these [and ...]) 1051.89Slukem# 1061.97Schristos#==================== 1st library dependency barrier ==================== 1071.97SchristosSUBDIR+= .WAIT 1081.97Schristos 1091.235Schristos.if ${MKDTRACE} != "no" 1101.229SchristosSUBDIR+= ../external/bsd/librtld_db/lib # depends on libutil 1111.234Schristos.endif 1121.229Schristos 1131.240Sriastrad.if ${MKCTF} != "no" 1141.227SchristosSUBDIR+= ../external/cddl/osnet/lib/libctf 1151.227Schristos.endif 1161.227Schristos 1171.221SmrgSUBDIR+= ../external/public-domain/xz/lib # depends on libpthread 1181.208SmrgSUBDIR+= ../crypto/external/bsd/netpgp/libmj 1191.208SmrgSUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz 1201.237SchristosSUBDIR+= ../external/bsd/blacklist/lib # depends on libpthread 1211.212SchristosSUBDIR+= ../external/bsd/elftoolchain/lib/libdwarf # depends on libelf 1221.208SmrgSUBDIR+= ../external/mit/lua/lib # depends on libm 1231.158SplunkySUBDIR+= libcurses # depends on libterminfo 1241.162ShaadSUBDIR+= libdm # depends on libprop 1251.158SplunkySUBDIR+= libedit # depends on libterminfo 1261.184SmattSUBDIR+= libexecinfo # depends on libelf 1271.176SdyoungSUBDIR+= libppath # depends on libprop 1281.175SplunkySUBDIR+= libperfuse # depends on libpuffs 1291.165SbouyerSUBDIR+= libquota # depends on libprop and librpcsvc 1301.113SpookaSUBDIR+= librefuse # depends on libpuffs 1311.207SjoergSUBDIR+= libisns # depends on libpthread 1321.187Schristos.if (${MKRUMP} != "no") 1331.253SchristosSUBDIR+= librumphijack # depends on librumpclient and libpthread 1341.253SchristosSUBDIR+= librumpres # depends on librumpclient 1351.126SpookaSUBDIR+= librumpuser # depends on libpthread 1361.187Schristos.endif 1371.126Spooka 1381.161Srmind.if (${MKNPF} != "no") 1391.261SchristosSUBDIR+= libnpf # depends on libnv 1401.161Srmind.endif 1411.161Srmind 1421.254SchristosSUBDIR+= ../crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib # depends on libcrypt 1431.155SplunkySUBDIR+= ../external/bsd/file/lib # depends on libz 1441.155Splunky 1451.155Splunky.if (${MKISCSI} != "no") 1461.155SplunkySUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread 1471.155Splunky.endif 1481.155Splunky 1491.224Smatt.if (${MKZFS} != "no") 1501.257SchsSUBDIR+= ../external/cddl/osnet/lib/libzfs_core 1511.224SmattSUBDIR+= ../external/cddl/osnet/lib/libzpool 1521.224Smatt.endif 1531.224Smatt 1541.163Smatt.if (${MKLVM} != "no") 1551.163SmattSUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop 1561.163Smatt.endif 1571.163Smatt 1581.155Splunky.if (${MKBINUTILS} != "no") 1591.239SchristosSUBDIR+= ../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/lib # libbfd depends on libz 1601.155Splunky.endif 1611.155Splunky 1621.202Sjoerg.if (${MKLIBCXX} != "no") 1631.202SjoergSUBDIR+= ../external/bsd/libc++ 1641.202Sjoerg.endif 1651.202Sjoerg 1661.203Sjoerg.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no") 1671.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3 1681.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++ 1691.155Splunky.endif 1701.222Schristos 1711.222Schristos#==================== 2nd library dependency barrier ==================== 1721.222SchristosSUBDIR+= .WAIT 1731.222Schristos 1741.258Schristos.for sanitizer in asan lsan ubsan 1751.245Schristos.if exists(../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer}) 1761.245SchristosSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer} 1771.245Schristos.endif 1781.245Schristos.endfor 1791.155Splunky 1801.221SmrgSUBDIR+= ../external/bsd/libarchive/lib # depends on libxz 1811.221Smrg 1821.208Smrg.if (${MKNPF} != "no") 1831.208SmrgSUBDIR+= npf # depends on libnpf 1841.208Smrg.endif 1851.208Smrg 1861.185Schristos.if (${MKATF} != "no") 1871.186SchristosSUBDIR+= ../external/bsd/atf/lib # depends on libstdc++ 1881.185Schristos.endif 1891.185Schristos 1901.198Sjmmv.if (${MKKYUA} != "no") 1911.198SjmmvSUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++ 1921.198Sjmmv.endif 1931.198Sjmmv 1941.158SplunkySUBDIR+= libform # depends on libcurses 1951.175SplunkySUBDIR+= libmenu # depends on libcurses 1961.236SkamilSUBDIR+= libpanel # depends on libcurses 1971.251SriastradSUBDIR+= libradius # depends on libcrypto 1981.187Schristos.if (${MKRUMP} != "no") 1991.175SplunkySUBDIR+= librump # depends on librumpuser 2001.187Schristos.endif 2011.158Splunky 2021.100Schristos.if (${MKKERBEROS} != "no") 2031.166SelricSUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto 2041.166Selric # libedit, libterminfo, 2051.100Schristos.endif 2061.100Schristos 2071.158SplunkySUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz 2081.158SplunkySUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ... 2091.199SchristosSUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto 2101.235Schristos.if ${MKDTRACE} != "no" 2111.234SchristosSUBDIR+= ../external/bsd/libproc/lib # depends on libstdc++, libctf 2121.234Schristos.endif 2131.158SplunkySUBDIR+= ../external/bsd/fetch/lib # depends on libssl 2141.158Splunky 2151.158Splunky.if (${MKLDAP} != "no") 2161.158SplunkySUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ... 2171.158Splunky.endif 2181.158Splunky 2191.257Schs.if (${MKZFS} != "no") 2201.257SchsSUBDIR+= ../external/cddl/osnet/lib/libzfs 2211.257Schs.endif 2221.257Schs 2231.256SsevanSUBDIR+= ../libexec/httpd/libbozohttpd # depends on libssl & libcrypto 2241.256Ssevan 2251.124Slukem#==================== 3rd library dependency barrier ==================== 2261.124SlukemSUBDIR+= .WAIT 2271.124Slukem 2281.255SchristosSUBDIR+= ../crypto/external/bsd/netpgp/bindings/lua # depends on netpgp/lib 2291.260SchristosSUBDIR+= ../external/mpl/bind/lib # depends on heimdal, libcrypto 2301.251Sriastrad.if ${MKUNBOUND} != "no" 2311.246SchristosSUBDIR+= ../external/bsd/unbound/lib # depends on libcrypto 2321.246Schristos.endif 2331.204Sjoerg 2341.230Schristos.if ${MKDTRACE} != "no" 2351.230SchristosSUBDIR+= ../external/cddl/osnet/lib/libdtrace # depends on libproc 2361.230Schristos.endif 2371.230Schristos 2381.187Schristos.if (${MKRUMP} != "no") 2391.143SpookaSUBDIR+= librumpdev # depends on librump 2401.128SpookaSUBDIR+= librumpnet # depends on librump 2411.130SpookaSUBDIR+= librumpvfs # depends on librump 2421.187Schristos.endif 2431.126Spooka 2441.175Splunky.if (${MKPAM} != "no") 2451.175SplunkySUBDIR+= libpam # depends on heimdal 2461.175Splunky.endif 2471.175Splunky 2481.175SplunkySUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl 2491.181SjoergSUBDIR+= ../external/bsd/mdocml/lib 2501.181Sjoerg 2511.187Schristos.if (${MKRUMP} != "no") 2521.126Spooka#==================== 4th library dependency barrier ==================== 2531.126SpookaSUBDIR+= .WAIT 2541.158Splunky 2551.158SplunkySUBDIR+= libukfs # depends on librumpvfs, librump 2561.131Spooka 2571.190Schristos.if (${MKTPM} != "no") 2581.190SchristosSUBDIR+= ../crypto/external/cpl/trousers/lib 2591.190Schristos.endif 2601.190Schristos 2611.131Spooka#==================== 5th library dependency barrier ==================== 2621.131SpookaSUBDIR+= .WAIT 2631.158Splunky 2641.158SplunkySUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs 2651.188Sjoerg 2661.192Schristos.if (${MKTPM} != "no") 2671.192SchristosSUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers 2681.192Schristos.endif 2691.192Schristos 2701.188Sjoerg.if !defined(BSD_MK_COMPAT_FILE) 2711.188SjoergSUBDIR+= ../sys/rump/dev/lib 2721.188SjoergSUBDIR+= ../sys/rump/fs/lib 2731.188SjoergSUBDIR+= ../sys/rump/kern/lib 2741.188SjoergSUBDIR+= ../sys/rump/net/lib 2751.188Sjoerg.endif 2761.187Schristos.endif 2771.158Splunky 2781.178Smbalmer# Lua bindings come last, they might depend on anything 2791.178SmbalmerSUBDIR+= lua 2801.178Smbalmer 2811.210Schristos# Needed by rump and rescue which are outside the smbfs tree 2821.210SchristosSUBDIR+= ../external/bsd/smbfs/lib 2831.210Schristos 2841.251Sriastrad.for S in ${SUBDIR} 2851.251Sriastrad.if ${S} != ".WAIT" 2861.251SriastradSUBLIB_${S}!= cd ${S} && ${MAKE} -V LIB 2871.251SriastradSUBDEP_${S}!= cd ${S} && ${MAKE} -V LIBDPLIBS 2881.251Sriastrad.endif 2891.251Sriastrad.endfor 2901.251Sriastrad 2911.251Sriastradshowdeps: 2921.251Sriastrad.for S in ${SUBDIR} 2931.251Sriastrad.if ${S} != ".WAIT" 2941.251Sriastrad.for DL DD in ${SUBDEP_${S}} 2951.251Sriastrad @echo ${S} ${SUBLIB_${S}} ${DL} ${DD:C,^${.CURDIR}/,,} 2961.251Sriastrad.endfor 2971.251Sriastrad.endif 2981.251Sriastrad.endfor 2991.251Sriastrad 3001.195Sjoerg.include <bsd.buildinstall.mk> 3011.1Scgd.include <bsd.subdir.mk> 302