2012-05-21 11:12:37 +00: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-06 23:52:26 +00:00
|
|
|
|
2013-02-25 20:47:17 +00:00
|
|
|
STANDALONE_MAKEFILE := 1
|
|
|
|
|
2011-12-06 23:52:26 +00:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
|
|
|
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
|
|
|
|
|
|
|
|
MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
|
|
|
|
|
|
|
|
DEFINES += \
|
|
|
|
-DAB_CD=$(AB_CD) \
|
|
|
|
-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
|
|
|
|
-DPREF_DIR=$(PREF_DIR) \
|
|
|
|
$(NULL)
|
|
|
|
|
2013-01-23 10:23:15 +00:00
|
|
|
DEFINES += -DJAREXT=
|
2011-12-06 23:52:26 +00:00
|
|
|
|
|
|
|
DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
|
|
|
|
|
2012-11-15 18:16:08 +00:00
|
|
|
# Set MSVC dlls version to package, if any.
|
|
|
|
ifdef WIN32_REDIST_DIR
|
|
|
|
DEFINES += -DMOZ_MSVC_REDIST=$(_MSC_VER)
|
|
|
|
endif
|
|
|
|
|
2012-08-22 23:26:32 +00:00
|
|
|
ifdef ENABLE_MARIONETTE
|
|
|
|
DEFINES += -DENABLE_MARIONETTE=1
|
|
|
|
endif
|
|
|
|
|
2011-12-06 23:52:26 +00:00
|
|
|
ifdef MOZ_PKG_MANIFEST_P
|
|
|
|
MOZ_PKG_MANIFEST = package-manifest
|
|
|
|
endif
|
|
|
|
|
2013-01-23 10:23:15 +00:00
|
|
|
MOZ_PACKAGER_MINIFY=1
|
2011-12-06 23:52:26 +00:00
|
|
|
|
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
|
|
|
|
|
2014-03-24 19:16:13 +00: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))
|
|
|
|
MOZ_PACKAGER_MINIFY_JS=1
|
|
|
|
endif
|
|
|
|
|
2011-12-06 23:52:26 +00:00
|
|
|
ifeq (bundle, $(MOZ_FS_LAYOUT))
|
|
|
|
BINPATH = $(_BINPATH)
|
|
|
|
DEFINES += -DAPPNAME=$(_APPNAME)
|
|
|
|
else
|
|
|
|
# Every other platform just winds up in dist/bin
|
|
|
|
BINPATH = bin
|
|
|
|
endif
|
|
|
|
DEFINES += -DBINPATH=$(BINPATH)
|
|
|
|
|
2012-07-04 02:11:04 +00:00
|
|
|
ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
|
|
|
|
DEFINES += -DMOZ_SHARED_MOZGLUE=1
|
|
|
|
endif
|
|
|
|
|
2013-11-11 22:52:33 +00:00
|
|
|
ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)))
|
|
|
|
DEFINES += -DMOZ_RTSP
|
|
|
|
endif
|
|
|
|
|
2013-11-22 14:03:21 +00:00
|
|
|
ifdef GKMEDIAS_SHARED_LIBRARY
|
|
|
|
DEFINES += -DGKMEDIAS_SHARED_LIBRARY
|
|
|
|
endif
|
|
|
|
|
2011-12-06 23:52:26 +00:00
|
|
|
ifdef MOZ_PKG_MANIFEST_P
|
|
|
|
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) FORCE
|
2013-11-09 01:35:44 +00:00
|
|
|
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@)
|
2012-12-06 14:07:23 +00:00
|
|
|
ifdef MOZ_CHROME_MULTILOCALE
|
2013-12-02 21:34:21 +00:00
|
|
|
printf '\n[multilocale]\n' >> $@
|
2012-12-06 14:07:23 +00:00
|
|
|
for LOCALE in $(MOZ_CHROME_MULTILOCALE) ;\
|
|
|
|
do \
|
2013-12-03 22:28:03 +00:00
|
|
|
printf '$(BINPATH)/chrome/'"$$LOCALE"'$(JAREXT)\n' >> $@; \
|
|
|
|
printf '$(BINPATH)/chrome/'"$$LOCALE"'.manifest\n' >> $@; \
|
2012-12-06 14:07:23 +00:00
|
|
|
done
|
|
|
|
endif
|
2011-12-06 23:52:26 +00:00
|
|
|
|
|
|
|
GARBAGE += $(MOZ_PKG_MANIFEST)
|
|
|
|
endif
|
2014-04-08 06:23:00 +00:00
|
|
|
|
|
|
|
ifdef FXOS_SIMULATOR
|
|
|
|
.PHONY: simulator
|
|
|
|
simulator: make-package
|
|
|
|
@echo 'Building simulator addon...'
|
|
|
|
$(PYTHON) $(topsrcdir)/b2g/simulator/build_xpi.py $(MOZ_PKG_PLATFORM)
|
|
|
|
|
|
|
|
default:: simulator
|
|
|
|
|
|
|
|
# Ensure copying Simulator xpi to ftp
|
|
|
|
UPLOAD_EXTRA_FILES += fxos-simulator-*-*.xpi
|
|
|
|
endif
|