michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: STANDALONE_MAKEFILE := 1 michael@0: DIST_SUBDIR := browser michael@0: michael@0: include $(topsrcdir)/config/rules.mk michael@0: michael@0: MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in michael@0: michael@0: MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in michael@0: # Some files have been already bundled with xulrunner michael@0: ifndef SYSTEM_LIBXUL michael@0: MOZ_PKG_FATAL_WARNINGS = 1 michael@0: endif michael@0: michael@0: DEFINES += -DAB_CD=$(AB_CD) -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR) michael@0: michael@0: ifdef LIBXUL_SDK michael@0: DEFINES += -DLIBXUL_SDK=1 michael@0: endif michael@0: michael@0: ifdef MOZ_DEBUG michael@0: DEFINES += -DMOZ_DEBUG=1 michael@0: endif michael@0: michael@0: ifdef MOZ_ENABLE_GNOME_COMPONENT michael@0: DEFINES += -DMOZ_ENABLE_GNOME_COMPONENT=1 michael@0: endif michael@0: michael@0: ifdef MOZ_WIDGET_GTK michael@0: DEFINES += -DMOZ_GTK=1 michael@0: endif michael@0: michael@0: ifdef MOZ_NATIVE_NSPR michael@0: DEFINES += -DMOZ_NATIVE_NSPR=1 michael@0: endif michael@0: michael@0: ifdef MOZ_NATIVE_NSS michael@0: DEFINES += -DMOZ_NATIVE_NSS=1 michael@0: endif michael@0: michael@0: ifdef NSS_DISABLE_DBM michael@0: DEFINES += -DNSS_DISABLE_DBM=1 michael@0: endif michael@0: michael@0: ifdef _MSC_VER michael@0: DEFINES += -D_MSC_VER=$(_MSC_VER) michael@0: endif michael@0: michael@0: DEFINES += -DJAREXT= michael@0: michael@0: ifdef MOZ_ANGLE_RENDERER michael@0: DEFINES += -DMOZ_ANGLE_RENDERER=$(MOZ_ANGLE_RENDERER) michael@0: DEFINES += -DMOZ_D3DCOMPILER_DLL=$(MOZ_D3DCOMPILER_DLL) michael@0: endif michael@0: michael@0: DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME) michael@0: michael@0: # Set MSVC dlls version to package, if any. michael@0: ifdef WIN32_REDIST_DIR michael@0: DEFINES += -DMOZ_MSVC_REDIST=$(_MSC_VER) michael@0: endif michael@0: michael@0: ifdef TOR_BROWSER_UPDATE michael@0: DEFINES += -DTOR_BROWSER_UPDATE michael@0: endif michael@0: michael@0: ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET))) michael@0: DEFINES += -DMOZ_SHARED_MOZGLUE=1 michael@0: endif michael@0: michael@0: ifdef MOZ_JSDEBUGGER michael@0: DEFINES += -DMOZ_JSDEBUGGER michael@0: endif michael@0: michael@0: ifdef NECKO_WIFI michael@0: DEFINES += -DNECKO_WIFI michael@0: endif michael@0: michael@0: ifdef GKMEDIAS_SHARED_LIBRARY michael@0: DEFINES += -DGKMEDIAS_SHARED_LIBRARY michael@0: endif michael@0: michael@0: ifdef MOZ_PKG_MANIFEST_P michael@0: MOZ_PKG_MANIFEST = package-manifest michael@0: michael@0: $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) $(GLOBAL_DEPS) michael@0: $(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@) michael@0: michael@0: GARBAGE += $(MOZ_PKG_MANIFEST) michael@0: endif michael@0: michael@0: ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) michael@0: MOZ_PKG_MAC_DSSTORE=branding/dsstore michael@0: MOZ_PKG_MAC_BACKGROUND=branding/background.png michael@0: MOZ_PKG_MAC_ICON=branding/disk.icns michael@0: MOZ_PKG_MAC_EXTRA=--symlink '/Applications:/ ' michael@0: endif michael@0: michael@0: ifndef LIBXUL_SDK michael@0: INSTALL_SDK = 1 michael@0: endif michael@0: michael@0: include $(topsrcdir)/toolkit/mozapps/installer/signing.mk michael@0: include $(topsrcdir)/toolkit/mozapps/installer/packager.mk michael@0: michael@0: ifeq (bundle, $(MOZ_FS_LAYOUT)) michael@0: BINPATH = $(_BINPATH) michael@0: DEFINES += -DAPPNAME=$(_APPNAME) michael@0: else michael@0: # Every other platform just winds up in dist/bin michael@0: BINPATH = bin michael@0: endif michael@0: DEFINES += -DBINPATH=$(BINPATH) michael@0: michael@0: DEFINES += -DMOZ_ICU_VERSION=$(MOZ_ICU_VERSION) michael@0: ifdef MOZ_NATIVE_ICU michael@0: DEFINES += -DMOZ_NATIVE_ICU michael@0: endif michael@0: ifdef MOZ_SHARED_ICU michael@0: DEFINES += -DMOZ_SHARED_ICU michael@0: endif michael@0: michael@0: libs:: michael@0: $(MAKE) -C $(DEPTH)/browser/locales langpack michael@0: michael@0: ifeq (WINNT,$(OS_ARCH)) michael@0: PKGCOMP_FIND_OPTS = michael@0: else michael@0: PKGCOMP_FIND_OPTS = -L michael@0: endif michael@0: ifeq (Darwin, $(OS_ARCH)) michael@0: FINDPATH = $(_APPNAME)/Contents/MacOS michael@0: else michael@0: FINDPATH=bin michael@0: endif michael@0: michael@0: package-compare:: $(MOZ_PKG_MANIFEST) michael@0: ifdef MOZ_PKG_MANIFEST_P michael@0: cd $(DIST); find $(PKGCOMP_FIND_OPTS) $(FINDPATH) -type f | sort > bin-list.txt michael@0: grep '^$(BINPATH)' $(MOZ_PKG_MANIFEST) | sed -e 's/^\///' | sort > $(DIST)/pack-list.txt michael@0: -diff -u $(DIST)/pack-list.txt $(DIST)/bin-list.txt michael@0: rm -f $(DIST)/pack-list.txt $(DIST)/bin-list.txt michael@0: endif michael@0: michael@0: installer:: michael@0: ifdef INSTALLER_DIR michael@0: $(MAKE) -C $(INSTALLER_DIR) michael@0: endif michael@0: michael@0: ifdef ENABLE_MARIONETTE michael@0: DEFINES += -DENABLE_MARIONETTE=1 michael@0: endif