2012-05-21 15:12:37 +04:00
|
|
|
# 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/.
|
2011-12-07 03:52:26 +04:00
|
|
|
|
2013-02-26 00:47:17 +04:00
|
|
|
STANDALONE_MAKEFILE := 1
|
|
|
|
|
2011-12-07 03:52:26 +04:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
|
|
|
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
|
|
|
|
|
2015-07-15 10:31:53 +03:00
|
|
|
MOZ_PKG_MANIFEST = $(srcdir)/package-manifest.in
|
|
|
|
|
|
|
|
ifdef MOZ_CHROME_MULTILOCALE
|
|
|
|
MOZ_PKG_MANIFEST_DEPS = locale-manifest.in
|
|
|
|
|
|
|
|
DEFINES += -DPKG_LOCALE_MANIFEST=$(CURDIR)/locale-manifest.in
|
|
|
|
endif
|
2011-12-07 03:52:26 +04:00
|
|
|
|
|
|
|
DEFINES += \
|
|
|
|
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
|
|
|
|
-DPREF_DIR=$(PREF_DIR) \
|
|
|
|
$(NULL)
|
|
|
|
|
2013-01-23 14:23:15 +04:00
|
|
|
DEFINES += -DJAREXT=
|
2011-12-07 03:52:26 +04:00
|
|
|
|
|
|
|
DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
|
|
|
|
|
2012-11-15 22:16:08 +04:00
|
|
|
# Set MSVC dlls version to package, if any.
|
|
|
|
ifdef WIN32_REDIST_DIR
|
2014-05-30 04:39:44 +04:00
|
|
|
ifdef MOZ_NO_DEBUG_RTL
|
2014-06-27 19:24:29 +04:00
|
|
|
DEFINES += -DMOZ_PACKAGE_MSVC_DLLS=1
|
|
|
|
DEFINES += -DMSVC_C_RUNTIME_DLL=$(MSVC_C_RUNTIME_DLL)
|
|
|
|
DEFINES += -DMSVC_CXX_RUNTIME_DLL=$(MSVC_CXX_RUNTIME_DLL)
|
2015-01-30 04:36:39 +03:00
|
|
|
ifdef MSVC_APPCRT_DLL
|
|
|
|
DEFINES += -DMSVC_APPCRT_DLL=$(MSVC_APPCRT_DLL)
|
|
|
|
endif
|
|
|
|
ifdef MSVC_DESKTOPCRT_DLL
|
|
|
|
DEFINES += -DMSVC_DESKTOPCRT_DLL=$(MSVC_DESKTOPCRT_DLL)
|
|
|
|
endif
|
2012-11-15 22:16:08 +04:00
|
|
|
endif
|
2014-05-30 04:39:44 +04:00
|
|
|
endif
|
2012-11-15 22:16:08 +04:00
|
|
|
|
2014-08-02 00:23:48 +04:00
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
DEFINES += -DMOZ_DEBUG=1
|
|
|
|
endif
|
|
|
|
|
2012-08-23 03:26:32 +04:00
|
|
|
ifdef ENABLE_MARIONETTE
|
|
|
|
DEFINES += -DENABLE_MARIONETTE=1
|
|
|
|
endif
|
|
|
|
|
2013-01-23 14:23:15 +04:00
|
|
|
MOZ_PACKAGER_MINIFY=1
|
2011-12-07 03:52:26 +04:00
|
|
|
|
2014-09-29 22:51:47 +04:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
ifndef _APPNAME
|
|
|
|
_APPNAME = $(MOZ_MACBUNDLE_NAME)
|
|
|
|
endif
|
|
|
|
ifndef _BINPATH
|
|
|
|
_BINPATH = /$(_APPNAME)/Contents/MacOS
|
|
|
|
endif
|
2015-03-05 05:29:44 +03:00
|
|
|
ifndef _RESPATH
|
|
|
|
_RESPATH = /$(_APPNAME)/Contents/Resources
|
|
|
|
endif
|
2014-09-29 22:51:47 +04:00
|
|
|
endif
|
|
|
|
|
2011-12-07 03:52:26 +04:00
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
|
|
|
|
|
2014-03-24 23:16:13 +04:00
|
|
|
# Note that JS_BINARY can be defined in packager.mk, so this test must come after
|
|
|
|
# including that file. MOZ_PACKAGER_MINIFY_JS is used in packager.mk, but since
|
|
|
|
# recipe evaluation is deferred, we can set it here after the inclusion.
|
|
|
|
ifneq (,$(JS_BINARY))
|
2014-10-07 17:39:00 +04:00
|
|
|
ifndef MOZ_DEBUG
|
2014-03-24 23:16:13 +04:00
|
|
|
MOZ_PACKAGER_MINIFY_JS=1
|
|
|
|
endif
|
2014-10-07 17:39:00 +04:00
|
|
|
endif
|
2014-03-24 23:16:13 +04:00
|
|
|
|
2011-12-07 03:52:26 +04:00
|
|
|
ifeq (bundle, $(MOZ_FS_LAYOUT))
|
|
|
|
BINPATH = $(_BINPATH)
|
2015-03-05 05:29:44 +03:00
|
|
|
RESPATH = $(_RESPATH)
|
2011-12-07 03:52:26 +04:00
|
|
|
DEFINES += -DAPPNAME=$(_APPNAME)
|
|
|
|
else
|
|
|
|
# Every other platform just winds up in dist/bin
|
|
|
|
BINPATH = bin
|
2015-03-05 05:29:44 +03:00
|
|
|
RESPATH = bin
|
2011-12-07 03:52:26 +04:00
|
|
|
endif
|
|
|
|
DEFINES += -DBINPATH=$(BINPATH)
|
2015-03-05 05:29:44 +03:00
|
|
|
DEFINES += -DRESPATH=$(RESPATH)
|
|
|
|
|
2015-08-27 00:35:00 +03:00
|
|
|
LPROJ_ROOT = $(firstword $(subst -, ,$(AB_CD)))
|
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
ifeq (zh-TW,$(AB_CD))
|
|
|
|
LPROJ_ROOT := $(subst -,_,$(AB_CD))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
DEFINES += -DLPROJ_ROOT=$(LPROJ_ROOT)
|
2011-12-07 03:52:26 +04:00
|
|
|
|
2012-07-04 06:11:04 +04:00
|
|
|
ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
|
|
|
|
DEFINES += -DMOZ_SHARED_MOZGLUE=1
|
|
|
|
endif
|
|
|
|
|
2013-11-12 02:52:33 +04:00
|
|
|
ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)))
|
|
|
|
DEFINES += -DMOZ_RTSP
|
|
|
|
endif
|
|
|
|
|
2015-07-30 04:22:37 +03:00
|
|
|
DEFINES += -DMOZ_ICU_VERSION=$(MOZ_ICU_VERSION)
|
|
|
|
ifdef MOZ_NATIVE_ICU
|
|
|
|
DEFINES += -DMOZ_NATIVE_ICU
|
|
|
|
endif
|
|
|
|
ifdef MOZ_SHARED_ICU
|
|
|
|
DEFINES += -DMOZ_SHARED_ICU
|
|
|
|
endif
|
|
|
|
DEFINES += -DMOZ_ICU_DBG_SUFFIX=$(MOZ_ICU_DBG_SUFFIX)
|
2014-05-23 02:24:22 +04:00
|
|
|
|
2014-05-01 15:36:05 +04:00
|
|
|
ifdef MOZ_WIDGET_GTK
|
|
|
|
DEFINES += -DMOZ_GTK=1
|
|
|
|
ifdef MOZ_ENABLE_GTK3
|
|
|
|
DEFINES += -DMOZ_GTK3=1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2012-12-06 18:07:23 +04:00
|
|
|
ifdef MOZ_CHROME_MULTILOCALE
|
2015-07-15 10:31:53 +03:00
|
|
|
locale-manifest.in: $(GLOBAL_DEPS) FORCE
|
|
|
|
printf '\n[multilocale]\n' > $@
|
2012-12-06 18:07:23 +04:00
|
|
|
for LOCALE in $(MOZ_CHROME_MULTILOCALE) ;\
|
|
|
|
do \
|
2013-12-04 02:28:03 +04:00
|
|
|
printf '$(BINPATH)/chrome/'"$$LOCALE"'$(JAREXT)\n' >> $@; \
|
|
|
|
printf '$(BINPATH)/chrome/'"$$LOCALE"'.manifest\n' >> $@; \
|
2012-12-06 18:07:23 +04:00
|
|
|
done
|
2011-12-07 03:52:26 +04:00
|
|
|
|
2015-07-15 10:31:53 +03:00
|
|
|
GARBAGE += locale-manifest.in
|
2011-12-07 03:52:26 +04:00
|
|
|
endif
|
2014-04-08 10:23:00 +04:00
|
|
|
|
|
|
|
ifdef FXOS_SIMULATOR
|
2014-06-25 03:38:12 +04:00
|
|
|
export MAKE
|
|
|
|
|
2014-04-08 10:23:00 +04:00
|
|
|
.PHONY: simulator
|
|
|
|
simulator: make-package
|
|
|
|
@echo 'Building simulator addon...'
|
|
|
|
$(PYTHON) $(topsrcdir)/b2g/simulator/build_xpi.py $(MOZ_PKG_PLATFORM)
|
|
|
|
|
2014-04-30 17:18:00 +04:00
|
|
|
libs:: simulator
|
2014-04-08 10:23:00 +04:00
|
|
|
|
|
|
|
# Ensure copying Simulator xpi to ftp
|
|
|
|
UPLOAD_EXTRA_FILES += fxos-simulator-*-*.xpi
|
|
|
|
endif
|