Makefile revision 1.257
11.257Schs# $NetBSD: Makefile,v 1.257 2018/05/28 21:05:00 chs 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.207Sjoerg libintl libipsec libkvm libm \ 271.158Splunky libossaudio libpci libpmc 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.155Splunky.if (${MKMDNS} != "no") 541.155SplunkySUBDIR+= ../external/apache2/mDNSResponder/lib 551.155Splunky.endif 561.155Splunky 571.155SplunkySUBDIR+= ../external/bsd/am-utils/lib 581.155Splunky 591.155SplunkySUBDIR+= ../external/bsd/flex/lib 601.180SchristosSUBDIR+= ../external/bsd/tre/lib 611.212SchristosSUBDIR+= ../external/bsd/elftoolchain/lib/libelf 621.163SmattSUBDIR+= ../external/bsd/liblzf/lib 631.158SplunkySUBDIR+= ../external/bsd/libpcap/lib 641.155Splunky 651.214Splunky.if ${MKSLJIT} != "no" 661.214SplunkySUBDIR+= ../external/bsd/sljit/lib 671.214SplunkySUBDIR+= libbpfjit 681.214Splunky.endif 691.214Splunky 701.224Smatt.if (${MKZFS} != "no") 711.224SmattSUBDIR+= ../external/cddl/osnet/lib/libavl 721.224SmattSUBDIR+= ../external/cddl/osnet/lib/libnvpair 731.224SmattSUBDIR+= ../external/cddl/osnet/lib/libumem 741.224SmattSUBDIR+= ../external/cddl/osnet/lib/libuutil 751.224Smatt.endif 761.224Smatt 771.182StronSUBDIR+= ../external/mit/expat/lib 781.155Splunky 791.179SjoergSUBDIR+= ../external/public-domain/sqlite/lib 801.155Splunky 811.238SchristosSUBDIR+= ../external/gpl2/libmalloc 821.155Splunky 831.155Splunky.if (${MKGCC} != "no") 841.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc 851.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp 861.173Smrg# Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5 871.173Smrg# specific build area, but we get better parallelism this way. 881.215Smrg# We don't build compat versions of these. 891.252Smrg. if !defined(MLIBDIR) && (${MKGCCCMDS} != "no") 901.172SmattSUBDIR+= ../external/lgpl3/gmp/lib/libgmp 911.174SplunkySUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr 921.209SmrgSUBDIR+= ../external/lgpl3/mpc/lib/libmpc 931.174Splunky. endif 941.155Splunky.endif 951.144Schristos 961.89Slukem# 971.89Slukem# Libraries that depend upon any listed previously 981.93Slukem# (and those that depend upon these [and ...]) 991.89Slukem# 1001.97Schristos#==================== 1st library dependency barrier ==================== 1011.97SchristosSUBDIR+= .WAIT 1021.97Schristos 1031.235Schristos.if ${MKDTRACE} != "no" 1041.229SchristosSUBDIR+= ../external/bsd/librtld_db/lib # depends on libutil 1051.234Schristos.endif 1061.229Schristos 1071.240Sriastrad.if ${MKCTF} != "no" 1081.227SchristosSUBDIR+= ../external/cddl/osnet/lib/libctf 1091.227Schristos.endif 1101.227Schristos 1111.221SmrgSUBDIR+= ../external/public-domain/xz/lib # depends on libpthread 1121.208SmrgSUBDIR+= ../crypto/external/bsd/netpgp/libmj 1131.208SmrgSUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz 1141.237SchristosSUBDIR+= ../external/bsd/blacklist/lib # depends on libpthread 1151.212SchristosSUBDIR+= ../external/bsd/elftoolchain/lib/libdwarf # depends on libelf 1161.208SmrgSUBDIR+= ../external/mit/lua/lib # depends on libm 1171.158SplunkySUBDIR+= libcurses # depends on libterminfo 1181.162ShaadSUBDIR+= libdm # depends on libprop 1191.158SplunkySUBDIR+= libedit # depends on libterminfo 1201.184SmattSUBDIR+= libexecinfo # depends on libelf 1211.176SdyoungSUBDIR+= libppath # depends on libprop 1221.175SplunkySUBDIR+= libperfuse # depends on libpuffs 1231.165SbouyerSUBDIR+= libquota # depends on libprop and librpcsvc 1241.113SpookaSUBDIR+= librefuse # depends on libpuffs 1251.207SjoergSUBDIR+= libisns # depends on libpthread 1261.187Schristos.if (${MKRUMP} != "no") 1271.253SchristosSUBDIR+= librumphijack # depends on librumpclient and libpthread 1281.253SchristosSUBDIR+= librumpres # depends on librumpclient 1291.126SpookaSUBDIR+= librumpuser # depends on libpthread 1301.187Schristos.endif 1311.126Spooka 1321.161Srmind.if (${MKNPF} != "no") 1331.161SrmindSUBDIR+= libnpf # depends on libprop 1341.161Srmind.endif 1351.161Srmind 1361.254SchristosSUBDIR+= ../crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib # depends on libcrypt 1371.155SplunkySUBDIR+= ../external/bsd/file/lib # depends on libz 1381.155Splunky 1391.155Splunky.if (${MKISCSI} != "no") 1401.155SplunkySUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread 1411.155Splunky.endif 1421.155Splunky 1431.224Smatt.if (${MKZFS} != "no") 1441.257SchsSUBDIR+= ../external/cddl/osnet/lib/libzfs_core 1451.224SmattSUBDIR+= ../external/cddl/osnet/lib/libzpool 1461.224Smatt.endif 1471.224Smatt 1481.163Smatt.if (${MKLVM} != "no") 1491.163SmattSUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop 1501.163Smatt.endif 1511.163Smatt 1521.155Splunky.if (${MKBINUTILS} != "no") 1531.239SchristosSUBDIR+= ../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/lib # libbfd depends on libz 1541.155Splunky.endif 1551.155Splunky 1561.202Sjoerg.if (${MKLIBCXX} != "no") 1571.202SjoergSUBDIR+= ../external/bsd/libc++ 1581.202Sjoerg.endif 1591.202Sjoerg 1601.203Sjoerg.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no") 1611.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3 1621.211SmrgSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++ 1631.155Splunky.endif 1641.222Schristos 1651.222Schristos#==================== 2nd library dependency barrier ==================== 1661.222SchristosSUBDIR+= .WAIT 1671.222Schristos 1681.245Schristos.for sanitizer in asan ubsan 1691.245Schristos.if exists(../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer}) 1701.245SchristosSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer} 1711.245Schristos.endif 1721.245Schristos.endfor 1731.155Splunky 1741.221SmrgSUBDIR+= ../external/bsd/libarchive/lib # depends on libxz 1751.221Smrg 1761.208Smrg.if (${MKNPF} != "no") 1771.208SmrgSUBDIR+= npf # depends on libnpf 1781.208Smrg.endif 1791.208Smrg 1801.185Schristos.if (${MKATF} != "no") 1811.186SchristosSUBDIR+= ../external/bsd/atf/lib # depends on libstdc++ 1821.185Schristos.endif 1831.185Schristos 1841.198Sjmmv.if (${MKKYUA} != "no") 1851.198SjmmvSUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++ 1861.198Sjmmv.endif 1871.198Sjmmv 1881.158SplunkySUBDIR+= libform # depends on libcurses 1891.175SplunkySUBDIR+= libmenu # depends on libcurses 1901.236SkamilSUBDIR+= libpanel # depends on libcurses 1911.251SriastradSUBDIR+= libradius # depends on libcrypto 1921.187Schristos.if (${MKRUMP} != "no") 1931.175SplunkySUBDIR+= librump # depends on librumpuser 1941.187Schristos.endif 1951.158Splunky 1961.100Schristos.if (${MKKERBEROS} != "no") 1971.166SelricSUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto 1981.166Selric # libedit, libterminfo, 1991.100Schristos.endif 2001.100Schristos 2011.158SplunkySUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz 2021.158SplunkySUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ... 2031.199SchristosSUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto 2041.235Schristos.if ${MKDTRACE} != "no" 2051.234SchristosSUBDIR+= ../external/bsd/libproc/lib # depends on libstdc++, libctf 2061.234Schristos.endif 2071.158SplunkySUBDIR+= ../external/bsd/fetch/lib # depends on libssl 2081.158Splunky 2091.158Splunky.if (${MKLDAP} != "no") 2101.158SplunkySUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ... 2111.158Splunky.endif 2121.158Splunky 2131.257Schs.if (${MKZFS} != "no") 2141.257SchsSUBDIR+= ../external/cddl/osnet/lib/libzfs 2151.257Schs.endif 2161.257Schs 2171.256SsevanSUBDIR+= ../libexec/httpd/libbozohttpd # depends on libssl & libcrypto 2181.256Ssevan 2191.124Slukem#==================== 3rd library dependency barrier ==================== 2201.124SlukemSUBDIR+= .WAIT 2211.124Slukem 2221.255SchristosSUBDIR+= ../crypto/external/bsd/netpgp/bindings/lua # depends on netpgp/lib 2231.204SjoergSUBDIR+= ../external/bsd/bind/lib # depends on heimdal, libcrypto 2241.251Sriastrad.if ${MKUNBOUND} != "no" 2251.246SchristosSUBDIR+= ../external/bsd/unbound/lib # depends on libcrypto 2261.246Schristos.endif 2271.204Sjoerg 2281.230Schristos.if ${MKDTRACE} != "no" 2291.230SchristosSUBDIR+= ../external/cddl/osnet/lib/libdtrace # depends on libproc 2301.230Schristos.endif 2311.230Schristos 2321.187Schristos.if (${MKRUMP} != "no") 2331.143SpookaSUBDIR+= librumpdev # depends on librump 2341.128SpookaSUBDIR+= librumpnet # depends on librump 2351.130SpookaSUBDIR+= librumpvfs # depends on librump 2361.187Schristos.endif 2371.126Spooka 2381.175Splunky.if (${MKPAM} != "no") 2391.175SplunkySUBDIR+= libpam # depends on heimdal 2401.175Splunky.endif 2411.175Splunky 2421.175SplunkySUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl 2431.181SjoergSUBDIR+= ../external/bsd/mdocml/lib 2441.181Sjoerg 2451.187Schristos.if (${MKRUMP} != "no") 2461.126Spooka#==================== 4th library dependency barrier ==================== 2471.126SpookaSUBDIR+= .WAIT 2481.158Splunky 2491.158SplunkySUBDIR+= libukfs # depends on librumpvfs, librump 2501.131Spooka 2511.190Schristos.if (${MKTPM} != "no") 2521.190SchristosSUBDIR+= ../crypto/external/cpl/trousers/lib 2531.190Schristos.endif 2541.190Schristos 2551.131Spooka#==================== 5th library dependency barrier ==================== 2561.131SpookaSUBDIR+= .WAIT 2571.158Splunky 2581.158SplunkySUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs 2591.188Sjoerg 2601.192Schristos.if (${MKTPM} != "no") 2611.192SchristosSUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers 2621.192Schristos.endif 2631.192Schristos 2641.188Sjoerg.if !defined(BSD_MK_COMPAT_FILE) 2651.188SjoergSUBDIR+= ../sys/rump/dev/lib 2661.188SjoergSUBDIR+= ../sys/rump/fs/lib 2671.188SjoergSUBDIR+= ../sys/rump/kern/lib 2681.188SjoergSUBDIR+= ../sys/rump/net/lib 2691.188Sjoerg.endif 2701.187Schristos.endif 2711.158Splunky 2721.178Smbalmer# Lua bindings come last, they might depend on anything 2731.178SmbalmerSUBDIR+= lua 2741.178Smbalmer 2751.210Schristos# Needed by rump and rescue which are outside the smbfs tree 2761.210SchristosSUBDIR+= ../external/bsd/smbfs/lib 2771.210Schristos 2781.251Sriastrad.for S in ${SUBDIR} 2791.251Sriastrad.if ${S} != ".WAIT" 2801.251SriastradSUBLIB_${S}!= cd ${S} && ${MAKE} -V LIB 2811.251SriastradSUBDEP_${S}!= cd ${S} && ${MAKE} -V LIBDPLIBS 2821.251Sriastrad.endif 2831.251Sriastrad.endfor 2841.251Sriastrad 2851.251Sriastradshowdeps: 2861.251Sriastrad.for S in ${SUBDIR} 2871.251Sriastrad.if ${S} != ".WAIT" 2881.251Sriastrad.for DL DD in ${SUBDEP_${S}} 2891.251Sriastrad @echo ${S} ${SUBLIB_${S}} ${DL} ${DD:C,^${.CURDIR}/,,} 2901.251Sriastrad.endfor 2911.251Sriastrad.endif 2921.251Sriastrad.endfor 2931.251Sriastrad 2941.195Sjoerg.include <bsd.buildinstall.mk> 2951.1Scgd.include <bsd.subdir.mk> 296