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