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