Home | History | Annotate | Line # | Download | only in lib
Makefile revision 1.255
      1 #	$NetBSD: Makefile,v 1.255 2018/05/01 19:50:34 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 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)
     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 (${MKMDNS} != "no")
     54 SUBDIR+=	../external/apache2/mDNSResponder/lib
     55 .endif
     56 
     57 SUBDIR+=	../external/bsd/am-utils/lib
     58 
     59 SUBDIR+=	../external/bsd/flex/lib
     60 SUBDIR+=	../external/bsd/tre/lib
     61 SUBDIR+=	../external/bsd/elftoolchain/lib/libelf
     62 SUBDIR+=	../external/bsd/liblzf/lib
     63 SUBDIR+=	../external/bsd/libpcap/lib
     64 
     65 .if ${MKSLJIT} != "no"
     66 SUBDIR+=	../external/bsd/sljit/lib
     67 SUBDIR+=	libbpfjit
     68 .endif
     69 
     70 .if (${MKZFS} != "no")
     71 SUBDIR+=        ../external/cddl/osnet/lib/libavl
     72 SUBDIR+=        ../external/cddl/osnet/lib/libnvpair
     73 SUBDIR+=        ../external/cddl/osnet/lib/libumem
     74 SUBDIR+=        ../external/cddl/osnet/lib/libuutil
     75 .endif
     76 
     77 SUBDIR+=	../external/mit/expat/lib
     78 
     79 SUBDIR+=	../external/public-domain/sqlite/lib
     80 
     81 SUBDIR+=	../external/gpl2/libmalloc
     82 
     83 .if (${MKGCC} != "no")
     84 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc
     85 SUBDIR+=	../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) && (${MKGCCCMDS} != "no")
     90 SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
     91 SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr
     92 SUBDIR+=	../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 ====================
    101 SUBDIR+=	.WAIT
    102 
    103 .if ${MKDTRACE} != "no"
    104 SUBDIR+=	../external/bsd/librtld_db/lib		# depends on libutil
    105 .endif
    106 
    107 .if ${MKCTF} != "no"
    108 SUBDIR+=        ../external/cddl/osnet/lib/libctf
    109 .endif
    110 
    111 SUBDIR+=	../external/public-domain/xz/lib	# depends on libpthread
    112 SUBDIR+=	../crypto/external/bsd/netpgp/libmj
    113 SUBDIR+=	../crypto/external/bsd/netpgp/lib/verify # depends on libz
    114 SUBDIR+=	../external/bsd/blacklist/lib		# depends on libpthread
    115 SUBDIR+=	../external/bsd/elftoolchain/lib/libdwarf # depends on libelf
    116 SUBDIR+=	../external/mit/lua/lib # depends on libm
    117 SUBDIR+=	libcurses	# depends on libterminfo
    118 SUBDIR+=	libdm		# depends on libprop
    119 SUBDIR+=	libedit		# depends on libterminfo
    120 SUBDIR+=	libexecinfo 	# depends on libelf
    121 SUBDIR+=	libppath	# depends on libprop
    122 SUBDIR+=	libperfuse	# depends on libpuffs
    123 SUBDIR+=	libquota	# depends on libprop and librpcsvc
    124 SUBDIR+=	librefuse	# depends on libpuffs
    125 SUBDIR+=	libisns 	# depends on libpthread
    126 .if (${MKRUMP} != "no")
    127 SUBDIR+=	librumphijack	# depends on librumpclient and libpthread
    128 SUBDIR+=	librumpres	# depends on librumpclient
    129 SUBDIR+=	librumpuser	# depends on libpthread
    130 .endif
    131 
    132 .if (${MKNPF} != "no")
    133 SUBDIR+=	libnpf		# depends on libprop
    134 .endif
    135 
    136 SUBDIR+=	../crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib # depends on libcrypt
    137 SUBDIR+=	../external/bsd/file/lib	# depends on libz
    138 
    139 .if (${MKISCSI} != "no")
    140 SUBDIR+=	../external/bsd/iscsi/lib	# depends on libpthread
    141 .endif
    142 
    143 .if (${MKZFS} != "no")
    144 SUBDIR+=        ../external/cddl/osnet/lib/libzfs
    145 SUBDIR+=        ../external/cddl/osnet/lib/libzpool
    146 .endif
    147 
    148 .if (${MKLVM} != "no")
    149 SUBDIR+=	../external/gpl2/lvm2/lib	# depends on libprop
    150 .endif
    151 
    152 .if (${MKBINUTILS} != "no")
    153 SUBDIR+=	../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/lib	# libbfd depends on libz
    154 .endif
    155 
    156 .if (${MKLIBCXX} != "no")
    157 SUBDIR+=	../external/bsd/libc++
    158 .endif
    159 
    160 .if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
    161 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
    162 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++
    163 .endif
    164 
    165 #==================== 2nd library dependency barrier ====================
    166 SUBDIR+=	.WAIT
    167 
    168 .for sanitizer in asan ubsan
    169 .if exists(../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer})
    170 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer}
    171 .endif
    172 .endfor
    173 
    174 SUBDIR+=	../external/bsd/libarchive/lib	# depends on libxz
    175 
    176 .if (${MKNPF} != "no")
    177 SUBDIR+=	npf		# depends on libnpf
    178 .endif
    179 
    180 .if (${MKATF} != "no")
    181 SUBDIR+=	../external/bsd/atf/lib		# depends on libstdc++
    182 .endif
    183 
    184 .if (${MKKYUA} != "no")
    185 SUBDIR+=	../external/bsd/lutok/lib	# depends on lua and libstdc++
    186 .endif
    187 
    188 SUBDIR+=	libform		# depends on libcurses
    189 SUBDIR+=	libmenu		# depends on libcurses
    190 SUBDIR+=	libpanel	# depends on libcurses
    191 SUBDIR+=	libradius	# depends on libcrypto
    192 .if (${MKRUMP} != "no")
    193 SUBDIR+=	librump		# depends on librumpuser
    194 .endif
    195 
    196 .if (${MKKERBEROS} != "no")
    197 SUBDIR+=	../crypto/external/bsd/heimdal/lib	# depends on libcrypto
    198 							# libedit, libterminfo,
    199 .endif
    200 
    201 SUBDIR+=	../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
    202 SUBDIR+=	../crypto/external/bsd/netpgp/lib  # depends on libcrypto, ...
    203 SUBDIR+=	../external/bsd/libevent/lib	# depends on libcrypto
    204 .if ${MKDTRACE} != "no"
    205 SUBDIR+=	../external/bsd/libproc/lib	# depends on libstdc++, libctf
    206 .endif
    207 SUBDIR+=	../external/bsd/fetch/lib	# depends on libssl
    208 
    209 .if (${MKLDAP} != "no")
    210 SUBDIR+=	../external/bsd/openldap/lib	# depends on libcrypto, ...
    211 .endif
    212 
    213 #==================== 3rd library dependency barrier ====================
    214 SUBDIR+=	.WAIT
    215 
    216 SUBDIR+=	../crypto/external/bsd/netpgp/bindings/lua  # depends on netpgp/lib
    217 SUBDIR+=	../external/bsd/bind/lib	# depends on heimdal, libcrypto
    218 .if ${MKUNBOUND} != "no"
    219 SUBDIR+=	../external/bsd/unbound/lib	# depends on libcrypto
    220 .endif
    221 
    222 .if ${MKDTRACE} != "no"
    223 SUBDIR+=        ../external/cddl/osnet/lib/libdtrace	# depends on libproc
    224 .endif
    225 
    226 .if (${MKRUMP} != "no")
    227 SUBDIR+=	librumpdev	# depends on librump
    228 SUBDIR+=	librumpnet	# depends on librump
    229 SUBDIR+=	librumpvfs	# depends on librump
    230 .endif
    231 
    232 .if (${MKPAM} != "no")
    233 SUBDIR+=	libpam		# depends on heimdal
    234 .endif
    235 
    236 SUBDIR+=	../crypto/external/bsd/libsaslc	# depends on heimdal, openssl
    237 SUBDIR+=	../external/bsd/mdocml/lib
    238 
    239 .if (${MKRUMP} != "no")
    240 #==================== 4th library dependency barrier ====================
    241 SUBDIR+=	.WAIT
    242 
    243 SUBDIR+=	libukfs		# depends on librumpvfs, librump
    244 
    245 .if (${MKTPM} != "no")
    246 SUBDIR+=	../crypto/external/cpl/trousers/lib
    247 .endif
    248 
    249 #==================== 5th library dependency barrier ====================
    250 SUBDIR+=	.WAIT
    251 
    252 SUBDIR+=	libp2k		# depends on libukfs, librumpvfs, libpuffs
    253 
    254 .if (${MKTPM} != "no")
    255 SUBDIR+=	../crypto/external/cpl/tpm-tools/lib	# depends on trousers
    256 .endif
    257 
    258 .if !defined(BSD_MK_COMPAT_FILE)
    259 SUBDIR+=	../sys/rump/dev/lib
    260 SUBDIR+=	../sys/rump/fs/lib
    261 SUBDIR+=	../sys/rump/kern/lib
    262 SUBDIR+=	../sys/rump/net/lib
    263 .endif
    264 .endif
    265 
    266 # Lua bindings come last, they might depend on anything
    267 SUBDIR+=	lua
    268 
    269 # Needed by rump and rescue which are outside the smbfs tree
    270 SUBDIR+=	../external/bsd/smbfs/lib
    271 
    272 .for S in ${SUBDIR}
    273 .if ${S} != ".WAIT"
    274 SUBLIB_${S}!=	cd ${S} && ${MAKE} -V LIB
    275 SUBDEP_${S}!=	cd ${S} && ${MAKE} -V LIBDPLIBS
    276 .endif
    277 .endfor
    278 
    279 showdeps:
    280 .for S in ${SUBDIR}
    281 .if ${S} != ".WAIT"
    282 .for DL DD in ${SUBDEP_${S}}
    283 	@echo ${S} ${SUBLIB_${S}} ${DL} ${DD:C,^${.CURDIR}/,,}
    284 .endfor
    285 .endif
    286 .endfor
    287 
    288 .include <bsd.buildinstall.mk>
    289 .include <bsd.subdir.mk>
    290