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