Home | History | Annotate | Line # | Download | only in lib
Makefile revision 1.247
      1 #	$NetBSD: Makefile,v 1.247 2016/10/11 17:02:28 macallan 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 		libpthread_dbg 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_CPU} == "mips"
     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 . if ${HAVE_GCC} == 48
     87 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflap
     88 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflapth
     89 . endif
     90 # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
     91 # specific build area, but we get better parallelism this way.
     92 # We don't build compat versions of these.
     93 . if !defined(MLIBDIR)
     94 SUBDIR+=	../external/lgpl3/gmp/lib/libgmp
     95 SUBDIR+=	../external/lgpl3/mpfr/lib/libmpfr
     96 SUBDIR+=	../external/lgpl3/mpc/lib/libmpc
     97 . endif
     98 .endif
     99 
    100 #
    101 # Libraries that depend upon any listed previously
    102 # (and those that depend upon these [and ...])
    103 #
    104 #==================== 1st library dependency barrier ====================
    105 SUBDIR+=	.WAIT
    106 
    107 .if ${MKDTRACE} != "no"
    108 SUBDIR+=	../external/bsd/librtld_db/lib		# depends on libutil
    109 .endif
    110 
    111 .if ${MKCTF} != "no"
    112 SUBDIR+=        ../external/cddl/osnet/lib/libctf
    113 .endif
    114 
    115 SUBDIR+=	../external/public-domain/xz/lib	# depends on libpthread
    116 
    117 .if (${MKCRYPTO} != "no")
    118 SUBDIR+=	../crypto/external/bsd/netpgp/libmj
    119 SUBDIR+=	../crypto/external/bsd/netpgp/lib/verify # depends on libz
    120 .endif
    121 
    122 SUBDIR+=	../external/bsd/blacklist/lib		# depends on libpthread
    123 SUBDIR+=	../external/bsd/elftoolchain/lib/libdwarf # depends on libelf
    124 SUBDIR+=	../external/mit/lua/lib # depends on libm
    125 SUBDIR+=	libcurses	# depends on libterminfo
    126 SUBDIR+=	libdm		# depends on libprop
    127 SUBDIR+=	libedit		# depends on libterminfo
    128 SUBDIR+=	libexecinfo 	# depends on libelf
    129 SUBDIR+=	libppath	# depends on libprop
    130 SUBDIR+=	libperfuse	# depends on libpuffs
    131 SUBDIR+=	libquota	# depends on libprop and librpcsvc
    132 SUBDIR+=	librefuse	# depends on libpuffs
    133 SUBDIR+=	libisns 	# depends on libpthread
    134 .if (${MKRUMP} != "no")
    135 SUBDIR+=	librumpuser	# depends on libpthread
    136 SUBDIR+=	librumphijack	# depends on librumpclient and libpthread
    137 .endif
    138 
    139 .if (${MKNPF} != "no")
    140 SUBDIR+=	libnpf		# depends on libprop
    141 .endif
    142 
    143 .if (${MKCRYPTO} != "no")
    144 SUBDIR+=	../crypto/external/bsd/openssl/lib # depends on libcrypt
    145 .endif
    146 
    147 SUBDIR+=	../external/bsd/file/lib	# depends on libz
    148 
    149 .if (${MKISCSI} != "no")
    150 SUBDIR+=	../external/bsd/iscsi/lib	# depends on libpthread
    151 .endif
    152 
    153 .if (${MKZFS} != "no")
    154 SUBDIR+=        ../external/cddl/osnet/lib/libzfs
    155 SUBDIR+=        ../external/cddl/osnet/lib/libzpool
    156 .endif
    157 
    158 .if (${MKLVM} != "no")
    159 SUBDIR+=	../external/gpl2/lvm2/lib	# depends on libprop
    160 .endif
    161 
    162 .if (${MKBINUTILS} != "no")
    163 SUBDIR+=	../external/gpl3/${EXTERNAL_BINUTILS_SUBDIR}/lib	# libbfd depends on libz
    164 .endif
    165 
    166 .if (${MKLIBCXX} != "no")
    167 SUBDIR+=	../external/bsd/libc++
    168 .endif
    169 
    170 .if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
    171 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
    172 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++
    173 .endif
    174 
    175 #==================== 2nd library dependency barrier ====================
    176 SUBDIR+=	.WAIT
    177 
    178 .for sanitizer in asan ubsan
    179 .if exists(../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer})
    180 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer}
    181 .endif
    182 .endfor
    183 
    184 SUBDIR+=	../external/bsd/libarchive/lib	# depends on libxz
    185 
    186 .if (${MKNPF} != "no")
    187 SUBDIR+=	npf		# depends on libnpf
    188 .endif
    189 
    190 .if (${MKATF} != "no")
    191 SUBDIR+=	../external/bsd/atf/lib		# depends on libstdc++
    192 .endif
    193 
    194 .if (${MKKYUA} != "no")
    195 SUBDIR+=	../external/bsd/lutok/lib	# depends on lua and libstdc++
    196 .endif
    197 
    198 SUBDIR+=	libform		# depends on libcurses
    199 SUBDIR+=	libmenu		# depends on libcurses
    200 SUBDIR+=	libpanel	# depends on libcurses
    201 SUBDIR+=	libradius	# depends on libcrypto if (${MKCRYPTO} != "no")
    202 .if (${MKRUMP} != "no")
    203 SUBDIR+=	librump		# depends on librumpuser
    204 .endif
    205 
    206 .if (${MKKERBEROS} != "no")
    207 SUBDIR+=	../crypto/external/bsd/heimdal/lib	# depends on libcrypto
    208 							# libedit, libterminfo,
    209 .endif
    210 
    211 .if (${MKCRYPTO} != "no")
    212 SUBDIR+=	../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
    213 SUBDIR+=	../crypto/external/bsd/netpgp/lib  # depends on libcrypto, ...
    214 .endif
    215 
    216 SUBDIR+=	../external/bsd/libevent/lib	# depends on libcrypto
    217 .if ${MKDTRACE} != "no"
    218 SUBDIR+=	../external/bsd/libproc/lib	# depends on libstdc++, libctf
    219 .endif
    220 SUBDIR+=	../external/bsd/fetch/lib	# depends on libssl
    221 
    222 .if (${MKLDAP} != "no")
    223 SUBDIR+=	../external/bsd/openldap/lib	# depends on libcrypto, ...
    224 .endif
    225 
    226 #==================== 3rd library dependency barrier ====================
    227 SUBDIR+=	.WAIT
    228 
    229 SUBDIR+=	../external/bsd/bind/lib	# depends on heimdal, libcrypto
    230 .if ${MKCRYPTO} != "no" && ${MKUNBOUND} != "no"
    231 SUBDIR+=	../external/bsd/unbound/lib	# depends on libcrypto
    232 .endif
    233 
    234 .if ${MKDTRACE} != "no"
    235 SUBDIR+=        ../external/cddl/osnet/lib/libdtrace	# depends on libproc
    236 .endif
    237 
    238 .if (${MKRUMP} != "no")
    239 SUBDIR+=	librumpdev	# depends on librump
    240 SUBDIR+=	librumpnet	# depends on librump
    241 SUBDIR+=	librumpvfs	# depends on librump
    242 .endif
    243 
    244 .if (${MKPAM} != "no")
    245 SUBDIR+=	libpam		# depends on heimdal
    246 .endif
    247 
    248 .if (${MKCRYPTO} != "no")
    249 SUBDIR+=	../crypto/external/bsd/libsaslc	# depends on heimdal, openssl
    250 .endif
    251 
    252 SUBDIR+=	../external/bsd/mdocml/lib
    253 
    254 .if (${MKRUMP} != "no")
    255 #==================== 4th library dependency barrier ====================
    256 SUBDIR+=	.WAIT
    257 
    258 SUBDIR+=	libukfs		# depends on librumpvfs, librump
    259 
    260 .if (${MKTPM} != "no")
    261 SUBDIR+=	../crypto/external/cpl/trousers/lib
    262 .endif
    263 
    264 #==================== 5th library dependency barrier ====================
    265 SUBDIR+=	.WAIT
    266 
    267 SUBDIR+=	libp2k		# depends on libukfs, librumpvfs, libpuffs
    268 
    269 .if (${MKTPM} != "no")
    270 SUBDIR+=	../crypto/external/cpl/tpm-tools/lib	# depends on trousers
    271 .endif
    272 
    273 .if !defined(BSD_MK_COMPAT_FILE)
    274 SUBDIR+=	../sys/rump/dev/lib
    275 SUBDIR+=	../sys/rump/fs/lib
    276 SUBDIR+=	../sys/rump/kern/lib
    277 SUBDIR+=	../sys/rump/net/lib
    278 .endif
    279 .endif
    280 
    281 # Lua bindings come last, they might depend on anything
    282 SUBDIR+=	lua
    283 
    284 # Needed by rump and rescue which are outside the smbfs tree
    285 SUBDIR+=	../external/bsd/smbfs/lib
    286 
    287 .include <bsd.buildinstall.mk>
    288 .include <bsd.subdir.mk>
    289