Home | History | Annotate | Line # | Download | only in lib
Makefile revision 1.287
      1 #	$NetBSD: Makefile,v 1.287 2021/03/07 15:09:12 christos Exp $
      2 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
      3 
      4 .include <bsd.own.mk>
      5 
      6 SUBDIR=		csu .WAIT
      7 
      8 .if (${MKGCC} != "no")
      9 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgcc .WAIT
     10 .endif
     11 
     12 SUBDIR+=	libc
     13 SUBDIR+=	.WAIT
     14 
     15 #
     16 # The SUBDIRs above are included here for completeness but should be built
     17 # and installed prior to make(dependall) in this file, as libraries listed
     18 # below will depend on versions from DESTDIR only.
     19 #
     20 
     21 SUBDIR+=	i18n_module
     22 
     23 SUBDIR+=	libarch \
     24 		libbluetooth libbsdmalloc libbz2 \
     25 		libcompat libcrypt \
     26 		libintl libipsec libkvm libm \
     27 		libossaudio libpci libposix libprop libpthread \
     28 		libpuffs libresolv librmt librpcsvc librt \
     29 		libtelnet libterminfo \
     30 		libusbhid libutil liby libz
     31 
     32 .if !defined(BSD_MK_COMPAT_FILE)
     33 SUBDIR+=	libkern
     34 .endif
     35 
     36 .if (${MACHINE_CPU} == "arm" || ${MACHINE_CPU} == "aarch64")
     37 LIBC_MACHINE_ARCH?=${MACHINE_ARCH}
     38 LIBC_MACHINE_CPU?=${MACHINE_CPU}
     39 .if ${LIBC_MACHINE_CPU} == "arm" && empty(LIBC_MACHINE_ARCH:M*hf*)
     40 SUBDIR+=	libc_vfp
     41 .endif
     42 .endif
     43 .if ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb"
     44 SUBDIR+=	libc_fp
     45 .endif
     46 .if (${MKRUMP} != "no")
     47 SUBDIR+=	librumpclient
     48 .endif
     49 .if (${MKSKEY} != "no")
     50 SUBDIR+=	libskey
     51 .endif
     52 
     53 .if ${HAVE_NVMM:Uno} == "yes" && !defined(MLIBDIR)
     54 SUBDIR+=	libnvmm
     55 .endif
     56 
     57 .if (${MKMDNS} != "no")
     58 SUBDIR+=	../external/apache2/mDNSResponder/lib
     59 .endif
     60 
     61 SUBDIR+=	../external/bsd/am-utils/lib
     62 
     63 SUBDIR+=	../external/bsd/flex/lib
     64 SUBDIR+=	../external/bsd/tre/lib
     65 SUBDIR+=	../external/bsd/elftoolchain/lib/libelf
     66 SUBDIR+=	../external/bsd/liblzf/lib
     67 SUBDIR+=	../external/bsd/libpcap/lib
     68 
     69 .if ${MKSLJIT} != "no"
     70 SUBDIR+=	../external/bsd/sljit/lib
     71 SUBDIR+=	libbpfjit
     72 .endif
     73 
     74 SUBDIR+=	../external/bsd/libnv/lib
     75 
     76 .if (${MKZFS} != "no")
     77 SUBDIR+=        ../external/cddl/osnet/lib/libavl
     78 SUBDIR+=        ../external/cddl/osnet/lib/libnvpair
     79 SUBDIR+=        ../external/cddl/osnet/lib/libumem
     80 SUBDIR+=        ../external/cddl/osnet/lib/libuutil
     81 .endif
     82 
     83 SUBDIR+=	../external/mit/expat/lib
     84 
     85 SUBDIR+=	../external/gpl2/libmalloc
     86 
     87 SUBDIR+=	../external/bsd/jemalloc/lib
     88 
     89 .if (${MKGCC} != "no")
     90 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc
     91 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp
     92 # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
     93 # specific build area, but we get better parallelism this way.
     94 # We don't build compat versions of these.
     95 . if !defined(MLIBDIR) && (${MKGCCCMDS} != "no")
     96 SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
     97 SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr
     98 SUBDIR+=	../external/lgpl3/mpc/lib/libmpc
     99 . endif
    100 .endif
    101 
    102 #
    103 # Libraries that depend upon any listed previously
    104 # (and those that depend upon these [and ...])
    105 #
    106 #==================== 1st library dependency barrier ====================
    107 SUBDIR+=	.WAIT
    108 
    109 .if ${MKDTRACE} != "no"
    110 SUBDIR+=	../external/bsd/librtld_db/lib		# depends on libutil
    111 .endif
    112 
    113 .if ${MKCTF} != "no"
    114 SUBDIR+=        ../external/cddl/osnet/lib/libctf
    115 .endif
    116 
    117 SUBDIR+=	../external/public-domain/xz/lib	# depends on libpthread
    118 SUBDIR+=	../crypto/external/bsd/netpgp/libmj
    119 SUBDIR+=	../crypto/external/bsd/netpgp/lib/verify # depends on libz
    120 SUBDIR+=	../external/bsd/blocklist/lib		# depends on libpthread
    121 SUBDIR+=	../external/bsd/elftoolchain/lib/libdwarf # depends on libelf
    122 SUBDIR+=	../external/mit/lua/lib # depends on libm
    123 SUBDIR+=	../external/public-domain/sqlite/lib # depends on libm
    124 SUBDIR+=	libcurses	# depends on libterminfo
    125 SUBDIR+=	libdm		# depends on libprop
    126 SUBDIR+=	libedit		# depends on libterminfo
    127 SUBDIR+=	libexecinfo 	# depends on libelf
    128 SUBDIR+=	libppath	# depends on libprop
    129 SUBDIR+=	libperfuse	# depends on libpuffs
    130 SUBDIR+=	libquota	# depends on libprop and librpcsvc
    131 SUBDIR+=	librefuse	# depends on libpuffs
    132 SUBDIR+=	libisns 	# depends on libpthread
    133 .if (${MKRUMP} != "no")
    134 SUBDIR+=	librumphijack	# depends on librumpclient and libpthread
    135 SUBDIR+=	librumpres	# depends on librumpclient
    136 SUBDIR+=	librumpuser	# depends on libpthread
    137 .endif
    138 
    139 .if (${MKNPF} != "no")
    140 SUBDIR+=	libnpf		# depends on libnv
    141 .endif
    142 
    143 SUBDIR+=	../crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib # depends on libcrypt
    144 
    145 .if (${MKISCSI} != "no")
    146 SUBDIR+=	../external/bsd/iscsi/lib	# depends on libpthread
    147 .endif
    148 
    149 .if (${MKZFS} != "no")
    150 SUBDIR+=        ../external/cddl/osnet/lib/libzfs_core
    151 SUBDIR+=        ../external/cddl/osnet/lib/libzpool
    152 .endif
    153 
    154 .if (${MKLVM} != "no")
    155 SUBDIR+=	../external/gpl2/lvm2/lib	# depends on libprop
    156 .endif
    157 
    158 .if (${MKBINUTILS} != "no")
    159 SUBDIR+=	../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/lib	# libbfd depends on libz
    160 .endif
    161 
    162 .if (${MKLIBCXX} != "no")
    163 SUBDIR+=	../external/bsd/libc++
    164 .endif
    165 
    166 .if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
    167 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
    168 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++
    169 .endif
    170 
    171 .if (${MKLLVMRT} != "no" && (!defined(MLIBDIR) || ${MKCOMPATX11} != "no"))
    172 SUBDIR+=	../external/apache2/llvm/include
    173 .endif
    174 
    175 SUBDIR+=	../external/mit/libcbor/lib
    176 
    177 SUBDIR+=	../external/mit/libuv/lib
    178 #==================== 2nd library dependency barrier ====================
    179 SUBDIR+=	.WAIT
    180 
    181 SUBDIR+=	libwrap
    182 
    183 .if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
    184 .for sanitizer in asan lsan ubsan
    185 .if exists(../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer})
    186 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer}
    187 .endif
    188 .endfor
    189 .endif
    190 
    191 .if (${MKLLVMRT} != "no" && (!defined(MLIBDIR) || ${MKCOMPATX11} != "no"))
    192 SUBDIR+=	../external/apache2/llvm/librt
    193 .endif
    194 
    195 SUBDIR+=	../external/bsd/libarchive/lib	# depends on libxz
    196 
    197 SUBDIR+=	../external/bsd/file/lib	# depends on libz, libbz2, libxz
    198 
    199 .if (${MKNPF} != "no")
    200 SUBDIR+=	npf		# depends on libnpf
    201 .endif
    202 
    203 .if (${MKATF} != "no")
    204 SUBDIR+=	../external/bsd/atf/lib		# depends on libstdc++
    205 .endif
    206 
    207 .if (${MKKYUA} != "no")
    208 SUBDIR+=	../external/bsd/lutok/lib	# depends on lua and libstdc++
    209 .endif
    210 
    211 SUBDIR+=	libform		# depends on libcurses
    212 SUBDIR+=	libmenu		# depends on libcurses
    213 SUBDIR+=	libpanel	# depends on libcurses
    214 SUBDIR+=	libradius	# depends on libcrypto
    215 .if (${MKRUMP} != "no")
    216 SUBDIR+=	librump		# depends on librumpuser
    217 .endif
    218 
    219 .if (${MKKERBEROS} != "no")
    220 SUBDIR+=	../crypto/external/bsd/heimdal/lib	# depends on libcrypto
    221 							# libedit, libterminfo,
    222 .endif
    223 
    224 SUBDIR+=	../external/bsd/libfido2/lib	# depends on libcbor
    225 SUBDIR+=	../crypto/external/bsd/netpgp/lib  # depends on libcrypto, ...
    226 SUBDIR+=	../external/bsd/libevent/lib	# depends on libcrypto
    227 .if ${MKDTRACE} != "no"
    228 SUBDIR+=	../external/bsd/libproc/lib	# depends on libstdc++, libctf
    229 .endif
    230 SUBDIR+=	../external/bsd/fetch/lib	# depends on libssl
    231 
    232 .if (${MKLDAP} != "no")
    233 SUBDIR+=	../external/bsd/openldap/lib	# depends on libcrypto, ...
    234 .endif
    235 
    236 .if (${MKZFS} != "no")
    237 SUBDIR+=        ../external/cddl/osnet/lib/libzfs
    238 .endif
    239 
    240 SUBDIR+= 	../libexec/httpd/libbozohttpd 	# depends on libssl & libcrypto
    241 
    242 #==================== 3rd library dependency barrier ====================
    243 SUBDIR+=	.WAIT
    244 
    245 SUBDIR+=	../crypto/external/bsd/openssh/lib # depends on libcrypto, libz,
    246 						   # libfido2
    247 SUBDIR+=	../crypto/external/bsd/netpgp/bindings/lua  # depends on netpgp/lib
    248 SUBDIR+=	../external/mpl/bind/lib	# depends on heimdal, libcrypto
    249 						# libuv
    250 .if ${MKUNBOUND} != "no"
    251 SUBDIR+=	../external/bsd/unbound/lib	# depends on libcrypto
    252 .endif
    253 
    254 .if ${MKDTRACE} != "no"
    255 SUBDIR+=        ../external/cddl/osnet/lib/libdtrace	# depends on libproc
    256 .endif
    257 
    258 .if (${MKRUMP} != "no")
    259 SUBDIR+=	librumpdev	# depends on librump
    260 SUBDIR+=	librumpnet	# depends on librump
    261 SUBDIR+=	librumpvfs	# depends on librump
    262 .endif
    263 
    264 SUBDIR+=	../crypto/external/bsd/libsaslc	# depends on heimdal, openssl
    265 SUBDIR+=	../external/bsd/mdocml/lib
    266 
    267 #==================== 4th library dependency barrier ====================
    268 SUBDIR+=	.WAIT
    269 
    270 .if (${MKPAM} != "no")
    271 SUBDIR+=	libpam		# depends on heimdal, libssh
    272 .endif
    273 
    274 
    275 .if (${MKRUMP} != "no")
    276 SUBDIR+=	libukfs		# depends on librumpvfs, librump
    277 .endif
    278 
    279 .if (${MKTPM} != "no")
    280 SUBDIR+=	../crypto/external/cpl/trousers/lib
    281 .endif
    282 
    283 #==================== 5th library dependency barrier ====================
    284 SUBDIR+=	.WAIT
    285 
    286 .if (${MKPAM} != "no")
    287 SUBDIR+=	../external/bsd/pam-u2f/lib	# depends on libpam
    288 .endif
    289 
    290 .if (${MKRUMP} != "no")
    291 SUBDIR+=	libp2k		# depends on libukfs, librumpvfs, libpuffs
    292 .endif
    293 
    294 .if (${MKTPM} != "no")
    295 SUBDIR+=	../crypto/external/cpl/tpm-tools/lib	# depends on trousers
    296 .endif
    297 
    298 .if (${MKRUMP} != "no")
    299 .if !defined(BSD_MK_COMPAT_FILE)
    300 SUBDIR+=	../sys/rump/dev/lib
    301 SUBDIR+=	../sys/rump/fs/lib
    302 SUBDIR+=	../sys/rump/kern/lib
    303 SUBDIR+=	../sys/rump/net/lib
    304 .endif
    305 .endif
    306 
    307 # Lua bindings come last, they might depend on anything
    308 SUBDIR+=	lua
    309 
    310 .include <bsd.buildinstall.mk>
    311 .include <bsd.subdir.mk>
    312