NetBSD/lib/Makefile

318 lines
8.6 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.294 2022/05/30 15:06:55 rin Exp $
1993-08-01 09:37:30 +04:00
# from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91
1993-03-21 12:45:37 +03:00
.include <bsd.own.mk>
SUBDIR= csu .WAIT
.if (${MKGCC} != "no")
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgcc .WAIT
.endif
SUBDIR+= libc
SUBDIR+= .WAIT
#
# The SUBDIRs above are included here for completeness but should be built
# and installed prior to make(dependall) in this file, as libraries listed
# below will depend on versions from DESTDIR only.
#
SUBDIR+= i18n_module
SUBDIR+= libarch \
libbluetooth libbsdmalloc libbz2 \
libcompat libcrypt \
libintl libipsec libkvm libm \
libossaudio libpci libposix libprop libpthread \
libpuffs libresolv librmt librpcsvc librt \
2012-08-08 18:01:16 +04:00
libtelnet libterminfo \
libusbhid libutil liby libz
2013-08-21 07:18:05 +04:00
.if !defined(BSD_MK_COMPAT_FILE)
SUBDIR+= libkern
.endif
.if (${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc")
SUBDIR+= libc_aligned
.endif
.if (${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "aarch64")
2013-04-27 12:43:19 +04:00
LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
LIBC_MACHINE_CPU?=${MACHINE_CPU}
.if ${LIBC_MACHINE_CPU} == "arm" && empty(LIBC_MACHINE_ARCH:M*hf*)
SUBDIR+= libc_vfp
.endif
2013-04-27 12:43:19 +04:00
.endif
2021-04-26 02:43:20 +03:00
.if ${MACHINE_MIPS64}
SUBDIR+= libc_fp
.endif
2012-08-08 18:01:16 +04:00
.if (${MKRUMP} != "no")
SUBDIR+= librumpclient
.endif
.if (${MKSKEY} != "no")
SUBDIR+= libskey
.endif
.if ${HAVE_NVMM:Uno} == "yes" && !defined(MLIBDIR)
SUBDIR+= libnvmm
.endif
.if (${MKARGON2} != "no")
SUBDIR+= ../external/apache2/argon2/lib/libargon2
.endif
.if (${MKMDNS} != "no")
SUBDIR+= ../external/apache2/mDNSResponder/lib
.endif
SUBDIR+= ../external/bsd/am-utils/lib
SUBDIR+= ../external/bsd/flex/lib
2011-11-06 02:40:01 +04:00
SUBDIR+= ../external/bsd/tre/lib
SUBDIR+= ../external/bsd/elftoolchain/lib
SUBDIR+= ../external/bsd/liblzf/lib
SUBDIR+= ../external/bsd/libpcap/lib
.if ${MKSLJIT} != "no"
SUBDIR+= ../external/bsd/sljit/lib
SUBDIR+= libbpfjit
.endif
2018-09-08 17:11:41 +03:00
SUBDIR+= ../external/bsd/libnv/lib
2015-06-22 09:03:20 +03:00
.if (${MKZFS} != "no")
SUBDIR+= ../external/cddl/osnet/lib/libavl
SUBDIR+= ../external/cddl/osnet/lib/libnvpair
SUBDIR+= ../external/cddl/osnet/lib/libumem
SUBDIR+= ../external/cddl/osnet/lib/libuutil
.endif
SUBDIR+= ../external/mit/expat/lib
SUBDIR+= ../external/gpl2/libmalloc
SUBDIR+= ../external/bsd/jemalloc/lib
.if (${MKGCC} != "no")
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp
# Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
# specific build area, but we get better parallelism this way.
# We don't build compat versions of these.
. if !defined(MLIBDIR) && (${MKGCCCMDS} != "no")
SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
2013-11-28 16:08:56 +04:00
SUBDIR+= ../external/lgpl3/mpc/lib/libmpc
. endif
.endif
2009-10-26 04:18:46 +03:00
#
# Libraries that depend upon any listed previously
# (and those that depend upon these [and ...])
#
#==================== 1st library dependency barrier ====================
SUBDIR+= .WAIT
.if ${MKDTRACE} != "no"
SUBDIR+= ../external/bsd/librtld_db/lib # depends on libutil
.endif
.if ${MKCTF} != "no"
SUBDIR+= ../external/cddl/osnet/lib/libctf
.endif
SUBDIR+= ../external/public-domain/xz/lib # depends on libpthread
SUBDIR+= ../crypto/external/bsd/netpgp/libmj
SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz
2020-06-15 04:57:29 +03:00
SUBDIR+= ../external/bsd/blocklist/lib # depends on libpthread
SUBDIR+= ../external/mit/lua/lib # depends on libm
SUBDIR+= ../external/public-domain/sqlite/lib # depends on libm
SUBDIR+= libcurses # depends on libterminfo
SUBDIR+= libdm # depends on libprop
SUBDIR+= libedit # depends on libterminfo
SUBDIR+= libexecinfo # depends on libelf
SUBDIR+= libppath # depends on libprop
SUBDIR+= libperfuse # depends on libpuffs
SUBDIR+= libquota # depends on libprop and librpcsvc
SUBDIR+= librefuse # depends on libpuffs
SUBDIR+= libisns # depends on libpthread
2012-08-08 18:01:16 +04:00
.if (${MKRUMP} != "no")
SUBDIR+= librumphijack # depends on librumpclient and libpthread
SUBDIR+= librumpres # depends on librumpclient
SUBDIR+= librumpuser # depends on libpthread
2012-08-08 18:01:16 +04:00
.endif
.if (${MKNPF} != "no")
2018-09-08 17:11:41 +03:00
SUBDIR+= libnpf # depends on libnv
.endif
2018-02-04 06:19:51 +03:00
SUBDIR+= ../crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib # depends on libcrypt
.if (${MKISCSI} != "no")
SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
.endif
2015-06-22 09:03:20 +03:00
.if (${MKZFS} != "no")
SUBDIR+= ../external/cddl/osnet/lib/libzfs_core
2015-06-22 09:03:20 +03:00
SUBDIR+= ../external/cddl/osnet/lib/libzpool
.endif
.if (${MKLVM} != "no")
SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
.endif
.if (${MKBINUTILS} != "no")
2016-01-26 20:47:35 +03:00
SUBDIR+= ../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/lib # libbfd depends on libz
.endif
2013-04-28 03:02:17 +04:00
.if (${MKLIBCXX} != "no")
SUBDIR+= ../external/bsd/libc++
.endif
.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++
.endif
.if (${MKLLVMRT} != "no" && (!defined(MLIBDIR) || ${MKCOMPATX11} != "no"))
SUBDIR+= ../external/apache2/llvm/include
.endif
2020-03-03 03:37:05 +03:00
SUBDIR+= ../external/mit/libcbor/lib
2020-05-24 22:29:19 +03:00
SUBDIR+= ../external/mit/libuv/lib
#==================== 2nd library dependency barrier ====================
SUBDIR+= .WAIT
SUBDIR+= libwrap
.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
2018-06-28 13:14:01 +03:00
.for sanitizer in asan lsan ubsan
2016-06-05 04:23:58 +03:00
.if exists(../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer})
SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer}
.endif
.endfor
.endif
.if (${MKLLVMRT} != "no" && (!defined(MLIBDIR) || ${MKCOMPATX11} != "no"))
SUBDIR+= ../external/apache2/llvm/librt
.endif
SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz
2019-12-18 05:46:21 +03:00
SUBDIR+= ../external/bsd/file/lib # depends on libz, libbz2, libxz
.if (${MKNPF} != "no")
SUBDIR+= npf # depends on libnpf
.endif
2012-07-12 23:11:06 +04:00
.if (${MKATF} != "no")
SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
2012-07-12 23:11:06 +04:00
.endif
.if (${MKKYUA} != "no")
SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++
.endif
SUBDIR+= libform # depends on libcurses
SUBDIR+= libmenu # depends on libcurses
SUBDIR+= libpanel # depends on libcurses
Remove MKCRYPTO option. Originally, MKCRYPTO was introduced because the United States classified cryptography as a munition and restricted its export. The export controls were substantially relaxed fifteen years ago, and are essentially irrelevant for software with published source code. In the intervening time, nobody bothered to remove the option after its motivation -- the US export restriction -- was eliminated. I'm not aware of any other operating system that has a similar option; I expect it is mainly out of apathy for churn that we still have it. Today, cryptography is an essential part of modern computing -- you can't use the internet responsibly without cryptography. The position of the TNF board of directors is that TNF makes no representation that MKCRYPTO=no satisfies any country's cryptography regulations. My personal position is that the availability of cryptography is a basic human right; that any local laws restricting it to a privileged few are fundamentally immoral; and that it is wrong for developers to spend effort crippling cryptography to work around such laws. As proposed on tech-crypto, tech-security, and tech-userlevel to no objections: https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html P.S. Reviewing all the uses of MKCRYPTO in src revealed a lot of *bad* crypto that was conditional on it, e.g. DES in telnet... That should probably be removed too, but on the grounds that it is bad, not on the grounds that it is (nominally) crypto.
2017-05-21 18:28:36 +03:00
SUBDIR+= libradius # depends on libcrypto
2012-08-08 18:01:16 +04:00
.if (${MKRUMP} != "no")
SUBDIR+= librump # depends on librumpuser
2012-08-08 18:01:16 +04:00
.endif
.if (${MKKERBEROS} != "no")
SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
# libedit, libterminfo,
.endif
2020-03-03 03:37:05 +03:00
SUBDIR+= ../external/bsd/libfido2/lib # depends on libcbor
SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
2013-04-11 23:06:04 +04:00
SUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto
.if ${MKDTRACE} != "no"
SUBDIR+= ../external/bsd/libproc/lib # depends on libstdc++, libctf
.endif
SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
.if (${MKLDAP} != "no")
SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
.endif
.if (${MKZFS} != "no")
SUBDIR+= ../external/cddl/osnet/lib/libzfs
.endif
SUBDIR+= ../libexec/httpd/libbozohttpd # depends on libssl & libcrypto
#==================== 3rd library dependency barrier ====================
SUBDIR+= .WAIT
2020-03-03 03:37:05 +03:00
SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz,
# libfido2
SUBDIR+= ../crypto/external/bsd/netpgp/bindings/lua # depends on netpgp/lib
2018-08-12 16:01:55 +03:00
SUBDIR+= ../external/mpl/bind/lib # depends on heimdal, libcrypto
2020-05-24 22:29:19 +03:00
# libuv
Remove MKCRYPTO option. Originally, MKCRYPTO was introduced because the United States classified cryptography as a munition and restricted its export. The export controls were substantially relaxed fifteen years ago, and are essentially irrelevant for software with published source code. In the intervening time, nobody bothered to remove the option after its motivation -- the US export restriction -- was eliminated. I'm not aware of any other operating system that has a similar option; I expect it is mainly out of apathy for churn that we still have it. Today, cryptography is an essential part of modern computing -- you can't use the internet responsibly without cryptography. The position of the TNF board of directors is that TNF makes no representation that MKCRYPTO=no satisfies any country's cryptography regulations. My personal position is that the availability of cryptography is a basic human right; that any local laws restricting it to a privileged few are fundamentally immoral; and that it is wrong for developers to spend effort crippling cryptography to work around such laws. As proposed on tech-crypto, tech-security, and tech-userlevel to no objections: https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html P.S. Reviewing all the uses of MKCRYPTO in src revealed a lot of *bad* crypto that was conditional on it, e.g. DES in telnet... That should probably be removed too, but on the grounds that it is bad, not on the grounds that it is (nominally) crypto.
2017-05-21 18:28:36 +03:00
.if ${MKUNBOUND} != "no"
2016-08-20 14:21:50 +03:00
SUBDIR+= ../external/bsd/unbound/lib # depends on libcrypto
.endif
2015-09-24 21:37:33 +03:00
.if ${MKDTRACE} != "no"
SUBDIR+= ../external/cddl/osnet/lib/libdtrace # depends on libproc
.endif
2012-08-08 18:01:16 +04:00
.if (${MKRUMP} != "no")
SUBDIR+= librumpdev # depends on librump
2008-10-16 13:44:12 +04:00
SUBDIR+= librumpnet # depends on librump
SUBDIR+= librumpvfs # depends on librump
2012-08-08 18:01:16 +04:00
.endif
SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
SUBDIR+= ../external/bsd/mdocml/lib
#==================== 4th library dependency barrier ====================
SUBDIR+= .WAIT
.if (${MKPAM} != "no")
2020-03-03 17:29:57 +03:00
SUBDIR+= libpam # depends on heimdal, libssh
.endif
.if (${MKRUMP} != "no")
SUBDIR+= libukfs # depends on librumpvfs, librump
.endif
2008-11-27 19:14:46 +03:00
2012-11-04 20:28:11 +04:00
.if (${MKTPM} != "no")
SUBDIR+= ../crypto/external/cpl/trousers/lib
.endif
2008-11-27 19:14:46 +03:00
#==================== 5th library dependency barrier ====================
SUBDIR+= .WAIT
.if (${MKPAM} != "no")
SUBDIR+= ../external/bsd/pam-u2f/lib # depends on libpam
.endif
2020-03-18 03:37:29 +03:00
.if (${MKRUMP} != "no")
SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
2020-03-18 03:37:29 +03:00
.endif
.if (${MKTPM} != "no")
SUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers
.endif
.if (${MKRUMP} != "no")
.if !defined(BSD_MK_COMPAT_FILE)
SUBDIR+= ../sys/rump/dev/lib
SUBDIR+= ../sys/rump/fs/lib
SUBDIR+= ../sys/rump/kern/lib
SUBDIR+= ../sys/rump/net/lib
.endif
2012-08-08 18:01:16 +04:00
.endif
2011-10-08 01:33:56 +04:00
# Lua bindings come last, they might depend on anything
SUBDIR+= lua
.include <bsd.buildinstall.mk>
1993-03-21 12:45:37 +03:00
.include <bsd.subdir.mk>