Home | History | Annotate | Line # | Download | only in lib
Makefile revision 1.235
      1 #	$NetBSD: Makefile,v 1.235 2015/09/28 17:12:12 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 SUBDIR+=	../external/bsd/blacklist/lib
     56 
     57 SUBDIR+=	../external/bsd/flex/lib
     58 SUBDIR+=	../external/bsd/tre/lib
     59 SUBDIR+=	../external/bsd/elftoolchain/lib/libelf
     60 SUBDIR+=	../external/bsd/liblzf/lib
     61 SUBDIR+=	../external/bsd/libpcap/lib
     62 
     63 .if ${MKSLJIT} != "no"
     64 SUBDIR+=	../external/bsd/sljit/lib
     65 SUBDIR+=	libbpfjit
     66 .endif
     67 
     68 .if (${MKZFS} != "no")
     69 SUBDIR+=        ../external/cddl/osnet/lib/libavl
     70 SUBDIR+=        ../external/cddl/osnet/lib/libnvpair
     71 SUBDIR+=        ../external/cddl/osnet/lib/libumem
     72 SUBDIR+=        ../external/cddl/osnet/lib/libuutil
     73 .endif
     74 
     75 SUBDIR+=	../external/mit/expat/lib
     76 
     77 SUBDIR+=	../external/public-domain/sqlite/lib
     78 
     79 SUBDIR+=	../gnu/lib/libmalloc
     80 
     81 .if (${MKGCC} != "no")
     82 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc
     83 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp
     84 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflap
     85 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflapth
     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 ${MKDTRACE} != "no" || ${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/elftoolchain/lib/libdwarf # depends on libelf
    119 SUBDIR+=	../external/mit/lua/lib # depends on libm
    120 SUBDIR+=	libcurses	# depends on libterminfo
    121 SUBDIR+=	libdm		# depends on libprop
    122 SUBDIR+=	libedit		# depends on libterminfo
    123 SUBDIR+=	libexecinfo 	# depends on libelf
    124 SUBDIR+=	libppath	# depends on libprop
    125 SUBDIR+=	libperfuse	# depends on libpuffs
    126 SUBDIR+=	libquota	# depends on libprop and librpcsvc
    127 SUBDIR+=	librefuse	# depends on libpuffs
    128 SUBDIR+=	libisns 	# depends on libpthread
    129 .if (${MKRUMP} != "no")
    130 SUBDIR+=	librumpuser	# depends on libpthread
    131 SUBDIR+=	librumphijack	# depends on librumpclient and libpthread
    132 .endif
    133 
    134 .if (${MKNPF} != "no")
    135 SUBDIR+=	libnpf		# depends on libprop
    136 .endif
    137 
    138 .if (${MKCRYPTO} != "no")
    139 SUBDIR+=	../crypto/external/bsd/openssl/lib # depends on libcrypt
    140 .endif
    141 
    142 SUBDIR+=	../external/bsd/file/lib	# depends on libz
    143 
    144 .if (${MKISCSI} != "no")
    145 SUBDIR+=	../external/bsd/iscsi/lib	# depends on libpthread
    146 .endif
    147 
    148 .if (${MKZFS} != "no")
    149 SUBDIR+=        ../external/cddl/osnet/lib/libzfs
    150 SUBDIR+=        ../external/cddl/osnet/lib/libzpool
    151 .endif
    152 
    153 .if (${MKLVM} != "no")
    154 SUBDIR+=	../external/gpl2/lvm2/lib	# depends on libprop
    155 .endif
    156 
    157 .if (${MKBINUTILS} != "no")
    158 SUBDIR+=	../external/gpl3/binutils/lib	# libbfd depends on libz
    159 .endif
    160 
    161 .if (${MKLIBCXX} != "no")
    162 SUBDIR+=	../external/bsd/libc++
    163 .endif
    164 
    165 .if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no")
    166 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libstdc++-v3
    167 SUBDIR+=	../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libsupc++
    168 .endif
    169 
    170 #==================== 2nd library dependency barrier ====================
    171 SUBDIR+=	.WAIT
    172 
    173 SANITIZER_DIR=../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libasan
    174 .if exists(${SANITIZER_DIR})
    175 SUBDIR+=	${SANITIZER_DIR}
    176 .endif
    177 
    178 SUBDIR+=	../external/bsd/libarchive/lib	# depends on libxz
    179 
    180 .if (${MKNPF} != "no")
    181 SUBDIR+=	npf		# depends on libnpf
    182 .endif
    183 
    184 .if (${MKATF} != "no")
    185 SUBDIR+=	../external/bsd/atf/lib		# depends on libstdc++
    186 .endif
    187 
    188 .if (${MKKYUA} != "no")
    189 SUBDIR+=	../external/bsd/lutok/lib	# depends on lua and libstdc++
    190 .endif
    191 
    192 SUBDIR+=	libform		# depends on libcurses
    193 SUBDIR+=	libmenu		# depends on libcurses
    194 SUBDIR+=	libradius	# depends on libcrypto if (${MKCRYPTO} != "no")
    195 .if (${MKRUMP} != "no")
    196 SUBDIR+=	librump		# depends on librumpuser
    197 .endif
    198 
    199 .if (${MKKERBEROS} != "no")
    200 SUBDIR+=	../crypto/external/bsd/heimdal/lib	# depends on libcrypto
    201 							# libedit, libterminfo,
    202 .endif
    203 
    204 .if (${MKCRYPTO} != "no")
    205 SUBDIR+=	../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
    206 SUBDIR+=	../crypto/external/bsd/netpgp/lib  # depends on libcrypto, ...
    207 .endif
    208 
    209 SUBDIR+=	../external/bsd/libevent/lib	# depends on libcrypto
    210 .if ${MKDTRACE} != "no"
    211 SUBDIR+=	../external/bsd/libproc/lib	# depends on libstdc++, libctf
    212 .endif
    213 SUBDIR+=	../external/bsd/fetch/lib	# depends on libssl
    214 
    215 .if (${MKLDAP} != "no")
    216 SUBDIR+=	../external/bsd/openldap/lib	# depends on libcrypto, ...
    217 .endif
    218 
    219 #==================== 3rd library dependency barrier ====================
    220 SUBDIR+=	.WAIT
    221 
    222 SUBDIR+=	../external/bsd/bind/lib	# depends on heimdal, libcrypto
    223 
    224 .if ${MKDTRACE} != "no"
    225 SUBDIR+=        ../external/cddl/osnet/lib/libdtrace	# depends on libproc
    226 .endif
    227 
    228 .if (${MKRUMP} != "no")
    229 SUBDIR+=	librumpdev	# depends on librump
    230 SUBDIR+=	librumpnet	# depends on librump
    231 SUBDIR+=	librumpvfs	# depends on librump
    232 .endif
    233 
    234 .if (${MKPAM} != "no")
    235 SUBDIR+=	libpam		# depends on heimdal
    236 .endif
    237 
    238 .if (${MKCRYPTO} != "no")
    239 SUBDIR+=	../crypto/external/bsd/libsaslc	# depends on heimdal, openssl
    240 .endif
    241 
    242 SUBDIR+=	../external/bsd/mdocml/lib
    243 
    244 .if (${MKRUMP} != "no")
    245 #==================== 4th library dependency barrier ====================
    246 SUBDIR+=	.WAIT
    247 
    248 SUBDIR+=	libukfs		# depends on librumpvfs, librump
    249 
    250 .if (${MKTPM} != "no")
    251 SUBDIR+=	../crypto/external/cpl/trousers/lib
    252 .endif
    253 
    254 #==================== 5th library dependency barrier ====================
    255 SUBDIR+=	.WAIT
    256 
    257 SUBDIR+=	libp2k		# depends on libukfs, librumpvfs, libpuffs
    258 
    259 .if (${MKTPM} != "no")
    260 SUBDIR+=	../crypto/external/cpl/tpm-tools/lib	# depends on trousers
    261 .endif
    262 
    263 .if !defined(BSD_MK_COMPAT_FILE)
    264 SUBDIR+=	../sys/rump/dev/lib
    265 SUBDIR+=	../sys/rump/fs/lib
    266 SUBDIR+=	../sys/rump/kern/lib
    267 SUBDIR+=	../sys/rump/net/lib
    268 .endif
    269 .endif
    270 
    271 # Lua bindings come last, they might depend on anything
    272 SUBDIR+=	lua
    273 
    274 # Needed by rump and rescue which are outside the smbfs tree
    275 SUBDIR+=	../external/bsd/smbfs/lib
    276 
    277 .include <bsd.buildinstall.mk>
    278 .include <bsd.subdir.mk>
    279