Makefile revision 1.251
11.251Sriastrad#	$NetBSD: Makefile,v 1.251 2017/05/21 15:28:41 riastradh 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.215Smrg. if !defined(MLIBDIR)
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.126SpookaSUBDIR+=	librumpuser	# depends on libpthread
1281.175SplunkySUBDIR+=	librumphijack	# depends on librumpclient and libpthread
1291.187Schristos.endif
1301.126Spooka
1311.161Srmind.if (${MKNPF} != "no")
1321.161SrmindSUBDIR+=	libnpf		# depends on libprop
1331.161Srmind.endif
1341.161Srmind
1351.158SplunkySUBDIR+=	../crypto/external/bsd/openssl/lib # depends on libcrypt
1361.155SplunkySUBDIR+=	../external/bsd/file/lib	# depends on libz
1371.155Splunky
1381.155Splunky.if (${MKISCSI} != "no")
1391.155SplunkySUBDIR+=	../external/bsd/iscsi/lib	# depends on libpthread
1401.155Splunky.endif
1411.155Splunky
1421.224Smatt.if (${MKZFS} != "no")
1431.224SmattSUBDIR+=        ../external/cddl/osnet/lib/libzfs
1441.224SmattSUBDIR+=        ../external/cddl/osnet/lib/libzpool
1451.224Smatt.endif
1461.224Smatt
1471.163Smatt.if (${MKLVM} != "no")
1481.163SmattSUBDIR+=	../external/gpl2/lvm2/lib	# depends on libprop
1491.163Smatt.endif
1501.163Smatt
1511.155Splunky.if (${MKBINUTILS} != "no")
1521.239SchristosSUBDIR+=	../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/lib	# libbfd depends on libz
1531.155Splunky.endif
1541.155Splunky
1551.202Sjoerg.if (${MKLIBCXX} != "no")
1561.202SjoergSUBDIR+=	../external/bsd/libc++
1571.202Sjoerg.endif
1581.202Sjoerg
1591.203Sjoerg.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
1601.211SmrgSUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
1611.211SmrgSUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++
1621.155Splunky.endif
1631.222Schristos
1641.222Schristos#==================== 2nd library dependency barrier ====================
1651.222SchristosSUBDIR+=	.WAIT
1661.222Schristos
1671.245Schristos.for sanitizer in asan ubsan
1681.245Schristos.if exists(../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer})
1691.245SchristosSUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer}
1701.245Schristos.endif
1711.245Schristos.endfor
1721.155Splunky
1731.221SmrgSUBDIR+=	../external/bsd/libarchive/lib	# depends on libxz
1741.221Smrg
1751.208Smrg.if (${MKNPF} != "no")
1761.208SmrgSUBDIR+=	npf		# depends on libnpf
1771.208Smrg.endif
1781.208Smrg
1791.185Schristos.if (${MKATF} != "no")
1801.186SchristosSUBDIR+=	../external/bsd/atf/lib		# depends on libstdc++
1811.185Schristos.endif
1821.185Schristos
1831.198Sjmmv.if (${MKKYUA} != "no")
1841.198SjmmvSUBDIR+=	../external/bsd/lutok/lib	# depends on lua and libstdc++
1851.198Sjmmv.endif
1861.198Sjmmv
1871.158SplunkySUBDIR+=	libform		# depends on libcurses
1881.175SplunkySUBDIR+=	libmenu		# depends on libcurses
1891.236SkamilSUBDIR+=	libpanel	# depends on libcurses
1901.251SriastradSUBDIR+=	libradius	# depends on libcrypto
1911.187Schristos.if (${MKRUMP} != "no")
1921.175SplunkySUBDIR+=	librump		# depends on librumpuser
1931.187Schristos.endif
1941.158Splunky
1951.100Schristos.if (${MKKERBEROS} != "no")
1961.166SelricSUBDIR+=	../crypto/external/bsd/heimdal/lib	# depends on libcrypto
1971.166Selric							# libedit, libterminfo,
1981.100Schristos.endif
1991.100Schristos
2001.158SplunkySUBDIR+=	../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
2011.158SplunkySUBDIR+=	../crypto/external/bsd/netpgp/lib  # depends on libcrypto, ...
2021.199SchristosSUBDIR+=	../external/bsd/libevent/lib	# depends on libcrypto
2031.235Schristos.if ${MKDTRACE} != "no"
2041.234SchristosSUBDIR+=	../external/bsd/libproc/lib	# depends on libstdc++, libctf
2051.234Schristos.endif
2061.158SplunkySUBDIR+=	../external/bsd/fetch/lib	# depends on libssl
2071.158Splunky
2081.158Splunky.if (${MKLDAP} != "no")
2091.158SplunkySUBDIR+=	../external/bsd/openldap/lib	# depends on libcrypto, ...
2101.158Splunky.endif
2111.158Splunky
2121.124Slukem#==================== 3rd library dependency barrier ====================
2131.124SlukemSUBDIR+=	.WAIT
2141.124Slukem
2151.204SjoergSUBDIR+=	../external/bsd/bind/lib	# depends on heimdal, libcrypto
2161.251Sriastrad.if ${MKUNBOUND} != "no"
2171.246SchristosSUBDIR+=	../external/bsd/unbound/lib	# depends on libcrypto
2181.246Schristos.endif
2191.204Sjoerg
2201.230Schristos.if ${MKDTRACE} != "no"
2211.230SchristosSUBDIR+=        ../external/cddl/osnet/lib/libdtrace	# depends on libproc
2221.230Schristos.endif
2231.230Schristos
2241.187Schristos.if (${MKRUMP} != "no")
2251.143SpookaSUBDIR+=	librumpdev	# depends on librump
2261.128SpookaSUBDIR+=	librumpnet	# depends on librump
2271.130SpookaSUBDIR+=	librumpvfs	# depends on librump
2281.187Schristos.endif
2291.126Spooka
2301.175Splunky.if (${MKPAM} != "no")
2311.175SplunkySUBDIR+=	libpam		# depends on heimdal
2321.175Splunky.endif
2331.175Splunky
2341.175SplunkySUBDIR+=	../crypto/external/bsd/libsaslc	# depends on heimdal, openssl
2351.181SjoergSUBDIR+=	../external/bsd/mdocml/lib
2361.181Sjoerg
2371.187Schristos.if (${MKRUMP} != "no")
2381.126Spooka#==================== 4th library dependency barrier ====================
2391.126SpookaSUBDIR+=	.WAIT
2401.158Splunky
2411.158SplunkySUBDIR+=	libukfs		# depends on librumpvfs, librump
2421.131Spooka
2431.190Schristos.if (${MKTPM} != "no")
2441.190SchristosSUBDIR+=	../crypto/external/cpl/trousers/lib
2451.190Schristos.endif
2461.190Schristos
2471.131Spooka#==================== 5th library dependency barrier ====================
2481.131SpookaSUBDIR+=	.WAIT
2491.158Splunky
2501.158SplunkySUBDIR+=	libp2k		# depends on libukfs, librumpvfs, libpuffs
2511.188Sjoerg
2521.192Schristos.if (${MKTPM} != "no")
2531.192SchristosSUBDIR+=	../crypto/external/cpl/tpm-tools/lib	# depends on trousers
2541.192Schristos.endif
2551.192Schristos
2561.188Sjoerg.if !defined(BSD_MK_COMPAT_FILE)
2571.188SjoergSUBDIR+=	../sys/rump/dev/lib
2581.188SjoergSUBDIR+=	../sys/rump/fs/lib
2591.188SjoergSUBDIR+=	../sys/rump/kern/lib
2601.188SjoergSUBDIR+=	../sys/rump/net/lib
2611.188Sjoerg.endif
2621.187Schristos.endif
2631.158Splunky
2641.178Smbalmer# Lua bindings come last, they might depend on anything
2651.178SmbalmerSUBDIR+=	lua
2661.178Smbalmer
2671.210Schristos# Needed by rump and rescue which are outside the smbfs tree
2681.210SchristosSUBDIR+=	../external/bsd/smbfs/lib
2691.210Schristos
2701.251Sriastrad.for S in ${SUBDIR}
2711.251Sriastrad.if ${S} != ".WAIT"
2721.251SriastradSUBLIB_${S}!=	cd ${S} && ${MAKE} -V LIB
2731.251SriastradSUBDEP_${S}!=	cd ${S} && ${MAKE} -V LIBDPLIBS
2741.251Sriastrad.endif
2751.251Sriastrad.endfor
2761.251Sriastrad
2771.251Sriastradshowdeps:
2781.251Sriastrad.for S in ${SUBDIR}
2791.251Sriastrad.if ${S} != ".WAIT"
2801.251Sriastrad.for DL DD in ${SUBDEP_${S}}
2811.251Sriastrad	@echo ${S} ${SUBLIB_${S}} ${DL} ${DD:C,^${.CURDIR}/,,}
2821.251Sriastrad.endfor
2831.251Sriastrad.endif
2841.251Sriastrad.endfor
2851.251Sriastrad
2861.195Sjoerg.include <bsd.buildinstall.mk>
2871.1Scgd.include <bsd.subdir.mk>
288