2016-07-14 16:16:42 +00:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 21:19:09 +00:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2014-02-06 21:00:20 +00:00
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
TEST_DIRS += ['test/win']
|
|
|
|
|
|
|
|
MOCHITEST_MANIFESTS += ['test/mochitest.ini']
|
2016-07-27 20:20:58 +00:00
|
|
|
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
|
2013-03-12 17:17:46 +00:00
|
|
|
|
|
|
|
XPIDL_SOURCES += [
|
|
|
|
'nsINativeAppSupport.idl',
|
|
|
|
]
|
|
|
|
|
2013-03-12 17:20:41 +00:00
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
XPIDL_SOURCES += [
|
|
|
|
'nsIWinAppHelper.idl',
|
|
|
|
]
|
|
|
|
|
2013-11-19 02:47:43 +00:00
|
|
|
XPIDL_MODULE = 'xulapp'
|
2013-03-19 18:47:00 +00:00
|
|
|
|
2015-01-14 22:24:09 +00:00
|
|
|
EXPORTS += ['nsAppRunner.h']
|
|
|
|
|
2013-04-16 19:24:43 +00:00
|
|
|
if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
|
|
|
|
EXPORTS += ['EventTracer.h']
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
2013-12-03 22:01:16 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'nsNativeAppSupportWin.cpp',
|
|
|
|
]
|
2013-04-16 19:24:43 +00:00
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
2013-12-03 22:01:16 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-08-22 06:55:59 +00:00
|
|
|
'MacApplicationDelegate.mm',
|
|
|
|
'MacAutoreleasePool.mm',
|
|
|
|
'MacLaunchHelper.mm',
|
2016-05-25 02:25:23 +00:00
|
|
|
'nsCommandLineServiceMac.cpp',
|
2013-08-22 06:55:59 +00:00
|
|
|
'nsNativeAppSupportCocoa.mm',
|
2016-05-25 02:25:23 +00:00
|
|
|
'updaterfileutils_osx.mm',
|
2013-08-22 06:55:59 +00:00
|
|
|
]
|
2015-03-19 02:23:28 +00:00
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'nsNativeAppSupportDefault.cpp',
|
|
|
|
'UIKitDirProvider.mm',
|
|
|
|
]
|
2016-03-16 04:47:26 +00:00
|
|
|
elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
|
2013-12-03 22:01:16 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'nsNativeAppSupportUnix.cpp',
|
|
|
|
]
|
|
|
|
else:
|
2013-12-03 22:01:16 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'nsNativeAppSupportDefault.cpp',
|
|
|
|
]
|
|
|
|
|
2014-06-16 08:54:00 +00:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'nsGDKErrorHandler.cpp',
|
|
|
|
]
|
|
|
|
|
2013-04-23 21:54:15 +00:00
|
|
|
if CONFIG['MOZ_X11']:
|
2013-12-03 22:01:16 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'nsX11ErrorHandler.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
2013-12-03 22:01:16 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'nsAndroidStartup.cpp',
|
|
|
|
]
|
|
|
|
|
2013-12-03 22:01:16 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'CreateAppData.cpp',
|
|
|
|
'nsConsoleWriter.cpp',
|
|
|
|
'nsNativeAppSupportBase.cpp',
|
|
|
|
'nsSigHandlers.cpp',
|
|
|
|
'nsXREDirProvider.cpp',
|
|
|
|
]
|
|
|
|
|
2015-10-26 21:37:32 +00:00
|
|
|
# nsAppRunner.cpp and ProfileReset.cpp cannot be built in unified mode because
|
|
|
|
# they pull in OS X system headers.
|
2013-12-03 22:01:16 +00:00
|
|
|
# nsEmbedFunctions.cpp cannot be built in unified mode because it pulls in X11 headers.
|
|
|
|
SOURCES += [
|
|
|
|
'nsAppRunner.cpp',
|
|
|
|
'nsEmbedFunctions.cpp',
|
2015-10-26 21:37:32 +00:00
|
|
|
'ProfileReset.cpp',
|
2013-12-03 22:01:16 +00:00
|
|
|
]
|
|
|
|
|
2013-04-23 21:54:15 +00:00
|
|
|
if CONFIG['MOZ_GL_DEFAULT_PROVIDER'] == 'GLX':
|
2013-12-03 22:01:16 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'glxtest.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
|
2013-12-03 22:01:16 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'EventTracer.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_UPDATER']:
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
|
2013-12-03 22:01:16 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'nsUpdateDriver.cpp',
|
|
|
|
]
|
2013-08-22 06:56:01 +00:00
|
|
|
|
2013-10-02 17:17:55 +00:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2013-11-19 02:47:14 +00:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-27 13:55:07 +00:00
|
|
|
|
|
|
|
if CONFIG['MOZ_GL_DEFAULT_PROVIDER'] == 'GLX':
|
|
|
|
DEFINES['USE_GLX_TEST'] = True
|
|
|
|
|
2014-01-12 21:45:41 +00:00
|
|
|
for var in ('MOZ_APP_NAME', 'MOZ_APP_BASENAME', 'MOZ_APP_VERSION', 'OS_TARGET',
|
2013-11-27 13:55:07 +00:00
|
|
|
'MOZ_WIDGET_TOOLKIT'):
|
|
|
|
DEFINES[var] = '"%s"' % CONFIG[var]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_UPDATER'] and CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
|
|
|
|
DEFINES['MOZ_UPDATER'] = True
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
|
|
|
DEFINES['WIN32_LEAN_AND_MEAN'] = True
|
|
|
|
DEFINES['UNICODE'] = True
|
|
|
|
DEFINES['_UNICODE'] = True
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
|
|
|
DEFINES['ANDROID_PACKAGE_NAME'] = '"%s"' % CONFIG['ANDROID_PACKAGE_NAME']
|
|
|
|
|
|
|
|
if CONFIG['TARGET_XPCOM_ABI']:
|
|
|
|
DEFINES['TARGET_OS_ABI'] = '"%s_%s"' % (CONFIG['OS_TARGET'],
|
|
|
|
CONFIG['TARGET_XPCOM_ABI'])
|
|
|
|
|
|
|
|
if CONFIG['WRAP_SYSTEM_INCLUDES']:
|
|
|
|
DEFINES['WRAP_SYSTEM_INCLUDES'] = True
|
|
|
|
|
|
|
|
if CONFIG['OS_ARCH'] == 'Linux' and 'lib64' in CONFIG['libdir']:
|
|
|
|
DEFINES['HAVE_USR_LIB64_DIR'] = True
|
|
|
|
|
|
|
|
DEFINES['GRE_MILESTONE'] = CONFIG['GRE_MILESTONE']
|
|
|
|
|
|
|
|
for var in ('APP_VERSION', 'APP_ID'):
|
|
|
|
DEFINES[var] = CONFIG['MOZ_%s' % var]
|
|
|
|
|
2015-07-10 16:12:54 +00:00
|
|
|
if CONFIG['MOZ_BUILD_APP'] == 'browser':
|
|
|
|
DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
|
|
|
|
|
2014-02-15 20:24:59 +00:00
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'../profile',
|
|
|
|
'/config',
|
|
|
|
'/dom/base',
|
|
|
|
'/dom/ipc',
|
|
|
|
'/testing/gtest/mozilla',
|
|
|
|
'/toolkit/crashreporter',
|
|
|
|
'/xpcom/build',
|
|
|
|
]
|
|
|
|
|
2016-05-15 15:35:22 +00:00
|
|
|
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'/security/sandbox/chromium',
|
|
|
|
'/security/sandbox/chromium-shim',
|
|
|
|
]
|
|
|
|
|
2015-01-08 02:33:32 +00:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'/widget',
|
|
|
|
'/widget/cocoa',
|
|
|
|
]
|
|
|
|
|
2014-02-15 20:25:20 +00:00
|
|
|
if CONFIG['MOZ_ENABLE_XREMOTE']:
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
'/widget/xremoteclient',
|
|
|
|
]
|
|
|
|
|
2014-07-24 15:55:33 +00:00
|
|
|
CXXFLAGS += CONFIG['TK_CFLAGS']
|
|
|
|
CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
|
|
|
|
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
|
|
|
|
|
2016-03-16 05:06:26 +00:00
|
|
|
if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
|
2014-07-24 15:55:33 +00:00
|
|
|
CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
|
2016-02-09 06:16:25 +00:00
|
|
|
|
2016-02-09 05:36:07 +00:00
|
|
|
DEFINES['TOPOBJDIR'] = TOPOBJDIR
|
2016-02-09 06:16:25 +00:00
|
|
|
FINAL_TARGET_PP_FILES += [
|
|
|
|
'platform.ini'
|
|
|
|
]
|
2016-05-11 07:00:01 +00:00
|
|
|
|
|
|
|
if CONFIG['GNU_CXX']:
|
|
|
|
CXXFLAGS += ['-Wno-error=shadow']
|