1# $NetBSD: Makefile,v 1.189 2012/09/16 13:47:41 rmind 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#LSC MINIX libc depends on libminlib because of minix/malloc-debug.c 23SUBDIR+= libminlib 24SUBDIR+= .WAIT 25 26SUBDIR+= libsys 27SUBDIR+= .WAIT 28 29SUBDIR+= libc 30SUBDIR+= .WAIT 31 32# 33# The SUBDIRs above are included here for completeness but should be built 34# and installed prior to make(dependall) in this file, as libraries listed 35# below will depend on versions from DESTDIR only. 36# 37 38#SUBDIR+= i18n_module 39 40SUBDIR+= libcompat_minix libblockdriver libchardriver \ 41 libnetdriver libm libtimers libutil \ 42 libz libfetch libvtreefs libaudiodriver libmthread \ 43 libexec libdevman libusb libasyn librmt \ 44 libddekit libminixfs libbdev libelf libminc libcrypt libterminfo \ 45 libutil libbz2 libprop \ 46 libpuffs libsffs libinputdriver 47 48.if (${MKLWIP} == "yes") 49SUBDIR += liblwip libnetsock 50.endif 51 52.if (${MACHINE_ARCH} == "i386") 53SUBDIR += libvassert libhgfs libvboxfs libvirtio 54.endif 55 56.if (${MACHINE_ARCH} == "earm") 57SUBDIR += libclkconf libgpio libi2cdriver 58.endif 59 60.if (${MKRUMP} != "no") 61SUBDIR+= librumpclient 62.endif 63.if (${MKSKEY} != "no") 64SUBDIR+= libskey 65.endif 66 67.if (${MKCRYPTO} != "no") 68SUBDIR+= ../crypto/external/bsd/netpgp/libmj 69.endif 70 71.if (${MKMDNS} != "no") 72SUBDIR+= ../external/apache2/mDNSResponder/lib 73.endif 74 75#SUBDIR+= ../external/bsd/am-utils/lib 76 77SUBDIR+= ../external/bsd/flex/lib 78#SUBDIR+= ../external/bsd/tre/lib 79#SUBDIR+= ../external/bsd/libdwarf/lib 80#SUBDIR+= ../external/bsd/libelf/lib 81#SUBDIR+= ../external/bsd/libevent/lib 82#SUBDIR+= ../external/bsd/liblzf/lib 83#SUBDIR+= ../external/bsd/libpcap/lib 84 85SUBDIR+= ../external/mit/lua/lib 86#SUBDIR+= ../external/mit/expat/lib 87 88SUBDIR+= ../external/public-domain/sqlite/lib 89SUBDIR+= ../external/public-domain/xz/lib 90 91#SUBDIR+= ../gnu/lib/libmalloc 92 93.if (${MKGCC} != "no") 94. if ${HAVE_GCC} == 4 95#SUBDIR+= ../gnu/lib/libobjc4 96. else 97#SUBDIR+= ../external/gpl3/gcc/lib/libobjc 98#SUBDIR+= ../external/gpl3/gcc/lib/libgomp 99. endif 100# LSC: Replaced __MINIX test with MKGCCCMDS, as we do not want gcc by default 101# nor the libraries, but we still want toretain the possibility of 102# installing GCC from the base system. 103. if ${HAVE_GCC} >= 45 && !defined(MLIBDIR) && ${MKGCCCMDS} == "yes" 104# Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5 105# specific build area, but we get better parallelism this way. 106SUBDIR+= ../external/lgpl3/gmp/lib/libgmp 107SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr 108SUBDIR+= ../external/lgpl2/mpc/lib/libmpc 109. endif 110.endif 111 112# 113# Libraries that depend upon any listed previously 114# (and those that depend upon these [and ...]) 115# 116#==================== 1st library dependency barrier ==================== 117SUBDIR+= .WAIT 118 119SUBDIR+= libcurses # depends on libterminfo 120#SUBDIR+= libdm # depends on libprop 121SUBDIR+= libedit # depends on libterminfo 122#SUBDIR+= libexecinfo # depends on libelf 123#SUBDIR+= libppath # depends on libprop 124#SUBDIR+= libperfuse # depends on libpuffs 125#SUBDIR+= libquota # depends on libprop and librpcsvc 126SUBDIR+= librefuse # depends on libpuffs 127.if (${MKRUMP} != "no") 128SUBDIR+= librumpuser # depends on libpthread 129SUBDIR+= librumphijack # depends on librumpclient and libpthread 130.endif 131 132.if (${MKNPF} != "no") 133SUBDIR+= libnpf # depends on libprop 134#SUBDIR+= npf 135.endif 136 137.if (${MKCRYPTO} != "no") 138SUBDIR+= ../crypto/external/bsd/openssl/lib # depends on libcrypt 139.endif 140 141SUBDIR+= ../external/bsd/file/lib # depends on libz 142 143.if (${MKISCSI} != "no") 144SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread 145.endif 146 147SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz 148 149.if (${MKLVM} != "no") 150SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop 151.endif 152 153.if (${MKBINUTILS} != "no") 154SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz 155.endif 156 157.if (${MKGCC} != "no" && ${MKCXX} != "no") 158.if (defined(__MINIX) && ${MKGCCCMDS} == "yes") 159. if ${HAVE_GCC} == 4 160SUBDIR+= ../gnu/lib/libstdc++-v3_4 # depends on libm 161SUBDIR+= ../gnu/lib/libsupc++4 162. else 163SUBDIR+= ../external/gpl3/gcc/lib/libstdc++-v3 164SUBDIR+= ../external/gpl3/gcc/lib/libsupc++ 165. endif 166.endif # (defined(__MINIX) && ${MKGCCCMDS} == "yes") 167.endif 168 169#==================== 2nd library dependency barrier ==================== 170SUBDIR+= .WAIT 171 172.if (defined(__MINIX) && ${MKGCCCMDS} == "yes") 173.if (${MKATF} != "no") 174SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++ 175.endif 176 177.if (${MKKYUA} != "no") 178SUBDIR+= ../external/bsd/lutok/lib # depends on lua and libstdc++ 179.endif 180.endif # (defined(__MINIX) && ${MKGCCCMDS} == "yes") 181 182SUBDIR+= libform # depends on libcurses 183SUBDIR+= libmenu # depends on libcurses 184#SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no") 185.if (${MKRUMP} != "no") 186SUBDIR+= librump # depends on librumpuser 187.endif 188 189.if (${MKKERBEROS} != "no") 190SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto 191 # libedit, libterminfo, 192.endif 193 194.if (${MKCRYPTO} != "no") 195SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz 196SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ... 197.endif 198 199#SUBDIR+= ../external/bsd/bind/lib # depends on libcrypto 200#SUBDIR+= ../external/bsd/fetch/lib # depends on libssl 201 202.if (${MKLDAP} != "no") 203SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ... 204.endif 205 206#==================== 3rd library dependency barrier ==================== 207SUBDIR+= .WAIT 208 209.if (${MKRUMP} != "no") 210SUBDIR+= librumpdev # depends on librump 211SUBDIR+= librumpnet # depends on librump 212SUBDIR+= librumpvfs # depends on librump 213.endif 214 215.if (${MKPAM} != "no") 216SUBDIR+= libpam # depends on heimdal 217.endif 218 219.if (${MKCRYPTO} != "no") 220SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl 221.endif 222 223#SUBDIR+= ../external/bsd/mdocml/lib 224 225.if (${MKRUMP} != "no") 226#==================== 4th library dependency barrier ==================== 227SUBDIR+= .WAIT 228 229SUBDIR+= libukfs # depends on librumpvfs, librump 230 231#==================== 5th library dependency barrier ==================== 232SUBDIR+= .WAIT 233 234SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs 235 236.if !defined(BSD_MK_COMPAT_FILE) 237SUBDIR+= ../sys/rump/dev/lib 238SUBDIR+= ../sys/rump/fs/lib 239SUBDIR+= ../sys/rump/kern/lib 240SUBDIR+= ../sys/rump/net/lib 241.endif 242.endif 243 244# Lua bindings come last, they might depend on anything 245#SUBDIR+= lua 246 247# 248# build_install logic for src/Makefile. 249# Compute a list of subdirectories delimited by .WAIT. 250# Run "make dependall && make install" for all subdirectories in a group 251# concurrently, but wait after each group. 252# 253SUBDIR_GROUPS= 1 254CUR_GROUP:= 1 255.for dir in ${SUBDIR} 256. if ${dir} == ".WAIT" 257CUR_GROUP:= ${CUR_GROUP}1 258SUBDIR_GROUPS:= ${SUBDIR_GROUPS} ${CUR_GROUP} 259. else 260SUBDIR_GROUP.${CUR_GROUP}+= ${dir} 261.endif 262 263.endfor 264 265build_install: 266.for group in ${SUBDIR_GROUPS} 267. if !empty(SUBDIR_GROUP.${group}) 268 ${MAKEDIRTARGET} . ${SUBDIR_GROUP.${group}:C/^/dependall-/} 269 ${MAKEDIRTARGET} . ${SUBDIR_GROUP.${group}:C/^/install-/} 270. endif 271.endfor 272 273.include <bsd.subdir.mk> 274