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 += \
|
|
|
|
-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
|
2014-05-30 00:39:44 +00:00
|
|
|
ifdef MOZ_NO_DEBUG_RTL
|
2014-06-27 15:24:29 +00: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)
|
2012-11-15 18:16:08 +00:00
|
|
|
endif
|
2014-05-30 00:39:44 +00:00
|
|
|
endif
|
2012-11-15 18:16:08 +00:00
|
|
|
|
2014-08-01 20:23:48 +00:00
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
DEFINES += -DMOZ_DEBUG=1
|
|
|
|
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
|
|
|
|
2014-09-29 18:51:47 +00:00
|
|
|
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
ifndef _APPNAME
|
|
|
|
_APPNAME = $(MOZ_MACBUNDLE_NAME)
|
|
|
|
endif
|
|
|
|
ifndef _BINPATH
|
|
|
|
_BINPATH = /$(_APPNAME)/Contents/MacOS
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
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
|
|
|
|
|
2014-05-22 22:24:22 +00:00
|
|
|
ifdef MOZ_REPLACE_MALLOC
|
|
|
|
DEFINES += -DMOZ_REPLACE_MALLOC
|
|
|
|
endif
|
|
|
|
ifdef MOZ_JEMALLOC3
|
|
|
|
DEFINES += -DMOZ_JEMALLOC3
|
|
|
|
endif
|
|
|
|
|
2014-05-01 11:36:05 +00:00
|
|
|
ifdef MOZ_WIDGET_GTK
|
|
|
|
DEFINES += -DMOZ_GTK=1
|
|
|
|
ifdef MOZ_ENABLE_GTK3
|
|
|
|
DEFINES += -DMOZ_GTK3=1
|
|
|
|
endif
|
|
|
|
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
|
2014-06-24 23:38:12 +00:00
|
|
|
export MAKE
|
|
|
|
|
2014-04-08 06:23:00 +00:00
|
|
|
.PHONY: simulator
|
|
|
|
simulator: make-package
|
|
|
|
@echo 'Building simulator addon...'
|
|
|
|
$(PYTHON) $(topsrcdir)/b2g/simulator/build_xpi.py $(MOZ_PKG_PLATFORM)
|
|
|
|
|
2014-04-30 13:18:00 +00:00
|
|
|
libs:: simulator
|
2014-04-08 06:23:00 +00:00
|
|
|
|
|
|
|
# Ensure copying Simulator xpi to ftp
|
|
|
|
UPLOAD_EXTRA_FILES += fxos-simulator-*-*.xpi
|
|
|
|
endif
|