Makefile revision 1.189 1 1.189 rmind # $NetBSD: Makefile,v 1.189 2012/09/16 13:47:41 rmind Exp $
2 1.8 mycroft # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91
3 1.21 cgd
4 1.62 thorpej .include <bsd.own.mk>
5 1.62 thorpej
6 1.188 joerg SUBDIR= csu .WAIT
7 1.155 plunky
8 1.155 plunky .if (${MKGCC} != "no")
9 1.169 mrg . if ${HAVE_GCC} == 4
10 1.169 mrg . if (${USE_COMPILERCRTSTUFF} == "yes")
11 1.188 joerg SUBDIR+= ../gnu/lib/crtstuff4 .WAIT
12 1.169 mrg . endif
13 1.188 joerg SUBDIR+= ../gnu/lib/libgcc4 .WAIT
14 1.169 mrg . else
15 1.169 mrg . if (${USE_COMPILERCRTSTUFF} == "yes")
16 1.188 joerg SUBDIR+= ../external/gpl3/gcc/lib/crtstuff .WAIT
17 1.169 mrg . endif
18 1.188 joerg SUBDIR+= ../external/gpl3/gcc/lib/libgcc .WAIT
19 1.169 mrg . endif
20 1.155 plunky .endif
21 1.155 plunky
22 1.155 plunky SUBDIR+= libc
23 1.155 plunky SUBDIR+= .WAIT
24 1.155 plunky
25 1.155 plunky #
26 1.155 plunky # The SUBDIRs above are included here for completeness but should be built
27 1.155 plunky # and installed prior to make(dependall) in this file, as libraries listed
28 1.155 plunky # below will depend on versions from DESTDIR only.
29 1.155 plunky #
30 1.155 plunky
31 1.158 plunky SUBDIR+= i18n_module
32 1.158 plunky
33 1.158 plunky SUBDIR+= libarch \
34 1.158 plunky libbluetooth libbsdmalloc libbz2 \
35 1.184 matt libcompat libcrypt \
36 1.159 agc libintl libipsec libisns libkvm libm \
37 1.158 plunky libossaudio libpci libpmc libposix libprop libpthread \
38 1.158 plunky libpthread_dbg libpuffs libresolv librmt librpcsvc librt \
39 1.187 christos libtelnet libterminfo \
40 1.158 plunky libusbhid libutil libwrap liby libz
41 1.158 plunky
42 1.187 christos .if (${MKRUMP} != "no")
43 1.187 christos SUBDIR+= librumpclient
44 1.187 christos .endif
45 1.158 plunky .if (${MKSKEY} != "no")
46 1.158 plunky SUBDIR+= libskey
47 1.158 plunky .endif
48 1.60 thorpej
49 1.158 plunky .if (${MKCRYPTO} != "no")
50 1.158 plunky SUBDIR+= ../crypto/external/bsd/netpgp/libmj
51 1.158 plunky .endif
52 1.156 christos
53 1.155 plunky .if (${MKMDNS} != "no")
54 1.155 plunky SUBDIR+= ../external/apache2/mDNSResponder/lib
55 1.155 plunky .endif
56 1.155 plunky
57 1.155 plunky SUBDIR+= ../external/bsd/am-utils/lib
58 1.155 plunky
59 1.155 plunky SUBDIR+= ../external/bsd/flex/lib
60 1.180 christos SUBDIR+= ../external/bsd/tre/lib
61 1.155 plunky SUBDIR+= ../external/bsd/libdwarf/lib
62 1.155 plunky SUBDIR+= ../external/bsd/libelf/lib
63 1.155 plunky SUBDIR+= ../external/bsd/libevent/lib
64 1.163 matt SUBDIR+= ../external/bsd/liblzf/lib
65 1.158 plunky SUBDIR+= ../external/bsd/libpcap/lib
66 1.155 plunky
67 1.155 plunky SUBDIR+= ../external/mit/lua/lib
68 1.182 tron SUBDIR+= ../external/mit/expat/lib
69 1.155 plunky
70 1.179 joerg SUBDIR+= ../external/public-domain/sqlite/lib
71 1.155 plunky SUBDIR+= ../external/public-domain/xz/lib
72 1.155 plunky
73 1.155 plunky SUBDIR+= ../gnu/lib/libmalloc
74 1.155 plunky
75 1.155 plunky .if (${MKGCC} != "no")
76 1.168 mrg . if ${HAVE_GCC} == 4
77 1.155 plunky SUBDIR+= ../gnu/lib/libobjc4
78 1.170 mrg . else
79 1.170 mrg SUBDIR+= ../external/gpl3/gcc/lib/libobjc
80 1.177 mrg SUBDIR+= ../external/gpl3/gcc/lib/libgomp
81 1.168 mrg . endif
82 1.174 plunky . if ${HAVE_GCC} >= 45 && !defined(MLIBDIR)
83 1.173 mrg # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5
84 1.173 mrg # specific build area, but we get better parallelism this way.
85 1.172 matt SUBDIR+= ../external/lgpl3/gmp/lib/libgmp
86 1.174 plunky SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr
87 1.174 plunky SUBDIR+= ../external/lgpl2/mpc/lib/libmpc
88 1.174 plunky . endif
89 1.155 plunky .endif
90 1.144 christos
91 1.89 lukem #
92 1.89 lukem # Libraries that depend upon any listed previously
93 1.93 lukem # (and those that depend upon these [and ...])
94 1.89 lukem #
95 1.97 christos #==================== 1st library dependency barrier ====================
96 1.97 christos SUBDIR+= .WAIT
97 1.97 christos
98 1.158 plunky SUBDIR+= libcurses # depends on libterminfo
99 1.162 haad SUBDIR+= libdm # depends on libprop
100 1.158 plunky SUBDIR+= libedit # depends on libterminfo
101 1.184 matt SUBDIR+= libexecinfo # depends on libelf
102 1.176 dyoung SUBDIR+= libppath # depends on libprop
103 1.175 plunky SUBDIR+= libperfuse # depends on libpuffs
104 1.165 bouyer SUBDIR+= libquota # depends on libprop and librpcsvc
105 1.113 pooka SUBDIR+= librefuse # depends on libpuffs
106 1.187 christos .if (${MKRUMP} != "no")
107 1.126 pooka SUBDIR+= librumpuser # depends on libpthread
108 1.175 plunky SUBDIR+= librumphijack # depends on librumpclient and libpthread
109 1.187 christos .endif
110 1.126 pooka
111 1.161 rmind .if (${MKNPF} != "no")
112 1.161 rmind SUBDIR+= libnpf # depends on libprop
113 1.189 rmind SUBDIR+= npf
114 1.161 rmind .endif
115 1.161 rmind
116 1.148 mrg .if (${MKCRYPTO} != "no")
117 1.158 plunky SUBDIR+= ../crypto/external/bsd/openssl/lib # depends on libcrypt
118 1.148 mrg .endif
119 1.139 mrg
120 1.155 plunky SUBDIR+= ../external/bsd/file/lib # depends on libz
121 1.155 plunky
122 1.155 plunky .if (${MKISCSI} != "no")
123 1.155 plunky SUBDIR+= ../external/bsd/iscsi/lib # depends on libpthread
124 1.155 plunky .endif
125 1.155 plunky
126 1.155 plunky SUBDIR+= ../external/bsd/libarchive/lib # depends on libxz
127 1.155 plunky
128 1.163 matt .if (${MKLVM} != "no")
129 1.163 matt SUBDIR+= ../external/gpl2/lvm2/lib # depends on libprop
130 1.163 matt .endif
131 1.163 matt
132 1.155 plunky .if (${MKBINUTILS} != "no")
133 1.155 plunky SUBDIR+= ../external/gpl3/binutils/lib # libbfd depends on libz
134 1.155 plunky .endif
135 1.155 plunky
136 1.155 plunky .if (${MKGCC} != "no" && ${MKCXX} != "no")
137 1.168 mrg . if ${HAVE_GCC} == 4
138 1.155 plunky SUBDIR+= ../gnu/lib/libstdc++-v3_4 # depends on libm
139 1.155 plunky SUBDIR+= ../gnu/lib/libsupc++4
140 1.170 mrg . else
141 1.170 mrg SUBDIR+= ../external/gpl3/gcc/lib/libstdc++-v3
142 1.170 mrg SUBDIR+= ../external/gpl3/gcc/lib/libsupc++
143 1.168 mrg . endif
144 1.155 plunky .endif
145 1.155 plunky
146 1.97 christos #==================== 2nd library dependency barrier ====================
147 1.97 christos SUBDIR+= .WAIT
148 1.97 christos
149 1.185 christos .if (${MKATF} != "no")
150 1.186 christos SUBDIR+= ../external/bsd/atf/lib # depends on libstdc++
151 1.185 christos .endif
152 1.185 christos
153 1.158 plunky SUBDIR+= libform # depends on libcurses
154 1.175 plunky SUBDIR+= libmenu # depends on libcurses
155 1.175 plunky SUBDIR+= libradius # depends on libcrypto if (${MKCRYPTO} != "no")
156 1.187 christos .if (${MKRUMP} != "no")
157 1.175 plunky SUBDIR+= librump # depends on librumpuser
158 1.187 christos .endif
159 1.158 plunky
160 1.100 christos .if (${MKKERBEROS} != "no")
161 1.166 elric SUBDIR+= ../crypto/external/bsd/heimdal/lib # depends on libcrypto
162 1.166 elric # libedit, libterminfo,
163 1.100 christos .endif
164 1.100 christos
165 1.158 plunky .if (${MKCRYPTO} != "no")
166 1.158 plunky SUBDIR+= ../crypto/external/bsd/openssh/lib # depends on libcrypto, libz
167 1.158 plunky SUBDIR+= ../crypto/external/bsd/netpgp/lib # depends on libcrypto, ...
168 1.158 plunky .endif
169 1.158 plunky
170 1.158 plunky SUBDIR+= ../external/bsd/bind/lib # depends on libcrypto
171 1.158 plunky SUBDIR+= ../external/bsd/fetch/lib # depends on libssl
172 1.158 plunky
173 1.158 plunky .if (${MKLDAP} != "no")
174 1.158 plunky SUBDIR+= ../external/bsd/openldap/lib # depends on libcrypto, ...
175 1.158 plunky .endif
176 1.158 plunky
177 1.124 lukem #==================== 3rd library dependency barrier ====================
178 1.124 lukem SUBDIR+= .WAIT
179 1.124 lukem
180 1.187 christos .if (${MKRUMP} != "no")
181 1.143 pooka SUBDIR+= librumpdev # depends on librump
182 1.128 pooka SUBDIR+= librumpnet # depends on librump
183 1.130 pooka SUBDIR+= librumpvfs # depends on librump
184 1.187 christos .endif
185 1.126 pooka
186 1.175 plunky .if (${MKPAM} != "no")
187 1.175 plunky SUBDIR+= libpam # depends on heimdal
188 1.175 plunky .endif
189 1.175 plunky
190 1.175 plunky .if (${MKCRYPTO} != "no")
191 1.175 plunky SUBDIR+= ../crypto/external/bsd/libsaslc # depends on heimdal, openssl
192 1.175 plunky .endif
193 1.175 plunky
194 1.181 joerg SUBDIR+= ../external/bsd/mdocml/lib
195 1.181 joerg
196 1.187 christos .if (${MKRUMP} != "no")
197 1.126 pooka #==================== 4th library dependency barrier ====================
198 1.126 pooka SUBDIR+= .WAIT
199 1.158 plunky
200 1.158 plunky SUBDIR+= libukfs # depends on librumpvfs, librump
201 1.131 pooka
202 1.131 pooka #==================== 5th library dependency barrier ====================
203 1.131 pooka SUBDIR+= .WAIT
204 1.158 plunky
205 1.158 plunky SUBDIR+= libp2k # depends on libukfs, librumpvfs, libpuffs
206 1.188 joerg
207 1.188 joerg .if !defined(BSD_MK_COMPAT_FILE)
208 1.188 joerg SUBDIR+= ../sys/rump/dev/lib
209 1.188 joerg SUBDIR+= ../sys/rump/fs/lib
210 1.188 joerg SUBDIR+= ../sys/rump/kern/lib
211 1.188 joerg SUBDIR+= ../sys/rump/net/lib
212 1.188 joerg .endif
213 1.187 christos .endif
214 1.158 plunky
215 1.178 mbalmer # Lua bindings come last, they might depend on anything
216 1.178 mbalmer SUBDIR+= lua
217 1.178 mbalmer
218 1.188 joerg #
219 1.188 joerg # build_install logic for src/Makefile.
220 1.188 joerg # Compute a list of subdirectories delimited by .WAIT.
221 1.188 joerg # Run "make dependall && make install" for all subdirectories in a group
222 1.188 joerg # concurrently, but wait after each group.
223 1.188 joerg #
224 1.188 joerg SUBDIR_GROUPS= 1
225 1.188 joerg CUR_GROUP:= 1
226 1.188 joerg .for dir in ${SUBDIR}
227 1.188 joerg . if ${dir} == ".WAIT"
228 1.188 joerg CUR_GROUP:= ${CUR_GROUP}1
229 1.188 joerg SUBDIR_GROUPS:= ${SUBDIR_GROUPS} ${CUR_GROUP}
230 1.188 joerg . else
231 1.188 joerg SUBDIR_GROUP.${CUR_GROUP}+= ${dir}
232 1.188 joerg .endif
233 1.188 joerg
234 1.188 joerg .endfor
235 1.188 joerg
236 1.188 joerg build_install:
237 1.188 joerg .for group in ${SUBDIR_GROUPS}
238 1.188 joerg . if !empty(SUBDIR_GROUP.${group})
239 1.188 joerg ${MAKEDIRTARGET} . ${SUBDIR_GROUP.${group}:C/^/dependall-/}
240 1.188 joerg ${MAKEDIRTARGET} . ${SUBDIR_GROUP.${group}:C/^/install-/}
241 1.188 joerg . endif
242 1.188 joerg .endfor
243 1.188 joerg
244 1.1 cgd .include <bsd.subdir.mk>
245