Bug 874266 - Move all DEFINES that can be moved to moz.build. r=mshal

This commit is contained in:
Mike Hommey 2013-11-28 13:08:16 +09:00
parent 59b2136630
commit b038245b8d
326 changed files with 1108 additions and 1566 deletions

View File

@ -6,8 +6,6 @@ DEFFILE = $(win_srcdir)/IA2Marshal.def
IA2DIR = $(topsrcdir)/other-licenses/ia2
DEFINES += -DREGISTER_PROXY_DLL
GARBAGE += $(MIDL_GENERATED_FILES)
# Please keep this list in sync with the moz.build file until the rest of this

View File

@ -7,3 +7,5 @@
LIBRARY_NAME = 'IA2Marshal'
FORCE_SHARED_LIB = True
DEFINES['REGISTER_PROXY_DLL'] = True

View File

@ -4,8 +4,6 @@
DEFFILE = $(win_srcdir)/AccessibleMarshal.def
DEFINES += -DREGISTER_PROXY_DLL
GARBAGE += $(MIDL_GENERATED_FILES) done_gen dlldata.c
MIDL_GENERATED_FILES = \

View File

@ -17,3 +17,5 @@ GENERATED_SOURCES += [
]
FORCE_SHARED_LIB = True
DEFINES['REGISTER_PROXY_DLL'] = True

View File

@ -7,10 +7,6 @@ include $(topsrcdir)/config/makefiles/rcs.mk
PREF_JS_EXPORTS = $(srcdir)/b2g.js
ifdef ENABLE_MARIONETTE
DEFINES += -DENABLE_MARIONETTE=1
endif
ifndef LIBXUL_SDK
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
@ -39,7 +35,6 @@ LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
LOCAL_INCLUDES += -I$(DEPTH)/build
DEFINES += -DXPCOM_GLUE
STL_FLAGS=
LIBS += $(JEMALLOC_LIBS)
@ -83,12 +78,6 @@ include $(topsrcdir)/config/rules.mk
APP_ICON = b2g
DEFINES += \
-DAPP_NAME=$(MOZ_APP_NAME) \
-DAPP_VERSION=$(MOZ_APP_VERSION) \
-DMOZ_UPDATER=$(MOZ_UPDATER) \
$(NULL)
source_repo ?= $(call getSourceRepo,$(srcdir)/..)
ifneq (,$(filter http%,$(source_repo)))
DEFINES += -DMOZ_SOURCE_REPO="$(source_repo)"

View File

@ -12,3 +12,11 @@ if not CONFIG['LIBXUL_SDK']:
SOURCES += [
'nsBrowserApp.cpp',
]
if CONFIG['ENABLE_MARIONETTE']:
DEFINES['ENABLE_MARIONETTE'] = 1
DEFINES['XPCOM_GLUE'] = True
for var in ('MOZ_APP_NAME', 'MOZ_APP_VERSION', 'MOZ_UPDATER'):
DEFINES[var] = CONFIG[var]

View File

@ -1,8 +0,0 @@
# 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/.
DEFINES += -DAB_CD=$(MOZ_UI_LOCALE) \
-DPACKAGE=browser \
-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
$(NULL)

View File

@ -4,3 +4,6 @@
# 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/.
DEFINES['AB_CD'] = CONFIG['MOZ_UI_LOCALE']
DEFINES['PACKAGE'] = 'browser'
DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']

View File

@ -4,18 +4,6 @@
GAIA_PATH := gaia/profile
ifeq ($(OS_ARCH),WINNT)
DEFINES += \
-DB2G_NAME=L\"$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)\" \
-DGAIA_PATH=L\"$(subst /,\\\\,$(GAIA_PATH))\" \
$(NULL)
else # Non-windows machines use the same wrapper program
DEFINES += \
-DB2G_NAME=\"$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)\" \
-DGAIA_PATH=\"$(GAIA_PATH)\" \
$(NULL)
endif
ifdef .PYMAKE
# For use of GNU make in pymake builds.
GAIA_MAKE=$(GMAKE)

View File

@ -10,7 +10,11 @@ if CONFIG['OS_ARCH'] == 'WINNT':
SOURCES += [
'run-b2g.cpp',
]
DEFINES['B2G_NAME'] = 'L"%s-bin%s"' % (PROGRAM, CONFIG['BIN_SUFFIX'])
DEFINES['GAIA_PATH'] = 'L"gaia\\\\profile"'
else:
SOURCES += [
'run-b2g.c',
]
DEFINES['B2G_NAME'] = '"%s-bin%s"' % (PROGRAM, CONFIG['BIN_SUFFIX'])
DEFINES['GAIA_PATH'] = '"gaia/profile"'

View File

@ -4,10 +4,6 @@
dist_dest = $(DIST)/$(MOZ_MACBUNDLE_NAME)
ifdef ENABLE_MARIONETTE
DEFINES += -DENABLE_MARIONETTE=1
endif
PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js \
$(NULL)
@ -17,7 +13,6 @@ AB_CD = en-US
DEFINES += \
-DAB_CD=$(AB_CD) \
-DAPP_VERSION="$(MOZ_APP_VERSION)" \
-DFIREFOX_ICO=\"$(DIST)/branding/firefox.ico\" \
-DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\" \
-DNEWWINDOW_ICO=\"$(DIST)/branding/newwindow.ico\" \
@ -25,13 +20,8 @@ DEFINES += \
-DPBMODE_ICO=\"$(DIST)/branding/pbmode.ico\" \
$(NULL)
ifdef MOZILLA_OFFICIAL
DEFINES += -DMOZILLA_OFFICIAL
endif
ifdef LIBXUL_SDK #{
PREF_JS_EXPORTS += $(srcdir)/profile/channel-prefs.js
DEFINES += -DLIBXUL_SDK
endif #} LIBXUL_SDK
# Build a binary bootstrapping with XRE_main
@ -43,7 +33,6 @@ LOCAL_INCLUDES += \
-I$(DEPTH)/build \
$(NULL)
DEFINES += -DXPCOM_GLUE
STL_FLAGS=
LIBS += \

View File

@ -11,3 +11,14 @@ PROGRAM = CONFIG['MOZ_APP_NAME']
SOURCES += [
'nsBrowserApp.cpp',
]
if CONFIG['ENABLE_MARIONETTE']:
DEFINES['ENABLE_MARIONETTE'] = 1
DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
for var in ('MOZILLA_OFFICIAL', 'LIBXUL_SDK'):
if CONFIG[var]:
DEFINES[var] = True
DEFINES['XPCOM_GLUE'] = True

View File

@ -1,31 +0,0 @@
#
# 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/.
include $(topsrcdir)/config/config.mk
abs_srcdir = $(abspath $(srcdir))
include $(topsrcdir)/config/rules.mk
DEFINES += \
-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-DAPP_LICENSE_BLOCK=$(abs_srcdir)/content/overrides/app-license.html \
$(NULL)
ifneq (,$(filter windows gtk2 gtk3 cocoa, $(MOZ_WIDGET_TOOLKIT)))
DEFINES += -DHAVE_SHELL_SERVICE=1
endif
ifneq (,$(filter windows cocoa gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT)))
DEFINES += -DCONTEXT_COPY_IMAGE_CONTENTS=1
endif
ifneq (,$(filter windows cocoa, $(MOZ_WIDGET_TOOLKIT)))
DEFINES += -DCAN_DRAW_IN_TITLEBAR=1
endif
ifneq (,$(filter windows gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT)))
DEFINES += -DMENUBAR_CAN_AUTOHIDE=1
endif

View File

@ -21,3 +21,16 @@ BROWSER_CHROME_MANIFESTS += [
'content/test/newtab/browser.ini',
'content/test/social/browser.ini',
]
DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
DEFINES['APP_LICENSE_BLOCK'] = '%s/content/overrides/app-license.html' % SRCDIR
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
DEFINES['HAVE_SHELL_SERVICE'] = 1
DEFINES['CONTEXT_COPY_IMAGE_CONTENTS'] = 1
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'):
DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3'):
DEFINES['MENUBAR_CAN_AUTOHIDE'] = 1

View File

@ -2,4 +2,4 @@
# 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/.
DEFINES += -DAB_CD=$(AB_CD) -DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)
DEFINES += -DAB_CD=$(AB_CD)

View File

@ -4,3 +4,4 @@
# 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/.
DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID']

View File

@ -2,4 +2,4 @@
# 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/.
DEFINES += -DAB_CD=$(AB_CD) -DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)
DEFINES += -DAB_CD=$(AB_CD)

View File

@ -4,3 +4,4 @@
# 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/.
DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID']

View File

@ -2,4 +2,4 @@
# 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/.
DEFINES += -DAB_CD=$(AB_CD) -DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)
DEFINES += -DAB_CD=$(AB_CD)

View File

@ -4,3 +4,4 @@
# 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/.
DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID']

View File

@ -2,10 +2,4 @@
# 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/.
DEFINES += \
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME) \
$(NULL)
LOCAL_INCLUDES = -I$(srcdir)/../../build

View File

@ -19,3 +19,6 @@ EXTRA_PP_COMPONENTS += [
]
FINAL_LIBRARY = 'browsercomps'
for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'):
DEFINES[var] = CONFIG[var]

View File

@ -1,12 +0,0 @@
# 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/.
ifeq ($(OS_ARCH),WINNT)
DEFINES += -DHAS_IE_MIGRATOR -DHAS_SAFARI_MIGRATOR
endif
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
DEFINES += -DHAS_SAFARI_MIGRATOR
endif

View File

@ -18,6 +18,7 @@ if CONFIG['OS_ARCH'] == 'WINNT':
EXTRA_COMPONENTS += [
'IEProfileMigrator.js',
]
DEFINES['HAS_IE_MIGRATOR'] = True
EXTRA_PP_COMPONENTS += [
'BrowserProfileMigrators.manifest',
@ -28,11 +29,13 @@ if CONFIG['OS_ARCH'] == 'WINNT':
EXTRA_PP_COMPONENTS += [
'SafariProfileMigrator.js',
]
DEFINES['HAS_SAFARI_MIGRATOR'] = True
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
EXTRA_PP_COMPONENTS += [
'SafariProfileMigrator.js',
]
DEFINES['HAS_SAFARI_MIGRATOR'] = True
EXTRA_PP_JS_MODULES += [
'MigrationUtils.jsm',

View File

@ -1,15 +0,0 @@
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
# 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/.
include $(topsrcdir)/config/rules.mk
DEFINES += \
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME) \
$(NULL)
ifneq (,$(filter windows gtk2 gtk3 cocoa, $(MOZ_WIDGET_TOOLKIT)))
DEFINES += -DHAVE_SHELL_SERVICE=1
endif

View File

@ -1,14 +0,0 @@
# -- 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/.
include $(topsrcdir)/config/rules.mk
DEFINES += \
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME) \
$(NULL)
ifneq (,$(filter windows gtk2 cocoa, $(MOZ_WIDGET_TOOLKIT)))
DEFINES += -DHAVE_SHELL_SERVICE=1
endif

View File

@ -4,3 +4,8 @@
# 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/.
for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'):
DEFINES[var] = CONFIG[var]
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'cocoa'):
DEFINES['HAVE_SHELL_SERVICE'] = 1

View File

@ -10,3 +10,9 @@ BROWSER_CHROME_MANIFESTS += [
'in-content/tests/browser.ini',
'tests/browser.ini',
]
for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'):
DEFINES[var] = CONFIG[var]
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3', 'cocoa'):
DEFINES['HAVE_SHELL_SERVICE'] = 1

View File

@ -5,9 +5,6 @@
include $(topsrcdir)/config/rules.mk
DEFINES += -DMOZ_APP_NAME=\"$(MOZ_APP_NAME)\" \
-DMOZ_APP_VERSION=\"$(MOZ_APP_VERSION)\"
CXXFLAGS += $(TK_CFLAGS)
clobber::

View File

@ -24,3 +24,6 @@ EXTRA_COMPONENTS += [
'nsSetDefaultBrowser.js',
'nsSetDefaultBrowser.manifest',
]
for var in ('MOZ_APP_NAME', 'MOZ_APP_VERSION'):
DEFINES[var] = '"%s"' % CONFIG[var]

View File

@ -7,12 +7,8 @@ include $(topsrcdir)/config/rules.mk
#########################################
# application.ini
ifdef MOZILLA_OFFICIAL
DEFINES += -DMOZILLA_OFFICIAL
endif
GRE_BUILDID := $(shell cat $(DEPTH)/config/buildid)
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID)
DEFINES += -DGRE_BUILDID=$(GRE_BUILDID)
# 'application.ini' breaks firefox build config. So we use something different.
metroapp.ini: metroapp.ini.in $(DEPTH)/config/buildid $(topsrcdir)/config/milestone.txt

View File

@ -1,10 +0,0 @@
# 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/.
include $(topsrcdir)/config/config.mk
DEFINES += -DAB_CD=$(MOZ_UI_LOCALE) \
-DPACKAGE=browser \
-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
$(NULL)

View File

@ -8,3 +8,7 @@ METRO_CHROME_MANIFESTS += ['tests/mochiperf/metro.ini', 'tests/mochitest/metro.i
XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
DIST_SUBDIR = 'metro'
DEFINES['AB_CD'] = CONFIG['MOZ_UI_LOCALE']
DEFINES['PACKAGE'] = 'browser'
DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']

View File

@ -17,3 +17,8 @@ if CONFIG['OS_ARCH'] == 'WINNT':
DIRS += ['shell']
DIST_SUBDIR = 'metro'
if CONFIG['MOZILLA_OFFICIAL']:
DEFINES['MOZILLA_OFFICIAL'] = True
DEFINES['GRE_MILESTONE'] = CONFIG['GRE_MILESTONE']

View File

@ -21,5 +21,3 @@ OS_LIBS = \
advapi32.lib \
wininet.lib \
$(NULL)
DEFINES += -DUNICODE -D_UNICODE -DNS_NO_XPCOM

View File

@ -13,3 +13,6 @@ SOURCES += [
# We want this exe in dist/bin
DIST_SUBDIR = ''
for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM'):
DEFINES[var] = True

View File

@ -14,5 +14,3 @@ OS_LIBS = \
shell32.lib \
propsys.lib \
$(NULL)
DEFINES += -DUNICODE -D_UNICODE

View File

@ -11,3 +11,6 @@ SOURCES += [
]
DIST_SUBDIR = 'metro/install'
for var in ('UNICODE', '_UNICODE'):
DEFINES[var] = True

View File

@ -21,5 +21,3 @@ OS_LIBS = \
propsys.lib \
advapi32.lib \
$(NULL)
DEFINES += -DUNICODE -D_UNICODE

View File

@ -12,3 +12,6 @@ SOURCES += [
# We want this exe in dist/bin
DIST_SUBDIR = ''
for var in ('UNICODE', '_UNICODE'):
DEFINES[var] = True

View File

@ -1,9 +0,0 @@
# 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/.
include $(topsrcdir)/config/config.mk
ifdef MOZILLA_OFFICIAL
DEFINES += -DMOZILLA_OFFICIAL=1
endif

View File

@ -34,3 +34,5 @@ EXTRA_PP_JS_MODULES += [
'RecentWindow.jsm',
]
if CONFIG['MOZILLA_OFFICIAL']:
DEFINES['MOZILLA_OFFICIAL'] = 1

View File

@ -24,9 +24,8 @@ endif
APP_BUILDID := $(shell cat $(DEPTH)/config/buildid)
APP_INI_DEPS += $(DEPTH)/config/buildid
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DAPP_BUILDID=$(APP_BUILDID)
DEFINES += -DAPP_BUILDID=$(APP_BUILDID)
DEFINES += -DMOZ_APP_VERSION="$(MOZ_APP_VERSION)"
APP_INI_DEPS += $(DEPTH)/config/autoconf.mk
MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template="{node|short}\n" 2>/dev/null))
@ -39,34 +38,6 @@ ifneq (,$(source_repo))
DEFINES += -DMOZ_SOURCE_REPO="$(source_repo)"
endif
DEFINES += \
-DMOZ_APP_BASENAME="$(MOZ_APP_BASENAME)" \
-DMOZ_APP_VENDOR="$(MOZ_APP_VENDOR)" \
-DMOZ_APP_ID="$(MOZ_APP_ID)" \
-DMAR_CHANNEL_ID="$(MAR_CHANNEL_ID)" \
-DACCEPTED_MAR_CHANNEL_IDS="$(ACCEPTED_MAR_CHANNEL_IDS)" \
$(NULL)
ifeq ($(MOZ_BUILD_APP),browser)
DEFINES += -DMOZ_BUILD_APP_IS_BROWSER
endif
ifdef MOZ_APP_PROFILE
DEFINES += -DMOZ_APP_PROFILE="$(MOZ_APP_PROFILE)"
endif
ifdef MOZ_CRASHREPORTER
DEFINES += -DMOZ_CRASHREPORTER
endif
ifdef MOZ_PROFILE_MIGRATOR
DEFINES += -DMOZ_PROFILE_MIGRATOR
endif
ifdef MOZ_EXTENSION_MANAGER
DEFINES += -DMOZ_EXTENSION_MANAGER
endif
endif
# Put a useful .gdbinit in the bin directory, to be picked up automatically
@ -123,8 +94,6 @@ ifdef MOZ_APP_BASENAME
$(FINAL_TARGET)/application.ini: $(APP_INI_DEPS)
ifdef MOZ_APP_STATIC_INI
DEFINES += -DMOZ_APP_STATIC_INI
application.ini.h: appini_header.py $(FINAL_TARGET)/application.ini
$(PYTHON) $^ > $@
export:: application.ini.h

View File

@ -75,10 +75,6 @@ JAVAFILES += \
$(testconstants-dep) \
$(NULL)
DEFINES += \
-DANDROID_PACKAGE_NAME=$(ANDROID_PACKAGE_NAME) \
$(NULL)
include $(topsrcdir)/config/rules.mk
tools:: $(ANDROID_APK_NAME).apk

View File

@ -7,3 +7,5 @@
ANDROID_RESFILES = [
'res/values/strings.xml',
]
DEFINES['ANDROID_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME']

View File

@ -22,3 +22,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
'mobile/robocop',
]
for var in ('GRE_MILESTONE', 'MOZ_APP_VERSION', 'MOZ_APP_BASENAME',
'MOZ_APP_VENDOR', 'MOZ_APP_ID', 'MAR_CHANNEL_ID',
'ACCEPTED_MAR_CHANNEL_IDS'):
DEFINES[var] = CONFIG[var]
if CONFIG['MOZ_BUILD_APP'] == 'browser':
DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
if CONFIG['MOZ_APP_PROFILE']:
DEFINES['MOZ_APP_PROFILE'] = CONFIG['MOZ_APP_PROFILE']
for var in ('MOZ_CRASHREPORTER', 'MOZ_PROFILE_MIGRATOR',
'MOZ_EXTENSION_MANAGER', 'MOZ_APP_STATIC_INI'):
if CONFIG[var]:
DEFINES[var] = True

View File

@ -11,6 +11,5 @@ LIBRARY = $(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX)
include $(topsrcdir)/config/rules.mk
DEFINES += -D_GNU_SOURCE
CXXFLAGS += -fuse-cxa-atexit
INCLUDES += -I$(srcdir)/stlport

View File

@ -45,3 +45,5 @@ SOURCES += [
'src/c_locale.c',
'src/cxa.c',
]
DEFINES['_GNU_SOURCE'] = True

View File

@ -15,8 +15,6 @@ WRAP_LDFLAGS=
include $(topsrcdir)/config/rules.mk
DEFINES += -DELFHACK_BUILD
test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX): %$(DLL_SUFFIX): %.$(OBJ_SUFFIX) elfhack
$(MKSHLIB) $(LDFLAGS) $< -nostartfiles
@echo ===

View File

@ -15,6 +15,4 @@ $(CSRCS): %.c: ../inject.c
GARBAGE += $(CSRCS)
DEFINES += -DELFHACK_BUILD
CFLAGS := -O2 -fno-stack-protector $(filter -m% -I%,$(CFLAGS))

View File

@ -16,3 +16,5 @@ else:
GENERATED_SOURCES += [
"%s.c" % cpu,
]
DEFINES['ELFHACK_BUILD'] = True

View File

@ -23,3 +23,5 @@ HOST_SOURCES += [
]
HOST_PROGRAM = 'elfhack'
DEFINES['ELFHACK_BUILD'] = True

View File

@ -46,68 +46,11 @@ ifeq ($(OS_ARCH),WINNT)
MODULE_OPTIMIZE_FLAGS = -O2
endif
# -DSQLITE_SECURE_DELETE=1 will cause SQLITE to 0-fill delete data so we
# don't have to vacuum to make sure the data is not visible in the file.
# -DSQLITE_ENABLE_FTS3=1 enables the full-text index module.
# -DSQLITE_CORE=1 statically links that module into the SQLite library.
# -DSQLITE_DEFAULT_PAGE_SIZE=32768 and SQLITE_MAX_DEFAULT_PAGE_SIZE=32768
# increases the page size from 1k, see bug 416330. It must be kept in sync with
# the value of PREF_TS_PAGESIZE_DEFAULT in mozStorageService.cpp. The value can
# be overridden on a per-platform basis through the use of the PREF_TS_PAGESIZE
# hidden preference. If that preference is missing or invalid then this value
# will be used.
# -DSQLITE_MAX_SCHEMA_RETRY increases the times SQLite may try to reparse
# statements when the schema changes. This is important when supporting lots of
# concurrent connections, especially when they use shared cache.
# Note: Be sure to update the configure.in checks when these change!
DEFINES = \
-DSQLITE_SECURE_DELETE=1 \
-DSQLITE_THREADSAFE=1 \
-DSQLITE_CORE=1 \
-DSQLITE_ENABLE_FTS3=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
-DSQLITE_DEFAULT_PAGE_SIZE=32768 \
-DSQLITE_MAX_DEFAULT_PAGE_SIZE=32768 \
-DSQLITE_MAX_SCHEMA_RETRY=25 \
$(NULL)
# -DSQLITE_ENABLE_LOCKING_STYLE=1 to help with AFP folders
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
DEFINES += -DSQLITE_ENABLE_LOCKING_STYLE=1
endif
# Turn on SQLite's assertions in debug builds.
ifdef MOZ_DEBUG
DEFINES += -DSQLITE_DEBUG=1
endif
# disable PGO for Sun Studio
ifdef SOLARIS_SUNPRO_CC
NO_PROFILE_GUIDED_OPTIMIZE = 1
endif
ifeq ($(OS_ARCH),OS2)
ifdef MOZ_OS2_HIGH_MEMORY
DEFINES += -DOS2_HIGH_MEMORY
endif
endif
ifeq ($(OS_TARGET),Android)
# default to user readable only to fit Android security model
DEFINES += -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600
endif
# Force using malloc_usable_size when building with jemalloc because _msize
# causes assertions on Win64. See bug 719579.
ifeq ($(OS_ARCH),WINNT)
ifdef MOZ_MEMORY
DEFINES += \
-DHAVE_MALLOC_USABLE_SIZE \
-DSQLITE_WITHOUT_MSIZE \
$(NULL)
endif
endif
include $(topsrcdir)/config/rules.mk
# next line allows use of MOZ_OBJDIR in .mozconfig with older gcc on BeOS, maybe others

View File

@ -19,3 +19,46 @@ if CONFIG['MOZ_FOLD_LIBS']:
FORCE_STATIC_LIB = True
else:
FORCE_SHARED_LIB = True
# -DSQLITE_SECURE_DELETE=1 will cause SQLITE to 0-fill delete data so we
# don't have to vacuum to make sure the data is not visible in the file.
# -DSQLITE_ENABLE_FTS3=1 enables the full-text index module.
# -DSQLITE_CORE=1 statically links that module into the SQLite library.
# -DSQLITE_DEFAULT_PAGE_SIZE=32768 and SQLITE_MAX_DEFAULT_PAGE_SIZE=32768
# increases the page size from 1k, see bug 416330. It must be kept in sync with
# the value of PREF_TS_PAGESIZE_DEFAULT in mozStorageService.cpp. The value can
# be overridden on a per-platform basis through the use of the PREF_TS_PAGESIZE
# hidden preference. If that preference is missing or invalid then this value
# will be used.
# -DSQLITE_MAX_SCHEMA_RETRY increases the times SQLite may try to reparse
# statements when the schema changes. This is important when supporting lots of
# concurrent connections, especially when they use shared cache.
# Note: Be sure to update the configure.in checks when these change!
for var in ('SQLITE_SECURE_DELETE', 'SQLITE_THREADSAFE', 'SQLITE_CORE',
'SQLITE_ENABLE_FTS3', 'SQLITE_ENABLE_UNLOCK_NOTIFY'):
DEFINES[var] = 1
DEFINES['SQLITE_DEFAULT_PAGE_SIZE'] = 32768
DEFINES['SQLITE_MAX_DEFAULT_PAGE_SIZE'] = 32768
DEFINES['SQLITE_MAX_SCHEMA_RETRY'] = 25
# -DSQLITE_ENABLE_LOCKING_STYLE=1 to help with AFP folders
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
DEFINES['SQLITE_ENABLE_LOCKING_STYLE'] = 1
# Turn on SQLite's assertions in debug builds.
if CONFIG['MOZ_DEBUG']:
DEFINES['SQLITE_DEBUG'] = 1
if CONFIG['OS_ARCH'] == 'OS2' and CONFIG['MOZ_OS2_HIGH_MEMORY']:
DEFINES['OS2_HIGH_MEMORY'] = True
if CONFIG['OS_TARGET'] == 'Android':
# default to user readable only to fit Android security model
DEFINES['SQLITE_DEFAULT_FILE_PERMISSIONS'] = '0600'
# Force using malloc_usable_size when building with jemalloc because _msize
# causes assertions on Win64. See bug 719579.
if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_MEMORY']:
DEFINES['HAVE_MALLOC_USABLE_SIZE'] = True
DEFINES['SQLITE_WITHOUT_MSIZE'] = True

View File

@ -2,18 +2,6 @@
# 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/.
ifdef MOZ_JSDEBUGGER
DEFINES += -DMOZ_JSDEBUGGER
endif
ifdef MOZ_B2G_RIL
DEFINES += -DMOZ_B2G_RIL
endif
ifdef MOZ_B2G_FM
DEFINES += -DMOZ_B2G_FM
endif
include $(topsrcdir)/config/rules.mk
ifdef MOZ_X11

View File

@ -164,3 +164,6 @@ LOCAL_INCLUDES += [
'/xpcom/ds',
]
for var in ('MOZ_JSDEBUGGER', 'MOZ_B2G_RIL', 'MOZ_B2G_FM'):
if CONFIG[var]:
DEFINES[var] = True

View File

@ -19,18 +19,12 @@ ifneq (,$(MOZ_B2G_BT))
ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
ifdef MOZ_B2G_BT_BLUEZ
LOCAL_INCLUDES += $(MOZ_DBUS_CFLAGS)
DEFINES += -DMOZ_B2G_BT_BLUEZ
else
ifdef MOZ_B2G_BT_BLUEDROID
DEFINES += -DMOZ_B2G_BT_BLUEDROID
endif #MOZ_B2G_BT_BLUEDROID
endif #MOZ_B2G_BT_BLUEZ
else
ifdef MOZ_ENABLE_DBUS
LOCAL_INCLUDES += $(MOZ_DBUS_CFLAGS)
CFLAGS += $(MOZ_DBUS_GLIB_CFLAGS)
CXXFLAGS += $(MOZ_DBUS_GLIB_CFLAGS) -DHAVE_PTHREADS
DEFINES += -DMOZ_BLUETOOTH_DBUS
endif #MOZ_ENABLE_DBUS
endif #MOZ_WIDGET_TOOLKIT
@ -39,5 +33,3 @@ endif #MOZ_WIDGET_TOOLKIT
LOCAL_INCLUDES += $(VPATH:%=-I%)
endif #MOZ_B2G_BT
include $(topsrcdir)/config/rules.mk

View File

@ -45,6 +45,7 @@ if CONFIG['MOZ_B2G_BT']:
'bluez/gonk',
'bluez/linux',
]
DEFINES['MOZ_B2G_BT_BLUEZ'] = True
elif CONFIG['MOZ_B2G_BT_BLUEDROID']:
SOURCES += [
'bluedroid/BluetoothA2dpManager.cpp',
@ -55,6 +56,7 @@ if CONFIG['MOZ_B2G_BT']:
'bluedroid',
'bluedroid/gonk',
]
DEFINES['MOZ_B2G_BT_BLUEDROID'] = True
elif CONFIG['MOZ_ENABLE_DBUS']:
SOURCES += [
'bluez/BluetoothHfpManager.cpp',
@ -64,6 +66,7 @@ if CONFIG['MOZ_B2G_BT']:
'bluez',
'bluez/linux',
]
DEFINES['MOZ_BLUETOOTH_DBUS'] = True
FINAL_LIBRARY = 'gklayout'

View File

@ -4,18 +4,4 @@
include $(topsrcdir)/config/rules.mk
DEFINES += -DBIN_SUFFIX='"$(BIN_SUFFIX)"'
ifeq ($(MOZ_WIDGET_TOOLKIT),$(findstring $(MOZ_WIDGET_TOOLKIT),android gtk2 gonk qt))
DEFINES += -DMOZ_ENABLE_FREETYPE
endif
ifdef MOZ_PERMISSIONS
DEFINES += -DMOZ_PERMISSIONS
endif
ifdef MOZ_CHILD_PERMISSIONS
DEFINES += -DMOZ_CHILD_PERMISSIONS
endif
CXXFLAGS += $(TK_CFLAGS)

View File

@ -108,3 +108,11 @@ LOCAL_INCLUDES += [
'/xpcom/base',
]
DEFINES['BIN_SUFFIX'] = '"%s"' % CONFIG['BIN_SUFFIX']
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gonk', 'qt'):
DEFINES['MOZ_ENABLE_FREETYPE'] = True
for var in ('MOZ_PERMISSIONS', 'MOZ_CHILD_PERMISSIONS'):
if CONFIG[var]:
DEFINES[var] = True

View File

@ -6,10 +6,6 @@ OS_LIBS = $(call EXPAND_LIBNAME,comctl32)
RCINCLUDE = HangUIDlg.rc
DEFINES += \
-DNS_NO_XPCOM \
$(NULL)
STL_FLAGS = \
-D_HAS_EXCEPTIONS=0 \
$(NULL)

View File

@ -14,3 +14,4 @@ UNIFIED_SOURCES += [
]
include('/ipc/chromium/chromium-config.mozbuild')
DEFINES['NS_NO_XPCOM'] = True

View File

@ -34,7 +34,6 @@ LIBS = \
$(XPCOM_STANDALONE_GLUE_LDOPTS) \
$(NULL)
DEFINES += -DXPCOM_GLUE
STL_FLAGS=
OS_LIBS += $(call EXPAND_LIBNAME,ole32 comdlg32 shell32 version)

View File

@ -13,3 +13,5 @@ SOURCES += [
]
XPI_NAME = 'winembed'
DEFINES['XPCOM_GLUE'] = True

View File

@ -2,12 +2,6 @@
# 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/.
ifndef MOZ_NATIVE_HUNSPELL
# This variable is referenced in configure.in. Make sure to change that file
# too if you need to change this variable.
DEFINES = -DHUNSPELL_STATIC
endif
include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(topsrcdir)/extensions/spellcheck/src

View File

@ -23,5 +23,8 @@ if not CONFIG['MOZ_NATIVE_HUNSPELL']:
'replist.cpp',
'suggestmgr.cpp',
]
# This variable is referenced in configure.in. Make sure to change that file
# too if you need to change this variable.
DEFINES['HUNSPELL_STATIC'] = True
FINAL_LIBRARY = 'spellchecker'

View File

@ -5,40 +5,10 @@
VPATH = $(srcdir) $(srcdir)/unittest
DEFINES += -DMOZ_GFX -DUSE_CAIRO -DGFX2D_INTERNAL -DMOZ2D_HAS_MOZ_CAIRO
ifeq ($(MOZ_WIDGET_TOOLKIT),$(findstring $(MOZ_WIDGET_TOOLKIT),android gtk2 gtk3 gonk qt))
DEFINES += -DMOZ_ENABLE_FREETYPE
OS_CXXFLAGS += $(CAIRO_FT_CFLAGS)
endif
DEFINES += -DSK_A32_SHIFT=24 -DSK_R32_SHIFT=16 -DSK_G32_SHIFT=8 -DSK_B32_SHIFT=0
ifdef MOZ_DEBUG
DEFINES += -DGFX_LOG_DEBUG -DGFX_LOG_WARNING
endif
# Are we targeting x86 or x64? If so, build SSE2 files.
ifneq (,$(INTEL_ARCHITECTURE))
# VC2005 doesn't support _mm_castsi128_ps, so SSE2 is turned off
ifneq (1400,$(_MSC_VER))
DEFINES += -DUSE_SSE2
endif
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
DEFINES += -DWIN32 -DINITGUID
ifdef MOZ_ENABLE_SKIA
DEFINES += -DSKIA_IMPLEMENTATION=1 -DGR_IMPLEMENTATION=1
endif
# For Direct2D 1.1 we require WINSDK_MAXVER 0x06020000 or higher.
ifdef MOZ_ENABLE_DIRECT2D1_1
DEFINES += -DUSE_D2D1_1
endif
endif
include $(topsrcdir)/config/rules.mk
# Due to bug 796023, we can't have -DUNICODE and -D_UNICODE; defining those

View File

@ -51,6 +51,9 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
'SourceSurfaceD2D.cpp',
'SourceSurfaceD2DTarget.cpp',
]
DEFINES['WIN32'] = True
DEFINES['INITGUID'] = True
# For Direct2D 1.1 we require WINSDK_MAXVER 0x06020000 or higher.
if CONFIG['MOZ_ENABLE_DIRECT2D1_1']:
SOURCES += [
'DrawTargetD2D1.cpp',
@ -58,10 +61,13 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
'RadialGradientEffectD2D1.cpp',
'SourceSurfaceD2D1.cpp'
]
DEFINES['USE_D2D1_1'] = True
if CONFIG['MOZ_ENABLE_SKIA']:
SOURCES += [
'ScaledFontWin.cpp',
]
DEFINES['SKIA_IMPLEMENTATION'] = 1
DEFINES['GR_IMPLEMENTATION'] = 1
if CONFIG['MOZ_ENABLE_SKIA']:
UNIFIED_SOURCES += [
@ -83,6 +89,7 @@ if CONFIG['INTEL_ARCHITECTURE']:
'FilterProcessingSSE2.cpp',
'ImageScalingSSE2.cpp',
]
DEFINES['USE_SSE2'] = True
UNIFIED_SOURCES += [
'Blur.cpp',
@ -122,3 +129,18 @@ MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'gkmedias'
for var in ('MOZ_GFX', 'USE_CAIRO', 'GFX2D_INTERNAL', 'MOZ2D_HAS_MOZ_CAIRO'):
DEFINES[var] = True
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'):
DEFINES['MOZ_ENABLE_FREETYPE'] = True
DEFINES['SK_A32_SHIFT'] = 24
DEFINES['SK_R32_SHIFT'] = 16
DEFINES['SK_G32_SHIFT'] = 8
DEFINES['SK_B32_SHIFT'] = 0
if CONFIG['MOZ_DEBUG']:
DEFINES['GFX_LOG_DEBUG'] = True
DEFINES['GFX_LOG_WARNING'] = True

View File

@ -3,9 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# The below is a rough translation of build_angle.gypi:
DEFINES += -DANGLE_DISABLE_TRACE
DEFINES += -DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1
# Target: 'preprocessor'
# src/compiler/preprocessor:
VPATH += $(srcdir)/src/compiler/preprocessor
@ -17,8 +14,6 @@ LOCAL_INCLUDES += \
-I$(srcdir)/include/KHR \
-I$(srcdir)/src
DEFINES += -DCOMPILER_IMPLEMENTATION
VPATH += $(srcdir)/src/compiler
VPATH += $(srcdir)/src/compiler/depgraph
VPATH += $(srcdir)/src/compiler/timing

View File

@ -123,3 +123,7 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
NO_VISIBILITY_FLAGS = True
FINAL_LIBRARY = 'gkmedias'
DEFINES['ANGLE_DISABLE_TRACE'] = True
DEFINES['ANGLE_COMPILE_OPTIMIZATION_LEVEL'] = 'D3DCOMPILE_OPTIMIZATION_LEVEL1'
DEFINES['COMPILER_IMPLEMENTATION'] = True

View File

@ -16,17 +16,7 @@ endif
OS_COMPILE_CFLAGS = $(OS_CPPFLAGS)
OS_COMPILE_CXXFLAGS = $(OS_CPPFLAGS)
DEFINES += -DLIBEGL_EXPORTS
DEFINES += -DANGLE_BUILD -DNOMINMAX -D_CRT_SECURE_NO_DEPRECATE
ifndef MOZ_DEBUG
DEFINES += -D_SECURE_SCL=0
endif
# Below is a transcription of the EGL target from build_angle.gypi.
DEFINES += -DANGLE_DISABLE_TRACE
DEFINES += -DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1
# Target: 'libEGL'
# Links with: 'libGLESv2'
LOCAL_INCLUDES = \

View File

@ -25,3 +25,12 @@ SOURCES += [
LIBRARY_NAME = 'libEGL'
FORCE_SHARED_LIB = True
for var in ('LIBEGL_EXPORTS', 'ANGLE_BUILD', 'NOMINMAX',
'_CRT_SECURE_NO_DEPRECATE', 'ANGLE_DISABLE_TRACE'):
DEFINES[var] = True
if not CONFIG['MOZ_DEBUG']:
DEFINES['_SECURE_SCL'] = 0
DEFINES['ANGLE_COMPILE_OPTIMIZATION_LEVEL'] = 'D3DCOMPILE_OPTIMIZATION_LEVEL1'

View File

@ -16,17 +16,8 @@ endif
OS_COMPILE_CFLAGS = $(OS_CPPFLAGS)
OS_COMPILE_CXXFLAGS = $(OS_CPPFLAGS)
DEFINES += -DLIBGLESV2_EXPORTS
DEFINES += -DANGLE_BUILD -DNOMINMAX -D_CRT_SECURE_NO_DEPRECATE
ifndef MOZ_DEBUG
DEFINES += -D_SECURE_SCL=0
endif
# The below is a rough translation of build_angle.gypi,
# copied from src/Makefile.in.
DEFINES += -DANGLE_DISABLE_TRACE
DEFINES += -DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1
# Target: 'preprocessor'
# src/compiler/preprocessor:
@ -40,8 +31,6 @@ LOCAL_INCLUDES += \
-I$(srcdir)/.. \
-I"$(MOZ_DIRECTX_SDK_PATH)/include"
DEFINES += -DCOMPILER_IMPLEMENTATION
VPATH += $(srcdir)/renderer
VPATH += $(srcdir)/..
VPATH += $(srcdir)/../compiler

View File

@ -179,3 +179,13 @@ SOURCES += ['renderer/' + src for src in [
LIBRARY_NAME = 'libGLESv2'
FORCE_SHARED_LIB = True
for var in ('LIBGLESV2_EXPORTS', 'ANGLE_BUILD', 'NOMINMAX',
'_CRT_SECURE_NO_DEPRECATE', 'ANGLE_DISABLE_TRACE',
'COMPILER_IMPLEMENTATION'):
DEFINES[var] = True
if not CONFIG['MOZ_DEBUG']:
DEFINES['_SECURE_SCL'] = 0
DEFINES['ANGLE_COMPILE_OPTIMIZATION_LEVEL'] = 'D3DCOMPILE_OPTIMIZATION_LEVEL1'

View File

@ -9,20 +9,6 @@ endif
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
DEFINES += -DDISABLE_SOME_FLOATING_POINT
ifndef NS_PRINTING
DEFINES += -DCAIRO_OMIT_WIN32_PRINTING
endif
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
DEFINES += -DOS2_USE_PLATFORM_ALLOC
ifdef MOZ_OS2_HIGH_MEMORY
DEFINES += -DOS2_HIGH_MEMORY
endif
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
OS_INCLUDES += $(MOZ_QT_CFLAGS)
endif
@ -52,25 +38,7 @@ CFLAGS += -Wno-missing-field-initializers
CFLAGS += -Wno-conversion
endif # GNU_CC
DEFINES += -DPACKAGE_VERSION="\"moz\"" -DPACKAGE_BUGREPORT="\"http://bugzilla.mozilla.org/\""
DEFINES += -DCAIRO_HAS_PTHREAD -D_GNU_SOURCE
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
DEFINES += -DCAIRO_WIN32_STATIC_BUILD
endif
ifdef MOZ_TREE_CAIRO
DEFINES += -DMOZ_TREE_CAIRO
endif
ifndef MOZ_TREE_PIXMAN
CFLAGS += $(MOZ_PIXMAN_CFLAGS)
CXXFLAGS += $(MOZ_PIXMAN_CFLAGS)
else
DEFINES += -DMOZ_TREE_PIXMAN
endif
ifdef MOZ_TREE_FREETYPE
DEFINES += -DHAVE_FT_LIBRARY_SETLCDFILTER -DFT_LCD_FILTER_H="$(topsrcdir)/modules/freetype2/include/freetype/ftlcdfil.h"
endif

View File

@ -48,10 +48,14 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
'cairo-win32-font.c',
'cairo-win32-surface.c',
]
DEFINES['DISABLE_SOME_FLOATING_POINT'] = True
DEFINES['CAIRO_WIN32_STATIC_BUILD'] = True
if CONFIG['NS_PRINTING']:
SOURCES += [
'cairo-win32-printing-surface.c',
]
else:
DEFINES['CAIRO_OMIT_WIN32_PRINTING'] = True
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2':
EXPORTS.cairo += [
'cairo-os2-private.h',
@ -60,6 +64,9 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2':
SOURCES += [
'cairo-os2-surface.c',
]
DEFINES['OS2_USE_PLATFORM_ALLOC'] = True
if CONFIG['MOZ_OS2_HIGH_MEMORY']:
DEFINES['OS2_HIGH_MEMORY'] = True
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
EXPORTS.cairo += [
'cairo-quartz-image.h',
@ -192,3 +199,17 @@ UNIFIED_SOURCES += [
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'gkmedias'
DEFINES['PACKAGE_VERSION'] = '"moz"'
DEFINES['PACKAGE_BUGREPORT'] = '"http://bugzilla.mozilla.org/"'
for var in ('CAIRO_HAS_PTHREAD', '_GNU_SOURCE'):
DEFINES[var] = True
for var in ('MOZ_TREE_CAIRO', 'MOZ_TREE_PIXMAN'):
if CONFIG[var]:
DEFINES[var] = True
if CONFIG['MOZ_TREE_FREETYPE']:
DEFINES['HAVE_FT_LIBRARY_SETLCDFILTER'] = True
DEFINES['FT_LCD_FILTER_H'] = '%s/modules/freetype2/include/freetype/ftlcdfil.h' % TOPSRCDIR

View File

@ -6,14 +6,6 @@ ifeq ($(OS_TARGET),Android)
MODULE_OPTIMIZE_FLAGS = -O2
endif
ifdef MOZ_USE_PTHREADS
DEFINES += -DHAVE_PTHREAD_SETSPECIFIC
endif
ifdef _MSC_VER
DEFINES += -DPIXMAN_USE_XP_DLL_TLS_WORKAROUND
endif
# Build MMX code either with VC or with gcc-on-x86
ifdef _MSC_VER
ifeq (86,$(findstring 86,$(OS_TEST)))
@ -105,8 +97,6 @@ LOCAL_INCLUDES += -I$(srcdir) -I$(srcdir)/../../cairo/src
include $(topsrcdir)/config/rules.mk
CFLAGS += -DPACKAGE="mozpixman" -D_USE_MATH_DEFINES
# Disable spammy "missing initializer" GCC warning
ifdef GNU_CC
CFLAGS += -Wno-missing-field-initializers

View File

@ -61,3 +61,13 @@ SOURCES += [
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'gkmedias'
if CONFIG['MOZ_USE_PTHREADS']:
DEFINES['HAVE_PTHREAD_SETSPECIFIC'] = True
if CONFIG['_MSC_VER']:
DEFINES['PIXMAN_USE_XP_DLL_TLS_WORKAROUND'] = True
DEFINES['PACKAGE'] = 'mozpixman'
DEFINES['_USE_MATH_DEFINES'] = True

View File

@ -2,21 +2,11 @@
# 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/.
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
ifdef MOZ_WEBGL
DEFINES += -DMOZ_D3DCOMPILER_DLL=$(MOZ_D3DCOMPILER_DLL)
endif
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
LOCAL_INCLUDES = -I$(topsrcdir)/widget/gonk
LOCAL_INCLUDES += -I$(ANDROID_SOURCE)/hardware/libhardware/include
endif
ifdef MOZ_ANDROID_OMTC
DEFINES += -DMOZ_ANDROID_OMTC
endif
include $(topsrcdir)/config/rules.mk
DEFINES := $(filter-out -DUNICODE,$(DEFINES))

View File

@ -127,3 +127,9 @@ MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows' and CONFIG['MOZ_WEBGL']:
DEFINES['MOZ_D3DCOMPILER_DLL'] = CONFIG['MOZ_D3DCOMPILER_DLL']
if CONFIG['MOZ_ANDROID_OMTC']:
DEFINES['MOZ_ANDROID_OMTC'] = True

View File

@ -13,26 +13,3 @@ endif
# get the lists of source files and exported headers
include $(srcdir)/files.mk
# on Windows, we're going to link graphite with gkmedias instead of libxul
ifeq (WINNT,$(OS_TARGET))
endif
ifeq (WINNT,$(OS_TARGET))
DEFINES += -DGRAPHITE2_EXPORTING
else
# tell graphite2 not to export symbols, we'll be linking it directly with thebes
DEFINES += -DGRAPHITE2_STATIC
endif
include $(topsrcdir)/config/rules.mk
DEFINES += -DPACKAGE_VERSION="\"moz\""
DEFINES += -DPACKAGE_BUGREPORT="\"http://bugzilla.mozilla.org/\""
# disable features we don't need in the graphite2 code, to reduce code size
DEFINES += -DGRAPHITE2_NFILEFACE -DGRAPHITE2_NTRACING -DGRAPHITE2_NSEGCACHE
# provide a custom header that overrides malloc() and friends,
# to ensure safe OOM handling
DEFINES += -DGRAPHITE2_CUSTOM_HEADER="\"MozGrMalloc.h\""

View File

@ -59,5 +59,21 @@ MSVC_ENABLE_PGO = True
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
NO_VISIBILITY_FLAGS = True
DEFINES['GRAPHITE2_EXPORTING'] = True
else:
# tell graphite2 not to export symbols, we'll be linking it directly with
# thebes
DEFINES['GRAPHITE2_STATIC'] = True
FINAL_LIBRARY = 'gkmedias'
DEFINES['PACKAGE_VERSION'] = '"moz"'
DEFINES['PACKAGE_BUGREPORT'] = '"http://bugzilla.mozilla.org/"'
# disable features we don't need in the graphite2 code, to reduce code size
for var in ('GRAPHITE2_NFILEFACE', 'GRAPHITE2_NTRACING', 'GRAPHITE2_NSEGCACHE'):
DEFINES[var] = True
# provide a custom header that overrides malloc() and friends,
# to ensure safe OOM handling
DEFINES['GRAPHITE2_CUSTOM_HEADER'] = '"MozGrMalloc.h"'

View File

@ -29,10 +29,6 @@ LOCAL_INCLUDES += -I$(srcdir)
include $(topsrcdir)/config/rules.mk
DEFINES += -DPACKAGE_VERSION="\"moz\""
DEFINES += -DPACKAGE_BUGREPORT="\"http://bugzilla.mozilla.org/\""
DEFINES += -DHAVE_OT=1 -DHB_NO_MT -DHB_NO_UNICODE_FUNCS
# Cancel the effect of the -DDEBUG macro if present,
# because harfbuzz uses that name for its own purposes
COMPILE_CXXFLAGS += -UDEBUG

View File

@ -56,3 +56,9 @@ UNIFIED_SOURCES += [
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'gkmedias'
DEFINES['PACKAGE_VERSION'] = '"moz"'
DEFINES['PACKAGE_BUGREPORT'] = '"http://bugzilla.mozilla.org/"'
DEFINES['HAVE_OT'] = 1
DEFINES['HB_NO_MT'] = True
DEFINES['HB_NO_UNICODE_FUNCS'] = True

View File

@ -15,14 +15,6 @@ VPATH = \
$(srcdir)/ipc \
$(NULL)
ifdef MOZ_DEBUG
DEFINES += -DD3D_DEBUG_INFO
endif
ifdef MOZ_ENABLE_D3D10_LAYER
DEFINES += -DMOZ_ENABLE_D3D10_LAYER
endif
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES += \

View File

@ -293,3 +293,9 @@ MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'thebes'
if CONFIG['MOZ_DEBUG']:
DEFINES['D3D_DEBUG_INFO'] = True
if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True

View File

@ -1,40 +0,0 @@
#
# Copyright (C) 2010 Mozilla Foundation
#
# This is used to integrate the OTS library with the Mozilla build.
#
# Permission is hereby granted, without written agreement and without
# license or royalty fees, to use, copy, modify, and distribute this
# software and its documentation for any purpose, provided that the
# above copyright notice and the following two paragraphs appear in
# all copies of this software.
#
# IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
# ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
# IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#
# THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
# ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
# PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
# Mozilla author(s): Jonathan Kew
#
ifeq (WINNT,$(OS_TARGET))
endif
include $(topsrcdir)/config/rules.mk
DEFINES += -DPACKAGE_VERSION="\"moz\""
DEFINES += -DPACKAGE_BUGREPORT="\"http://bugzilla.mozilla.org/\""
DEFINES += -DNOMINMAX
DEFINES += -DMOZ_OTS_REPORT_ERRORS
ifeq (WINNT,$(OS_TARGET))
DEFINES += -DOTS_DLL -DOTS_DLL_EXPORTS
endif

View File

@ -53,3 +53,12 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
NO_VISIBILITY_FLAGS = True
FINAL_LIBRARY = 'gkmedias'
DEFINES['PACKAGE_VERSION'] = '"moz"'
DEFINES['PACKAGE_BUGREPORT'] = '"http://bugzilla.mozilla.org/"'
DEFINES['NOMINMAX'] = True
DEFINES['MOZ_OTS_REPORT_ERRORS'] = True
if CONFIG['OS_TARGET'] == 'WINNT':
DEFINES['OTS_DLL'] = True
DEFINES['OTS_DLL_EXPORTS'] = True

View File

@ -3,8 +3,6 @@
# 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/.
DEFINES += -DSK_A32_SHIFT=24 -DSK_R32_SHIFT=16 -DSK_G32_SHIFT=8 -DSK_B32_SHIFT=0
LOCAL_INCLUDES += \
-I$(srcdir)/include/core \
-I$(srcdir)/include/config \
@ -50,7 +48,6 @@ VPATH += \
ifeq ($(MOZ_WIDGET_TOOLKIT),$(findstring $(MOZ_WIDGET_TOOLKIT),android gonk))
OS_CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(CAIRO_FT_CFLAGS)
DEFINES += -DSK_FONTHOST_CAIRO_STANDALONE=0
endif
ifdef MOZ_WIDGET_GTK
@ -59,23 +56,6 @@ endif
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
OS_CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PANGO_CFLAGS) $(CAIRO_FT_CFLAGS)
ifeq (Linux,$(OS_TARGET))
DEFINES += -DSK_USE_POSIX_THREADS=1
endif
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),$(findstring $(MOZ_WIDGET_TOOLKIT),android gtk2 gtk3 gonk cocoa))
DEFINES += -DSK_USE_POSIX_THREADS=1
endif
ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
DEFINES += -DSKIA_IMPLEMENTATION=1 -DGR_IMPLEMENTATION=1
endif
ifneq (,$(INTEL_ARCHITECTURE))
ifdef HAVE_TOOLCHAIN_SUPPORT_MSSSE3
DEFINES += -DSK_BUILD_SSSE3
endif
endif
include $(topsrcdir)/config/rules.mk

View File

@ -175,6 +175,8 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
'src/ports/SkFontHost_sandbox_none.cpp',
'src/ports/SkFontHost_win.cpp',
]
DEFINES['SKIA_IMPLEMENTATION'] = 1
DEFINES['GR_IMPLEMENTATION'] = 1
elif CONFIG['MOZ_WIDGET_GTK']:
EXPORTS.skia += [
'include/ports/SkTypeface_cairo.h',
@ -217,6 +219,7 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
'src/utils/SkThreadUtils_pthread.cpp',
'src/utils/SkThreadUtils_pthread_linux.cpp',
]
DEFINES['SK_USE_POSIX_THREADS'] = 1
# Separate 'if' from above, since the else below applies to all != 'android'
# toolkits.
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gonk'):
@ -240,6 +243,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gonk'):
'src/ports/SkFontHost_FreeType_common.cpp',
'src/ports/SkFontHost_linux.cpp',
]
DEFINES['SK_FONTHOST_CAIRO_STANDALONE'] = 0
else:
UNIFIED_SOURCES += [
'src/ports/SkDebug_stdio.cpp',
@ -586,3 +590,14 @@ if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG['
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'gkmedias'
DEFINES['SK_A32_SHIFT'] = 24
DEFINES['SK_R32_SHIFT'] = 16
DEFINES['SK_G32_SHIFT'] = 8
DEFINES['SK_B32_SHIFT'] = 0
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'cocoa'):
DEFINES['SK_USE_POSIX_THREADS'] = 1
if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSSE3']:
DEFINES['SK_BUILD_SSSE3'] = 1

View File

@ -6,38 +6,10 @@ LOCAL_INCLUDES += \
-I$(topsrcdir)/content/xml/document/src \
$(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT),$(findstring $(MOZ_WIDGET_TOOLKIT),android gtk2 gtk3 gonk qt))
DEFINES += -DMOZ_ENABLE_FREETYPE
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
ifdef MOZ_ENABLE_D3D9_LAYER
DEFINES += -DMOZ_ENABLE_D3D9_LAYER
endif
ifdef MOZ_ENABLE_D3D10_LAYER
DEFINES += -DMOZ_ENABLE_D3D10_LAYER
endif
ACDEFINES += -UWIN32_LEAN_AND_MEAN
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),android)
# This is set for "normal Android", that is, when Gecko is running on
# top of the android java runtime.
DEFINES += -DMOZ_USING_ANDROID_JAVA_WIDGETS
endif
DEFINES += \
-DMOZ_OTS_REPORT_ERRORS \
-DGRAPHITE2_STATIC \
$(NULL)
ifeq (WINNT,$(OS_TARGET))
DEFINES += -DOTS_DLL
endif
include $(topsrcdir)/config/rules.mk
DEFINES := $(filter-out -DUNICODE,$(DEFINES))

View File

@ -299,3 +299,22 @@ FINAL_LIBRARY = 'xul'
GENERATED_FILES = [
'PremultiplyTables.h',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'):
DEFINES['MOZ_ENABLE_FREETYPE'] = True
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
for var in ('MOZ_ENABLE_D3D9_LAYER', 'MOZ_ENABLE_D3D10_LAYER'):
if CONFIG[var]:
DEFINES[var] = True
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
# This is set for "normal Android", that is, when Gecko is running on
# top of the android java runtime.
DEFINES['MOZ_USING_ANDROID_JAVA_WIDGETS'] = True
DEFINES['MOZ_OTS_REPORT_ERRORS'] = True
DEFINES['GRAPHITE2_STATIC'] = True
if CONFIG['OS_TARGET'] == 'WINNT':
DEFINES['OTS_DLL'] = True

View File

@ -7,14 +7,5 @@ include $(topsrcdir)/config/rules.mk
INCLUDES += -I$(srcdir)/..
# CODESET is not automatically defined on some older versions of Redhat.
# Define _XOPEN_SOURCE so CODESET will get defined and thus allow
# nl_langinfo(CODESET) to compile on these systems.
ifeq ($(OS_ARCH), Linux)
DEFINES += -D_XOPEN_SOURCE=500
endif
DEFINES += -DOSTYPE=\"$(OS_CONFIG)\"
unixcharset.properties.h: $(srcdir)/../props2arrays.py unixcharset.properties
$(PYTHON) $^ $@

View File

@ -24,3 +24,11 @@ FINAL_LIBRARY = 'i18n'
GENERATED_FILES = [
'unixcharset.properties.h',
]
# CODESET is not automatically defined on some older versions of Redhat.
# Define _XOPEN_SOURCE so CODESET will get defined and thus allow
# nl_langinfo(CODESET) to compile on these systems.
if CONFIG['OS_ARCH'] == 'Linux':
DEFINES['_XOPEN_SOURCE'] = 500
DEFINES['OSTYPE'] = '"%s"' % CONFIG['OS_CONFIG']

View File

@ -20,5 +20,4 @@ ifdef _MSC_VER
# Don't include directives about which CRT to use
OS_COMPILE_CXXFLAGS += -Zl
OS_COMPILE_CFLAGS += -Zl
DEFINES += -D_USE_ANSI_CPP
endif

View File

@ -21,3 +21,6 @@ UNIFIED_SOURCES += intl_unicharutil_util_cppsrcs
LIBRARY_NAME = 'unicharutil_external_s'
FORCE_STATIC_LIB = True
if CONFIG['_MSC_VER']:
DEFINES['_USE_ANSI_CPP'] = True

View File

@ -26,12 +26,6 @@ vpath %.mm \
$(srcdir)/src/chrome/common \
$(NULL)
ifneq ($(OS_ARCH),WINNT) # (if OS_POSIX) {
ifeq ($(OS_TARGET),Android)
DEFINES += -DANDROID -D_POSIX_MONOTONIC_CLOCK=0
endif # Android
endif # } Not WINNT (OS_POSIX)
# libevent
ifndef MOZ_NATIVE_LIBEVENT # {
@ -40,7 +34,6 @@ ifneq ($(OS_ARCH),WINNT) # (if OS_POSIX) {
LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent
LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/include
DEFINES += -DHAVE_CONFIG_H
ifeq ($(OS_ARCH),Darwin) # (OS_MACOSX) {
LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/mac
@ -56,9 +49,6 @@ endif # }
else # } else (OS_BSD) {
ifneq (,$(filter DragonFly FreeBSD,$(OS_ARCH))) # (not OS_DRAGONFLY and not OS_FREEBSD) {
DEFINES += -D_EVENT_HAVE_SENDFILE
endif # }
LOCAL_INCLUDES += -I$(srcdir)/src/third_party/libevent/bsd
endif # }

View File

@ -146,6 +146,7 @@ elif not CONFIG['MOZ_NATIVE_LIBEVENT']:
'src/third_party/libevent/signal.c',
'src/third_party/libevent/strlcpy.c',
]
DEFINES['HAVE_CONFIG_H'] = True
if os_posix:
SOURCES += [
@ -177,6 +178,8 @@ if os_posix:
SOURCES += [
'src/base/message_pump_android.cc',
]
DEFINES['ANDROID'] = True
DEFINES['_POSIX_MONOTONIC_CLOCK'] = 0
if os_macosx:
UNIFIED_SOURCES += [
@ -265,6 +268,8 @@ if os_bsd:
SOURCES += [
'src/third_party/libevent/kqueue.c',
]
if not os_freebsd and not os_dragonfly:
DEFINES['_EVENT_HAVE_SENDFILE'] = True
if CONFIG['_MSC_VER']:
SOURCES += [

View File

@ -4,9 +4,6 @@
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter
DEFINES += -DMOZ_CHILD_PROCESS_NAME=\"$(MOZ_CHILD_PROCESS_NAME)\"
DEFINES += -DMOZ_CHILD_PROCESS_BUNDLE=\"$(MOZ_CHILD_PROCESS_BUNDLE)\"
include $(topsrcdir)/config/rules.mk
ifdef MOZ_CONTENT_SANDBOX

View File

@ -106,3 +106,6 @@ IPDL_SOURCES = [
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
for var in ('MOZ_CHILD_PROCESS_NAME', 'MOZ_CHILD_PROCESS_BUNDLE'):
DEFINES[var] = '"%s"' % CONFIG[var]

Some files were not shown because too many files have changed in this diff Show More