CLOSED TREE: TraceMonkey merge head. (a=blockers)
[mozilla-central.git] / toolkit / toolkit-tiers.mk
blob5c381a287d947034803cc5282ff2aeed65c91406
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # The Original Code is the Mozilla build system.
16 # The Initial Developer of the Original Code is
17 # the Mozilla Foundation <http://www.mozilla.org/>.
18 # Portions created by the Initial Developer are Copyright (C) 2006
19 # the Initial Developer. All Rights Reserved.
21 # Contributor(s):
22 # Benjamin Smedberg <benjamin@smedbergs.us> (Initial Code)
24 # Alternatively, the contents of this file may be used under the terms of
25 # either the GNU General Public License Version 2 or later (the "GPL"), or
26 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
38 ifdef LIBXUL_SDK
39 $(error toolkit-tiers.mk is not compatible with --enable-libxul-sdk=)
40 endif
42 include $(topsrcdir)/config/nspr/build.mk
43 include $(topsrcdir)/config/js/build.mk
45 TIERS += platform
47 ifdef NS_TRACE_MALLOC
48 tier_platform_dirs = tools/trace-malloc/lib
49 endif
51 ifdef MOZ_TREE_FREETYPE
52 tier_platform_staticdirs += modules/freetype2
53 endif
55 tier_platform_dirs += xpcom
57 ifndef MOZ_NATIVE_ZLIB
58 tier_platform_dirs += modules/zlib
59 endif
61 ifndef WINCE
62 tier_platform_dirs += modules/libreg
63 endif
65 tier_platform_dirs += \
66 modules/libpref \
67 intl \
68 netwerk \
69 $(NULL)
71 ifdef MOZ_AUTH_EXTENSION
72 tier_platform_dirs += extensions/auth
73 endif
76 # "external" - 3rd party individual libraries
79 ifndef MOZ_NATIVE_JPEG
80 tier_platform_dirs += jpeg
81 endif
83 # Installer needs standalone libjar, hence standalone zlib
84 ifdef MOZ_INSTALLER
85 tier_platform_dirs += modules/zlib/standalone
86 endif
88 ifdef MOZ_UPDATER
89 ifndef MOZ_NATIVE_BZ2
90 tier_platform_dirs += modules/libbz2
91 endif
92 tier_platform_dirs += modules/libmar
93 tier_platform_dirs += other-licenses/bsdiff
94 endif
96 tier_platform_dirs += gfx/qcms
98 ifeq ($(OS_ARCH),WINCE)
99 tier_platform_dirs += modules/lib7z
100 endif
103 # "gecko" - core components
106 ifdef MOZ_IPC
107 tier_platform_dirs += ipc js/ipc js/jetpack
108 endif
110 tier_platform_dirs += \
111 js/src/xpconnect \
112 intl/chardet \
113 $(NULL)
115 ifdef MOZ_ENABLE_GTK2
116 ifdef MOZ_X11
117 tier_platform_dirs += widget/src/gtkxtbin
118 endif
119 endif
121 tier_platform_dirs += \
122 modules/libjar \
123 db \
124 $(NULL)
126 ifdef MOZ_PERMISSIONS
127 tier_platform_dirs += \
128 extensions/cookie \
129 extensions/permissions \
130 $(NULL)
131 endif
133 ifdef MOZ_STORAGE
134 tier_platform_dirs += storage
135 endif
137 ifdef MOZ_RDF
138 tier_platform_dirs += rdf
139 endif
141 ifdef MOZ_JSDEBUGGER
142 tier_platform_dirs += js/jsd
143 endif
145 ifdef MOZ_VORBIS
146 tier_platform_dirs += \
147 media/libvorbis \
148 $(NULL)
149 endif
151 ifdef MOZ_TREMOR
152 tier_platform_dirs += \
153 media/libtremor \
154 $(NULL)
155 endif
157 ifdef MOZ_WEBM
158 tier_platform_dirs += media/libnestegg
159 ifndef MOZ_NATIVE_LIBVPX
160 tier_platform_dirs += media/libvpx
161 endif
162 endif
164 ifdef MOZ_OGG
165 tier_platform_dirs += \
166 media/libogg \
167 media/libtheora \
168 $(NULL)
169 endif
171 ifdef MOZ_SYDNEYAUDIO
172 tier_platform_dirs += \
173 media/libsydneyaudio \
174 $(NULL)
175 endif
177 tier_platform_dirs += \
178 uriloader \
179 modules/libimg \
180 caps \
181 parser \
182 gfx \
183 modules/libpr0n \
184 modules/plugin \
185 dom \
186 view \
187 widget \
188 content \
189 editor \
190 layout \
191 docshell \
192 webshell \
193 embedding \
194 xpfe/appshell \
195 $(NULL)
197 ifdef MOZ_UNIVERSALCHARDET
198 tier_platform_dirs += extensions/universalchardet
199 endif
201 ifdef ACCESSIBILITY
202 tier_platform_dirs += accessible
203 endif
206 # "toolkit" - xpfe & toolkit
209 tier_platform_dirs += profile
211 # This must preceed xpfe
212 ifdef MOZ_JPROF
213 tier_platform_dirs += tools/jprof
214 endif
216 tier_platform_dirs += xpfe/components
218 ifdef MOZ_ENABLE_XREMOTE
219 tier_platform_dirs += widget/src/xremoteclient
220 endif
222 ifdef MOZ_SPELLCHECK
223 tier_platform_dirs += extensions/spellcheck
224 endif
226 tier_platform_dirs += toolkit
228 ifdef MOZ_PSM
229 tier_platform_dirs += security/manager
230 else
231 tier_platform_dirs += security/manager/boot/public security/manager/ssl/public
232 endif
234 ifdef MOZ_PREF_EXTENSIONS
235 tier_platform_dirs += extensions/pref
236 endif
238 tier_platform_dirs += services/crypto/component
240 # JavaXPCOM JNI code is compiled into libXUL
241 ifdef MOZ_JAVAXPCOM
242 tier_platform_dirs += extensions/java/xpcom/src
243 endif
245 ifndef BUILD_STATIC_LIBS
246 ifneq (,$(MOZ_ENABLE_GTK2))
247 tier_platform_dirs += embedding/browser/gtk
248 endif
249 endif
251 ifdef MOZ_ENABLE_LIBXUL
252 tier_platform_dirs += startupcache
253 endif
255 ifndef BUILD_STATIC_LIBS
256 ifdef APP_LIBXUL_STATICDIRS
257 # Applications can cheat and ask for code to be
258 # built before libxul so libxul can be linked against it.
259 tier_platform_staticdirs += $(APP_LIBXUL_STATICDIRS)
260 endif
261 ifdef APP_LIBXUL_DIRS
262 # Applications can cheat and ask for code to be
263 # built before libxul so it can be linked into libxul.
264 tier_platform_dirs += $(APP_LIBXUL_DIRS)
265 endif
267 tier_platform_dirs += toolkit/library
268 endif
270 ifdef MOZ_ENABLE_LIBXUL
271 tier_platform_dirs += xpcom/stub
272 endif
274 ifdef NS_TRACE_MALLOC
275 tier_platform_dirs += tools/trace-malloc
276 endif
278 ifdef MOZ_ENABLE_GNOME_COMPONENT
279 tier_platform_dirs += toolkit/system/gnome
280 endif
282 ifndef MOZ_ENABLE_LIBCONIC
283 # if libconic is present, it will do its own network monitoring
284 ifdef MOZ_ENABLE_DBUS
285 tier_platform_dirs += toolkit/system/dbus
286 endif
287 endif
289 ifdef MOZ_LEAKY
290 tier_platform_dirs += tools/leaky
291 endif
293 ifdef MOZ_MAPINFO
294 tier_platform_dirs += tools/codesighs
295 endif
297 ifdef ENABLE_TESTS
298 tier_platform_dirs += testing/mochitest
299 tier_platform_dirs += testing/xpcshell
300 tier_platform_dirs += testing/mozmill
301 tier_platform_dirs += testing/tools/screenshot
302 endif