release.sh: restore -jJAILDIR option
[minix.git] / lib / Makefile
blobcc4880d9489898bd783ff9c3552f38432869e6b1
1 # $NetBSD: Makefile,v 1.188 2012/08/17 16:22:27 joerg Exp $
2 # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91
4 .include <bsd.own.mk>
6 SUBDIR= csu .WAIT
8 .if (${MKGCC} != "no")
9 . if ${HAVE_GCC} == 4
10 . if (${USE_COMPILERCRTSTUFF} == "yes")
11 SUBDIR+= ../gnu/lib/crtstuff4 .WAIT
12 . endif
13 SUBDIR+= ../gnu/lib/libgcc4 .WAIT
14 . else
15 . if (${USE_COMPILERCRTSTUFF} == "yes")
16 SUBDIR+= ../external/gpl3/gcc/lib/crtstuff .WAIT
17 . endif
18 SUBDIR+= ../external/gpl3/gcc/lib/libgcc .WAIT
19 . endif
20 .endif
22 #LSC MINIX libc depends on libminlib because of minix/malloc-debug.c
23 SUBDIR+= libminlib
24 SUBDIR+= .WAIT
26 SUBDIR+= libsys
27 SUBDIR+= .WAIT
29 SUBDIR+= libc
30 SUBDIR+= .WAIT
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.
38 #SUBDIR+= i18n_module
40 SUBDIR+= libcompat_minix libblockdriver libchardriver \
41 libnetdriver libedit libm libtimers libutil \
42 libz libfetch libvtreefs libaudiodriver libmthread \
43 libexec libdevman libusb libasyn librmt \
44 libddekit libminixfs libbdev libelf libminc libcrypt libterminfo \
45 libvassert libutil libbz2 libprop \
46 libnetsock libpuffs libsffs libhgfs libvboxfs
48 .if (${MKRUMP} != "no")
49 SUBDIR+= librumpclient
50 .endif
51 .if (${MKSKEY} != "no")
52 SUBDIR+= libskey
53 .endif
55 .if (${MKCRYPTO} != "no")
56 SUBDIR+= ../crypto/external/bsd/netpgp/libmj
57 .endif
59 .if (${MKMDNS} != "no")
60 SUBDIR+= ../external/apache2/mDNSResponder/lib
61 .endif
63 #SUBDIR+= ../external/bsd/am-utils/lib
65 SUBDIR+= ../external/bsd/flex/lib
66 #SUBDIR+= ../external/bsd/tre/lib
67 #SUBDIR+= ../external/bsd/libdwarf/lib
68 #SUBDIR+= ../external/bsd/libelf/lib
69 #SUBDIR+= ../external/bsd/libevent/lib
70 #SUBDIR+= ../external/bsd/liblzf/lib
71 #SUBDIR+= ../external/bsd/libpcap/lib
73 #SUBDIR+= ../external/mit/lua/lib
74 #SUBDIR+= ../external/mit/expat/lib
76 #SUBDIR+= ../external/public-domain/sqlite/lib
77 SUBDIR+= ../external/public-domain/xz/lib
79 #SUBDIR+= ../gnu/lib/libmalloc
81 .if (${MKGCC} != "no")
82 . if ${HAVE_GCC} == 4
83 #SUBDIR+= ../gnu/lib/libobjc4
84 . else
85 #SUBDIR+= ../external/gpl3/gcc/lib/libobjc
86 #SUBDIR+= ../external/gpl3/gcc/lib/libgomp
87 . endif
88 . if ${HAVE_GCC} >= 45 && !defined(MLIBDIR) && !defined(__MINIX)
89 # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
90 # specific build area, but we get better parallelism this way.
91 SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
92 SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
93 SUBDIR+= ../external/lgpl2/mpc/lib/libmpc
94 . endif
95 .endif
98 # Libraries that depend upon any listed previously
99 # (and those that depend upon these [and ...])
101 #==================== 1st library dependency barrier ====================
102 SUBDIR+= .WAIT
104 SUBDIR+= libcurses # depends on libterminfo
105 #SUBDIR+= libdm # depends on libprop
106 #SUBDIR+= libedit # depends on libterminfo
107 #SUBDIR+= libexecinfo # depends on libelf
108 #SUBDIR+= libppath # depends on libprop
109 #SUBDIR+= libperfuse # depends on libpuffs
110 #SUBDIR+= libquota # depends on libprop and librpcsvc
111 SUBDIR+= librefuse # depends on libpuffs
112 .if (${MKRUMP} != "no")
113 SUBDIR+= librumpuser # depends on libpthread
114 SUBDIR+= librumphijack # depends on librumpclient and libpthread
115 .endif
117 .if (${MKNPF} != "no")
118 SUBDIR+= libnpf # depends on libprop
119 .endif
121 .if (${MKCRYPTO} != "no")
122 SUBDIR+= ../crypto/external/bsd/openssl/lib # depends on libcrypt
123 .endif
125 #SUBDIR+= ../external/bsd/file/lib # depends on libz
127 .if (${MKISCSI} != "no")
128 SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
129 .endif
131 SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz
133 .if (${MKLVM} != "no")
134 SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
135 .endif
137 .if (${MKBINUTILS} != "no")
138 SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz
139 .endif
141 .if (${MKGCC} != "no" && ${MKCXX} != "no")
142 . if ${HAVE_GCC} == 4
143 SUBDIR+= ../gnu/lib/libstdc++-v3_4 # depends on libm
144 SUBDIR+= ../gnu/lib/libsupc++4
145 . else
146 #SUBDIR+= ../external/gpl3/gcc/lib/libstdc++-v3
147 #SUBDIR+= ../external/gpl3/gcc/lib/libsupc++
148 . endif
149 .endif
151 #==================== 2nd library dependency barrier ====================
152 SUBDIR+= .WAIT
154 .if (${MKATF} != "no")
155 SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
156 .endif
158 #SUBDIR+= libform # depends on libcurses
159 #SUBDIR+= libmenu # depends on libcurses
160 #SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no")
161 .if (${MKRUMP} != "no")
162 SUBDIR+= librump # depends on librumpuser
163 .endif
165 .if (${MKKERBEROS} != "no")
166 SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
167 # libedit, libterminfo,
168 .endif
170 .if (${MKCRYPTO} != "no")
171 SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
172 SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
173 .endif
175 #SUBDIR+= ../external/bsd/bind/lib # depends on libcrypto
176 #SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
178 .if (${MKLDAP} != "no")
179 SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
180 .endif
182 #==================== 3rd library dependency barrier ====================
183 SUBDIR+= .WAIT
185 .if (${MKRUMP} != "no")
186 SUBDIR+= librumpdev # depends on librump
187 SUBDIR+= librumpnet # depends on librump
188 SUBDIR+= librumpvfs # depends on librump
189 .endif
191 .if (${MKPAM} != "no")
192 SUBDIR+= libpam # depends on heimdal
193 .endif
195 .if (${MKCRYPTO} != "no")
196 SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
197 .endif
199 #SUBDIR+= ../external/bsd/mdocml/lib
201 .if (${MKRUMP} != "no")
202 #==================== 4th library dependency barrier ====================
203 SUBDIR+= .WAIT
205 SUBDIR+= libukfs # depends on librumpvfs, librump
207 #==================== 5th library dependency barrier ====================
208 SUBDIR+= .WAIT
210 SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
212 .if !defined(BSD_MK_COMPAT_FILE)
213 SUBDIR+= ../sys/rump/dev/lib
214 SUBDIR+= ../sys/rump/fs/lib
215 SUBDIR+= ../sys/rump/kern/lib
216 SUBDIR+= ../sys/rump/net/lib
217 .endif
218 .endif
220 # Lua bindings come last, they might depend on anything
221 #SUBDIR+= lua
224 # build_install logic for src/Makefile.
225 # Compute a list of subdirectories delimited by .WAIT.
226 # Run "make dependall && make install" for all subdirectories in a group
227 # concurrently, but wait after each group.
229 SUBDIR_GROUPS= 1
230 CUR_GROUP:= 1
231 .for dir in ${SUBDIR}
232 . if ${dir} == ".WAIT"
233 CUR_GROUP:= ${CUR_GROUP}1
234 SUBDIR_GROUPS:= ${SUBDIR_GROUPS} ${CUR_GROUP}
235 . else
236 SUBDIR_GROUP.${CUR_GROUP}+= ${dir}
237 .endif
239 .endfor
241 build_install:
242 .for group in ${SUBDIR_GROUPS}
243 . if !empty(SUBDIR_GROUP.${group})
244 ${MAKEDIRTARGET} . ${SUBDIR_GROUP.${group}:C/^/dependall-/}
245 ${MAKEDIRTARGET} . ${SUBDIR_GROUP.${group}:C/^/install-/}
246 . endif
247 .endfor
249 .include <bsd.subdir.mk>