add opendir alias
[minix.git] / lib / Makefile
blob92ab849418a39cbf6b13357d6a900a2593cb3fda
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
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 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 libnetsock libpuffs libsffs
48 .if (${MACHINE_ARCH} == "i386")
49 SUBDIR += libvassert libhgfs libvboxfs libvirtio
50 .endif
52 .if (${MACHINE_ARCH} == "earm")
53 SUBDIR += libgpio libpadconf
54 .endif
56 .if (${MKRUMP} != "no")
57 SUBDIR+= librumpclient
58 .endif
59 .if (${MKSKEY} != "no")
60 SUBDIR+= libskey
61 .endif
63 .if (${MKCRYPTO} != "no")
64 SUBDIR+= ../crypto/external/bsd/netpgp/libmj
65 .endif
67 .if (${MKMDNS} != "no")
68 SUBDIR+= ../external/apache2/mDNSResponder/lib
69 .endif
71 #SUBDIR+= ../external/bsd/am-utils/lib
73 SUBDIR+= ../external/bsd/flex/lib
74 #SUBDIR+= ../external/bsd/tre/lib
75 #SUBDIR+= ../external/bsd/libdwarf/lib
76 #SUBDIR+= ../external/bsd/libelf/lib
77 #SUBDIR+= ../external/bsd/libevent/lib
78 #SUBDIR+= ../external/bsd/liblzf/lib
79 #SUBDIR+= ../external/bsd/libpcap/lib
81 #SUBDIR+= ../external/mit/lua/lib
82 #SUBDIR+= ../external/mit/expat/lib
84 #SUBDIR+= ../external/public-domain/sqlite/lib
85 SUBDIR+= ../external/public-domain/xz/lib
87 #SUBDIR+= ../gnu/lib/libmalloc
89 .if (${MKGCC} != "no")
90 . if ${HAVE_GCC} == 4
91 #SUBDIR+= ../gnu/lib/libobjc4
92 . else
93 #SUBDIR+= ../external/gpl3/gcc/lib/libobjc
94 #SUBDIR+= ../external/gpl3/gcc/lib/libgomp
95 . endif
96 . if ${HAVE_GCC} >= 45 && !defined(MLIBDIR) && !defined(__MINIX)
97 # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
98 # specific build area, but we get better parallelism this way.
99 SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
100 SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
101 SUBDIR+= ../external/lgpl2/mpc/lib/libmpc
102 . endif
103 .endif
106 # Libraries that depend upon any listed previously
107 # (and those that depend upon these [and ...])
109 #==================== 1st library dependency barrier ====================
110 SUBDIR+= .WAIT
112 SUBDIR+= libcurses # depends on libterminfo
113 #SUBDIR+= libdm # depends on libprop
114 SUBDIR+= libedit # depends on libterminfo
115 #SUBDIR+= libexecinfo # depends on libelf
116 #SUBDIR+= libppath # depends on libprop
117 #SUBDIR+= libperfuse # depends on libpuffs
118 #SUBDIR+= libquota # depends on libprop and librpcsvc
119 SUBDIR+= librefuse # depends on libpuffs
120 .if (${MKRUMP} != "no")
121 SUBDIR+= librumpuser # depends on libpthread
122 SUBDIR+= librumphijack # depends on librumpclient and libpthread
123 .endif
125 .if (${MKNPF} != "no")
126 SUBDIR+= libnpf # depends on libprop
127 #SUBDIR+= npf
128 .endif
130 .if (${MKCRYPTO} != "no")
131 SUBDIR+= ../crypto/external/bsd/openssl/lib # depends on libcrypt
132 .endif
134 #SUBDIR+= ../external/bsd/file/lib # depends on libz
136 .if (${MKISCSI} != "no")
137 SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
138 .endif
140 SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz
142 .if (${MKLVM} != "no")
143 SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
144 .endif
146 .if (${MKBINUTILS} != "no")
147 SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz
148 .endif
150 .if (${MKGCC} != "no" && ${MKCXX} != "no")
151 . if ${HAVE_GCC} == 4
152 SUBDIR+= ../gnu/lib/libstdc++-v3_4 # depends on libm
153 SUBDIR+= ../gnu/lib/libsupc++4
154 . else
155 #SUBDIR+= ../external/gpl3/gcc/lib/libstdc++-v3
156 #SUBDIR+= ../external/gpl3/gcc/lib/libsupc++
157 . endif
158 .endif
160 #==================== 2nd library dependency barrier ====================
161 SUBDIR+= .WAIT
163 .if (${MKATF} != "no")
164 SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
165 .endif
167 #SUBDIR+= libform # depends on libcurses
168 #SUBDIR+= libmenu # depends on libcurses
169 #SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no")
170 .if (${MKRUMP} != "no")
171 SUBDIR+= librump # depends on librumpuser
172 .endif
174 .if (${MKKERBEROS} != "no")
175 SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
176 # libedit, libterminfo,
177 .endif
179 .if (${MKCRYPTO} != "no")
180 SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
181 SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
182 .endif
184 #SUBDIR+= ../external/bsd/bind/lib # depends on libcrypto
185 #SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
187 .if (${MKLDAP} != "no")
188 SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
189 .endif
191 #==================== 3rd library dependency barrier ====================
192 SUBDIR+= .WAIT
194 .if (${MKRUMP} != "no")
195 SUBDIR+= librumpdev # depends on librump
196 SUBDIR+= librumpnet # depends on librump
197 SUBDIR+= librumpvfs # depends on librump
198 .endif
200 .if (${MKPAM} != "no")
201 SUBDIR+= libpam # depends on heimdal
202 .endif
204 .if (${MKCRYPTO} != "no")
205 SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
206 .endif
208 #SUBDIR+= ../external/bsd/mdocml/lib
210 .if (${MKRUMP} != "no")
211 #==================== 4th library dependency barrier ====================
212 SUBDIR+= .WAIT
214 SUBDIR+= libukfs # depends on librumpvfs, librump
216 #==================== 5th library dependency barrier ====================
217 SUBDIR+= .WAIT
219 SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
221 .if !defined(BSD_MK_COMPAT_FILE)
222 SUBDIR+= ../sys/rump/dev/lib
223 SUBDIR+= ../sys/rump/fs/lib
224 SUBDIR+= ../sys/rump/kern/lib
225 SUBDIR+= ../sys/rump/net/lib
226 .endif
227 .endif
229 # Lua bindings come last, they might depend on anything
230 #SUBDIR+= lua
233 # build_install logic for src/Makefile.
234 # Compute a list of subdirectories delimited by .WAIT.
235 # Run "make dependall && make install" for all subdirectories in a group
236 # concurrently, but wait after each group.
238 SUBDIR_GROUPS= 1
239 CUR_GROUP:= 1
240 .for dir in ${SUBDIR}
241 . if ${dir} == ".WAIT"
242 CUR_GROUP:= ${CUR_GROUP}1
243 SUBDIR_GROUPS:= ${SUBDIR_GROUPS} ${CUR_GROUP}
244 . else
245 SUBDIR_GROUP.${CUR_GROUP}+= ${dir}
246 .endif
248 .endfor
250 build_install:
251 .for group in ${SUBDIR_GROUPS}
252 . if !empty(SUBDIR_GROUP.${group})
253 ${MAKEDIRTARGET} . ${SUBDIR_GROUP.${group}:C/^/dependall-/}
254 ${MAKEDIRTARGET} . ${SUBDIR_GROUP.${group}:C/^/install-/}
255 . endif
256 .endfor
258 .include <bsd.subdir.mk>