Home | History | Annotate | Line # | Download | only in lib
Makefile revision 1.245.2.2
      1 #	$NetBSD: Makefile,v 1.245.2.2 2017/03/20 06:56:55 pgoyette 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)
     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 
    113 .if (${MKCRYPTO} != "no")
    114 SUBDIR+=	../crypto/external/bsd/netpgp/libmj
    115 SUBDIR+=	../crypto/external/bsd/netpgp/lib/verify # depends on libz
    116 .endif
    117 
    118 SUBDIR+=	../external/bsd/blacklist/lib		# depends on libpthread
    119 SUBDIR+=	../external/bsd/elftoolchain/lib/libdwarf # depends on libelf
    120 SUBDIR+=	../external/mit/lua/lib # depends on libm
    121 SUBDIR+=	libcurses	# depends on libterminfo
    122 SUBDIR+=	libdm		# depends on libprop
    123 SUBDIR+=	libedit		# depends on libterminfo
    124 SUBDIR+=	libexecinfo 	# depends on libelf
    125 SUBDIR+=	libppath	# depends on libprop
    126 SUBDIR+=	libperfuse	# depends on libpuffs
    127 SUBDIR+=	libquota	# depends on libprop and librpcsvc
    128 SUBDIR+=	librefuse	# depends on libpuffs
    129 SUBDIR+=	libisns 	# depends on libpthread
    130 .if (${MKRUMP} != "no")
    131 SUBDIR+=	librumpuser	# depends on libpthread
    132 SUBDIR+=	librumphijack	# depends on librumpclient and libpthread
    133 .endif
    134 
    135 .if (${MKNPF} != "no")
    136 SUBDIR+=	libnpf		# depends on libprop
    137 .endif
    138 
    139 .if (${MKCRYPTO} != "no")
    140 SUBDIR+=	../crypto/external/bsd/openssl/lib # depends on libcrypt
    141 .endif
    142 
    143 SUBDIR+=	../external/bsd/file/lib	# depends on libz
    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
    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 #==================== 2nd library dependency barrier ====================
    172 SUBDIR+=	.WAIT
    173 
    174 .for sanitizer in asan ubsan
    175 .if exists(../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer})
    176 SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/lib${sanitizer}
    177 .endif
    178 .endfor
    179 
    180 SUBDIR+=	../external/bsd/libarchive/lib	# depends on libxz
    181 
    182 .if (${MKNPF} != "no")
    183 SUBDIR+=	npf		# depends on libnpf
    184 .endif
    185 
    186 .if (${MKATF} != "no")
    187 SUBDIR+=	../external/bsd/atf/lib		# depends on libstdc++
    188 .endif
    189 
    190 .if (${MKKYUA} != "no")
    191 SUBDIR+=	../external/bsd/lutok/lib	# depends on lua and libstdc++
    192 .endif
    193 
    194 SUBDIR+=	libform		# depends on libcurses
    195 SUBDIR+=	libmenu		# depends on libcurses
    196 SUBDIR+=	libpanel	# depends on libcurses
    197 SUBDIR+=	libradius	# depends on libcrypto if (${MKCRYPTO} != "no")
    198 .if (${MKRUMP} != "no")
    199 SUBDIR+=	librump		# depends on librumpuser
    200 .endif
    201 
    202 .if (${MKKERBEROS} != "no")
    203 SUBDIR+=	../crypto/external/bsd/heimdal/lib	# depends on libcrypto
    204 							# libedit, libterminfo,
    205 .endif
    206 
    207 .if (${MKCRYPTO} != "no")
    208 SUBDIR+=	../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
    209 SUBDIR+=	../crypto/external/bsd/netpgp/lib  # depends on libcrypto, ...
    210 .endif
    211 
    212 SUBDIR+=	../external/bsd/libevent/lib	# depends on libcrypto
    213 .if ${MKDTRACE} != "no"
    214 SUBDIR+=	../external/bsd/libproc/lib	# depends on libstdc++, libctf
    215 .endif
    216 SUBDIR+=	../external/bsd/fetch/lib	# depends on libssl
    217 
    218 .if (${MKLDAP} != "no")
    219 SUBDIR+=	../external/bsd/openldap/lib	# depends on libcrypto, ...
    220 .endif
    221 
    222 #==================== 3rd library dependency barrier ====================
    223 SUBDIR+=	.WAIT
    224 
    225 SUBDIR+=	../external/bsd/bind/lib	# depends on heimdal, libcrypto
    226 
    227 .if ${MKDTRACE} != "no"
    228 SUBDIR+=        ../external/cddl/osnet/lib/libdtrace	# depends on libproc
    229 .endif
    230 
    231 .if (${MKRUMP} != "no")
    232 SUBDIR+=	librumpdev	# depends on librump
    233 SUBDIR+=	librumpnet	# depends on librump
    234 SUBDIR+=	librumpvfs	# depends on librump
    235 .endif
    236 
    237 .if (${MKPAM} != "no")
    238 SUBDIR+=	libpam		# depends on heimdal
    239 .endif
    240 
    241 .if (${MKCRYPTO} != "no")
    242 SUBDIR+=	../crypto/external/bsd/libsaslc	# depends on heimdal, openssl
    243 .endif
    244 
    245 SUBDIR+=	../external/bsd/mdocml/lib
    246 
    247 .if (${MKRUMP} != "no")
    248 #==================== 4th library dependency barrier ====================
    249 SUBDIR+=	.WAIT
    250 
    251 SUBDIR+=	libukfs		# depends on librumpvfs, librump
    252 
    253 .if (${MKTPM} != "no")
    254 SUBDIR+=	../crypto/external/cpl/trousers/lib
    255 .endif
    256 
    257 #==================== 5th library dependency barrier ====================
    258 SUBDIR+=	.WAIT
    259 
    260 SUBDIR+=	libp2k		# depends on libukfs, librumpvfs, libpuffs
    261 
    262 .if (${MKTPM} != "no")
    263 SUBDIR+=	../crypto/external/cpl/tpm-tools/lib	# depends on trousers
    264 .endif
    265 
    266 .if !defined(BSD_MK_COMPAT_FILE)
    267 SUBDIR+=	../sys/rump/dev/lib
    268 SUBDIR+=	../sys/rump/fs/lib
    269 SUBDIR+=	../sys/rump/kern/lib
    270 SUBDIR+=	../sys/rump/net/lib
    271 .endif
    272 .endif
    273 
    274 # Lua bindings come last, they might depend on anything
    275 SUBDIR+=	lua
    276 
    277 # Needed by rump and rescue which are outside the smbfs tree
    278 SUBDIR+=	../external/bsd/smbfs/lib
    279 
    280 .include <bsd.buildinstall.mk>
    281 .include <bsd.subdir.mk>
    282