1 # vim: set filetype=python:
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 if CONFIG['LIBXUL_SDK']:
7 error('toolkit.mozbuild is not compatible with --enable-libxul-sdk=')
9 if CONFIG['COMPILE_ENVIRONMENT']:
10 if not CONFIG['MOZ_NATIVE_NSPR']:
11 add_tier_dir('nspr', 'config/nspr')
13 add_tier_dir('external', 'config/external')
15 if not CONFIG['MOZ_NATIVE_NSS']:
16 add_tier_dir('nss', 'security/build')
18 include('/config/js/js.mozbuild')
20 if CONFIG['MOZ_CONTENT_SANDBOX']:
21 add_tier_dir('sandbox', 'security/sandbox')
23 # the signing related bits of libmar depend on nss
24 if CONFIG['MOZ_UPDATER']:
25 add_tier_dir('platform', 'modules/libmar')
27 if CONFIG['NS_TRACE_MALLOC']:
28 add_tier_dir('platform', 'tools/trace-malloc/lib')
31 add_tier_dir('platform', 'memory/replace/dmd')
33 if CONFIG['MOZ_TREE_FREETYPE']:
34 add_tier_dir('platform', 'modules/freetype2', static=True)
36 add_tier_dir('platform', 'xpcom')
38 add_tier_dir('platform', [
44 if CONFIG['MOZ_AUTH_EXTENSION']:
45 add_tier_dir('platform', 'extensions/auth')
47 if CONFIG['MOZ_UPDATER']:
48 add_tier_dir('platform', 'other-licenses/bsdiff')
50 # Gecko/Core components.
52 add_tier_dir('platform', ['ipc', 'js/ipc'])
54 add_tier_dir('platform', ['hal', 'js/xpconnect', 'intl/chardet'])
56 add_tier_dir('platform', ['modules/libjar', 'storage'])
58 if CONFIG['MOZ_PERMISSIONS']:
59 add_tier_dir('platform', ['extensions/cookie', 'extensions/permissions'])
61 add_tier_dir('platform', 'rdf')
63 if CONFIG['MOZ_JSDEBUGGER']:
64 add_tier_dir('platform', 'js/jsd')
66 if CONFIG['MOZ_WEBRTC']:
67 add_tier_dir('platform', [
69 'media/mtransport/third_party',
70 'media/mtransport/build',
71 'media/mtransport/standalone',
74 if CONFIG['MOZ_OMX_PLUGIN']:
75 add_tier_dir('platform', [
76 'media/omx-plugin/lib/ics/libutils',
77 'media/omx-plugin/lib/ics/libstagefright',
78 'media/omx-plugin/lib/ics/libvideoeditorplayer',
79 'media/omx-plugin/lib/gb/libutils',
80 'media/omx-plugin/lib/gb/libstagefright',
81 'media/omx-plugin/lib/gb/libstagefright_color_conversion',
82 'media/omx-plugin/lib/gb235/libstagefright',
83 'media/omx-plugin/lib/froyo/libstagefright',
85 'media/omx-plugin/gb',
86 'media/omx-plugin/gb235',
87 'media/omx-plugin/froyo',
88 'media/omx-plugin/lib/hc/libstagefright',
89 'media/omx-plugin/hc',
90 'media/omx-plugin/kk',
93 if CONFIG['ENABLE_TESTS']:
94 add_tier_dir('platform', 'testing/specialpowers')
96 if CONFIG['ENABLE_TESTS']:
97 add_tier_dir('platform', 'testing/gtest')
99 add_tier_dir('platform', [
116 # This needs to be built after the gfx/ directory
117 # to ensure all dependencies for skia (e.g. mozalloc, xpcom)
119 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
120 add_tier_dir('platform', 'other-licenses/skia-npapi')
122 if CONFIG['MOZ_UNIVERSALCHARDET']:
123 add_tier_dir('platform', 'extensions/universalchardet')
125 if CONFIG['ACCESSIBILITY']:
126 add_tier_dir('platform', 'accessible')
130 add_tier_dir('platform', 'profile')
132 # This must precede xpfe.
133 if CONFIG['MOZ_JPROF']:
134 add_tier_dir('platform', 'tools/jprof')
136 add_tier_dir('platform', 'tools/profiler')
138 add_tier_dir('platform', 'xpfe/components')
140 if CONFIG['MOZ_ENABLE_XREMOTE']:
141 add_tier_dir('platform', 'widget/xremoteclient')
143 if CONFIG['MOZ_SPELLCHECK']:
144 add_tier_dir('platform', 'extensions/spellcheck')
146 add_tier_dir('platform', 'security/manager')
148 add_tier_dir('platform', 'toolkit')
150 if CONFIG['MOZ_PREF_EXTENSIONS']:
151 add_tier_dir('platform', 'extensions/pref')
153 add_tier_dir('platform', 'services')
154 add_tier_dir('platform', 'startupcache')
155 add_tier_dir('platform', 'js/ductwork/debugger')
156 add_tier_dir('platform', 'other-licenses/snappy')
158 if CONFIG['MOZ_GIO_COMPONENT']:
159 add_tier_dir('platform', 'extensions/gio')
161 # Applications can cheat and ask for code to be
162 # built before libxul so it can be linked into libxul.
163 add_tier_dir('platform', app_libxul_dirs)
164 add_tier_dir('platform', app_libxul_static_dirs, static=True)
166 add_tier_dir('platform', 'toolkit/library')
168 if CONFIG['MOZ_REPLACE_MALLOC']:
169 add_tier_dir('platform', 'memory/replace')
171 if CONFIG['NS_TRACE_MALLOC']:
172 add_tier_dir('platform', 'tools/trace-malloc')
174 if CONFIG['MOZ_ENABLE_GNOME_COMPONENT']:
175 add_tier_dir('platform', 'toolkit/system/gnome')
177 # if QtNetwork is present, it will do its own network monitoring
178 if not CONFIG['MOZ_ENABLE_QTNETWORK'] and CONFIG['MOZ_ENABLE_DBUS']:
179 add_tier_dir('platform', 'toolkit/system/dbus')
181 add_tier_dir('platform', 'addon-sdk')
183 if CONFIG['ENABLE_MARIONETTE'] or CONFIG['MOZ_WIDGET_TOOLKIT'] not in ('gonk', 'android'):
184 add_tier_dir('platform', 'testing/marionette')
186 add_tier_dir('platform', 'tools/quitter')
188 if CONFIG['ENABLE_TESTS']:
189 add_tier_dir('platform', [
192 'testing/tools/screenshot',
199 if CONFIG['MOZ_WEBRTC'] and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
200 add_tier_dir('platform', [
201 'media/webrtc/signaling/test',
202 'media/mtransport/test',