1# $NetBSD: Makefile,v 1.209 2013/11/28 12:08:56 mrg Exp $ 2# from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91 3 4.include <bsd.own.mk> 5 6SUBDIR= csu .WAIT 7 8.if (${MKGCC} != "no") 9. if ${HAVE_GCC} == 4 10. if (${USE_COMPILERCRTSTUFF} == "yes") 11SUBDIR+= ../gnu/lib/crtstuff4 .WAIT 12. endif 13SUBDIR+= ../gnu/lib/libgcc4 .WAIT 14. else 15. if (${USE_COMPILERCRTSTUFF} == "yes") 16SUBDIR+= ../external/gpl3/gcc/lib/crtstuff .WAIT 17. endif 18SUBDIR+= ../external/gpl3/gcc/lib/libgcc .WAIT 19. endif 20.endif 21 22.if defined(__MINIX) 23#LSC MINIX libc depends on 24# - libminlib because of minix/lib/libc/malloc-debug.c 25# - libmthread because of sys/lib/libunwind 26SUBDIR+= ../minix/lib/libminlib 27SUBDIR+= .WAIT 28 29SUBDIR+= ../minix/lib/libsys 30SUBDIR+= ../minix/lib/libmthread 31SUBDIR+= .WAIT 32.endif # defined(__MINIX) 33SUBDIR+= libc 34SUBDIR+= .WAIT 35 36.if defined(__MINIX) 37SUBDIR+= ../minix/lib/libasyn \ 38 ../minix/lib/libaudiodriver \ 39 ../minix/lib/libbdev \ 40 ../minix/lib/libblockdriver \ 41 ../minix/lib/libchardriver \ 42 ../minix/lib/libcompat_minix \ 43 ../minix/lib/libddekit \ 44 ../minix/lib/libdevman \ 45 ../minix/lib/libexec \ 46 ../minix/lib/libfetch \ 47 ../minix/lib/libinputdriver \ 48 ../minix/lib/libminc \ 49 ../minix/lib/libminixfs \ 50 ../minix/lib/libnetdriver \ 51 ../minix/lib/libsffs \ 52 ../minix/lib/libtimers \ 53 ../minix/lib/libusb \ 54 ../minix/lib/libvtreefs 55 56.if (${HAVE_LIBGCC} == "no") 57SUBDIR+= ../minix/lib/libgcc_s_empty 58.endif 59 60.if (${MKLWIP} == "yes") 61SUBDIR+= ../minix/lib/liblwip \ 62 ../minix/lib/libnetsock 63.endif 64 65.if (${MACHINE_ARCH} == "i386") 66SUBDIR+= ../minix/lib/libhgfs \ 67 ../minix/lib/libvassert \ 68 ../minix/lib/libvboxfs \ 69 ../minix/lib/libvirtio 70.endif 71 72.if (${MACHINE_ARCH} == "earm") 73SUBDIR+= ../minix/lib/libclkconf \ 74 ../minix/lib/libgpio \ 75 ../minix/lib/libi2cdriver 76.endif 77 78.endif # defined(__MINIX) 79# 80# The SUBDIRs above are included here for completeness but should be built 81# and installed prior to make(dependall) in this file, as libraries listed 82# below will depend on versions from DESTDIR only. 83# 84 85#SUBDIR+= i18n_module 86 87SUBDIR+= \ 88 libbz2 \ 89 libcrypt \ 90 libm \ 91 libprop \ 92 libpuffs librmt \ 93 libterminfo \ 94 libutil libz 95 96.if !defined(BSD_MK_COMPAT_FILE) 97#SUBDIR+= libkern 98.endif 99 100.if (${MACHINE_CPU} == "arm") 101LIBC_MACHINE_ARCH?=${MACHINE_ARCH} 102.if empty(LIBC_MACHINE_ARCH:M*hf*) 103SUBDIR+= libc_vfp 104.endif 105.endif 106.if (${MKRUMP} != "no") 107SUBDIR+= librumpclient 108.endif 109.if (${MKSKEY} != "no") 110SUBDIR+= libskey 111.endif 112 113.if (${MKMDNS} != "no") 114SUBDIR+= ../external/apache2/mDNSResponder/lib 115.endif 116 117#SUBDIR+= ../external/bsd/am-utils/lib 118 119SUBDIR+= ../external/bsd/flex/lib 120#SUBDIR+= ../external/bsd/tre/lib 121SUBDIR+= ../external/bsd/libelf/lib 122#SUBDIR+= ../external/bsd/liblzf/lib 123#SUBDIR+= ../external/bsd/libpcap/lib 124 125#SUBDIR+= ../external/mit/expat/lib 126 127SUBDIR+= ../external/public-domain/sqlite/lib 128SUBDIR+= ../external/public-domain/xz/lib 129 130#SUBDIR+= ../gnu/lib/libmalloc 131 132.if (${MKGCC} != "no") 133. if ${HAVE_GCC} == 4 134#SUBDIR+= ../gnu/lib/libobjc4 135. else 136. if !defined(__MINIX) || ${MKLIBSTDCXX} == "yes" 137SUBDIR+= ../external/gpl3/gcc/lib/libobjc 138SUBDIR+= ../external/gpl3/gcc/lib/libgomp 139. endif # !defined(__MINIX) || ${MKLIBSTDCXX} == "yes" 140. endif 141. if ${HAVE_GCC} >= 45 && !defined(MLIBDIR) 142. if !defined(__MINIX) || ${MKLIBSTDCXX} == "yes" 143# Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5 144# specific build area, but we get better parallelism this way. 145SUBDIR+= ../external/lgpl3/gmp/lib/libgmp 146SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr 147SUBDIR+= ../external/lgpl3/mpc/lib/libmpc 148. endif # !defined(__MINIX) || ${MKLIBSTDCXX} == "yes" 149. endif 150.endif 151 152# 153# Libraries that depend upon any listed previously 154# (and those that depend upon these [and ...]) 155# 156#==================== 1st library dependency barrier ==================== 157SUBDIR+= .WAIT 158 159.if (${MKCRYPTO} != "no") 160SUBDIR+= ../crypto/external/bsd/netpgp/libmj 161SUBDIR+= ../crypto/external/bsd/netpgp/lib/verify # depends on libz 162.endif 163 164#SUBDIR+= ../external/bsd/libdwarf/lib # depends on libelf 165SUBDIR+= ../external/mit/lua/lib # depends on libm 166SUBDIR+= libcurses # depends on libterminfo 167#SUBDIR+= libdm # depends on libprop 168SUBDIR+= libedit # depends on libterminfo 169SUBDIR+= libexecinfo # depends on libelf 170#SUBDIR+= libppath # depends on libprop 171#SUBDIR+= libperfuse # depends on libpuffs 172#SUBDIR+= libquota # depends on libprop and librpcsvc 173SUBDIR+= librefuse # depends on libpuffs 174#SUBDIR+= libisns # depends on libpthread 175.if (${MKRUMP} != "no") 176SUBDIR+= librumpuser # depends on libpthread 177SUBDIR+= librumphijack # depends on librumpclient and libpthread 178.endif 179 180.if (${MKNPF} != "no") 181SUBDIR+= libnpf # depends on libprop 182.endif 183 184.if (${MKCRYPTO} != "no") 185SUBDIR+= ../crypto/external/bsd/openssl/lib # depends on libcrypt 186.endif 187 188SUBDIR+= ../external/bsd/file/lib # depends on libz 189 190.if (${MKISCSI} != "no") 191SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread 192.endif 193 194SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz 195 196.if (${MKLVM} != "no") 197SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop 198.endif 199 200.if (${MKBINUTILS} != "no") 201SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz 202.endif 203 204.if (${MKLIBCXX} != "no") 205SUBDIR+= ../external/bsd/libc++ 206.endif 207 208.if (${MKGCC} != "no" && ${MKCXX} != "no" && ${MKLIBSTDCXX} != "no") 209. if ${HAVE_GCC} == 4 210SUBDIR+= ../gnu/lib/libstdc++-v3_4 # depends on libm 211SUBDIR+= ../gnu/lib/libsupc++4 212. else 213SUBDIR+= ../external/gpl3/gcc/lib/libstdc++-v3 214SUBDIR+= ../external/gpl3/gcc/lib/libsupc++ 215. endif 216.endif 217 218#==================== 2nd library dependency barrier ==================== 219SUBDIR+= .WAIT 220 221.if (${MKNPF} != "no") 222SUBDIR+= npf # depends on libnpf 223.endif 224 225.if (${MKATF} != "no") 226SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++ 227.endif 228 229.if (${MKKYUA} != "no") 230SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++ 231.endif 232 233SUBDIR+= libform # depends on libcurses 234SUBDIR+= libmenu # depends on libcurses 235#SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no") 236.if (${MKRUMP} != "no") 237SUBDIR+= librump # depends on librumpuser 238.endif 239 240.if (${MKKERBEROS} != "no") 241SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto 242 # libedit, libterminfo, 243.endif 244 245.if (${MKCRYPTO} != "no") 246SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz 247SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ... 248.endif 249 250#SUBDIR+= ../external/bsd/libevent/lib # depends on libcrypto 251#SUBDIR+= ../external/bsd/fetch/lib # depends on libssl 252 253.if (${MKLDAP} != "no") 254SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ... 255.endif 256 257#==================== 3rd library dependency barrier ==================== 258SUBDIR+= .WAIT 259 260#SUBDIR+= ../external/bsd/bind/lib # depends on heimdal, libcrypto 261 262.if (${MKRUMP} != "no") 263SUBDIR+= librumpdev # depends on librump 264SUBDIR+= librumpnet # depends on librump 265SUBDIR+= librumpvfs # depends on librump 266.endif 267 268.if (${MKPAM} != "no") 269SUBDIR+= libpam # depends on heimdal 270.endif 271 272.if (${MKCRYPTO} != "no") 273SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl 274.endif 275 276.if ${MKSLJIT} != "no" 277SUBDIR+= ../external/bsd/sljit/lib 278SUBDIR+= .WAIT 279SUBDIR+= libbpfjit 280.endif 281 282SUBDIR+= ../external/bsd/mdocml/lib 283 284.if (${MKRUMP} != "no") 285#==================== 4th library dependency barrier ==================== 286SUBDIR+= .WAIT 287 288SUBDIR+= libukfs # depends on librumpvfs, librump 289 290.if (${MKTPM} != "no") 291SUBDIR+= ../crypto/external/cpl/trousers/lib 292.endif 293 294#==================== 5th library dependency barrier ==================== 295SUBDIR+= .WAIT 296 297SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs 298 299.if (${MKTPM} != "no") 300SUBDIR+= ../crypto/external/cpl/tpm-tools/lib # depends on trousers 301.endif 302 303.if !defined(BSD_MK_COMPAT_FILE) 304SUBDIR+= ../sys/rump/dev/lib 305SUBDIR+= ../sys/rump/fs/lib 306SUBDIR+= ../sys/rump/kern/lib 307SUBDIR+= ../sys/rump/net/lib 308.endif 309.endif 310 311# Lua bindings come last, they might depend on anything 312SUBDIR+= lua 313 314.include <bsd.buildinstall.mk> 315.include <bsd.subdir.mk> 316