2012-04-17 07:11:53 -07: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/.
|
|
|
|
|
2012-08-04 11:26:44 -07:00
|
|
|
DEPTH = @DEPTH@
|
2012-04-17 07:11:53 -07:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
2012-04-24 13:44:36 -07:00
|
|
|
include $(DEPTH)/config/autoconf.mk
|
2012-04-17 07:11:53 -07:00
|
|
|
|
|
|
|
# Build a binary bootstrapping with XRE_main
|
|
|
|
PROGRAM = webapprt-stub$(BIN_SUFFIX)
|
|
|
|
|
|
|
|
CPPSRCS = webapprt.cpp
|
|
|
|
|
2012-04-24 13:44:36 -07:00
|
|
|
# Statically link against the CRT
|
|
|
|
USE_STATIC_LIBS = 1
|
2012-04-17 07:11:53 -07:00
|
|
|
# Don't create a dependency on mozglue, which is impossible (difficult?)
|
|
|
|
# to dynamically link into our executable, as we copy it to arbitrary locations.
|
|
|
|
MOZ_GLUE_LDFLAGS =
|
|
|
|
|
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
|
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
|
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
|
|
|
|
LOCAL_INCLUDES += -I$(DEPTH)/build
|
|
|
|
|
|
|
|
DEFINES += -DXPCOM_GLUE
|
|
|
|
STL_FLAGS=
|
|
|
|
|
|
|
|
LIBS = \
|
2012-05-21 14:31:03 -07:00
|
|
|
$(XPCOM_STANDALONE_STATICRUNTIME_GLUE_LDOPTS) \
|
2012-04-17 07:11:53 -07:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ifndef MOZ_WINCONSOLE
|
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
MOZ_WINCONSOLE = 1
|
|
|
|
else
|
|
|
|
MOZ_WINCONSOLE = 0
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Installer stuff
|
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
|
|
|
|
|
|
|
|
CONFIG_DIR = instgen
|
|
|
|
SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/firefox/7zSD.sfx
|
|
|
|
APP_VERSION := $(shell cat $(topsrcdir)/browser/config/version.txt)
|
|
|
|
DEFINES += -DAPP_VERSION=$(APP_VERSION)
|
|
|
|
|
|
|
|
ifdef _MSC_VER
|
|
|
|
# Always enter a Windows program through wmain, whether or not we're
|
|
|
|
# a console application.
|
|
|
|
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
|
|
|
endif
|
|
|
|
|
|
|
|
OS_LIBS += $(call EXPAND_LIBNAME,shell32)
|
|
|
|
|
|
|
|
RCINCLUDE = webapprt.rc
|
|
|
|
ifndef GNU_CC
|
|
|
|
RCFLAGS += -I$(srcdir)
|
|
|
|
else
|
|
|
|
RCFLAGS += --include-dir $(srcdir)
|
|
|
|
endif
|
|
|
|
ifdef DEBUG
|
|
|
|
RCFLAGS += -DDEBUG
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Uninstaller
|
|
|
|
ifdef LOCALE_MERGEDIR
|
|
|
|
PPL_LOCALE_ARGS = \
|
2012-05-31 00:13:00 -07:00
|
|
|
--l10n-dir=$(LOCALE_MERGEDIR)/browser/webapp-uninstaller \
|
|
|
|
--l10n-dir=$(call EXPAND_LOCALE_SRCDIR,browser/locales)/webapp-uninstaller \
|
|
|
|
--l10n-dir=$(topsrcdir)/browser/locales/en-US/webapp-uninstaller \
|
2012-04-17 07:11:53 -07:00
|
|
|
$(NULL)
|
|
|
|
else
|
2012-05-31 00:13:00 -07:00
|
|
|
PPL_LOCALE_ARGS=$(call EXPAND_LOCALE_SRCDIR,browser/locales)/webapp-uninstaller
|
2012-04-17 07:11:53 -07:00
|
|
|
endif
|
|
|
|
|
|
|
|
libs::
|
|
|
|
$(RM) -r $(CONFIG_DIR)
|
|
|
|
$(MKDIR) $(CONFIG_DIR)
|
|
|
|
$(PYTHON) $(topsrcdir)/config/Preprocessor.py -Fsubstitution \
|
|
|
|
$(DEFINES) $(ACDEFINES) \
|
|
|
|
$(srcdir)/webapp-uninstaller.nsi.in > $(CONFIG_DIR)/webapp-uninstaller.nsi
|
|
|
|
$(PYTHON) \
|
|
|
|
$(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
|
|
|
|
--create-nlf-file $(topsrcdir) $(AB_CD) $(CONFIG_DIR)
|
|
|
|
$(PYTHON) \
|
|
|
|
$(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
|
|
|
|
--preprocess-single-file $(topsrcdir) $(PPL_LOCALE_ARGS) $(CONFIG_DIR) \
|
|
|
|
webapp-uninstaller.properties webapp-uninstaller-locale.nsh
|
|
|
|
$(MAKE) webapp_uninstaller
|
|
|
|
|
|
|
|
GARBAGE_DIRS += instgen
|
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/makensis.mk
|
|
|
|
|
|
|
|
GRE_BUILDID := $(shell cat $(DEPTH)/config/buildid)
|
|
|
|
DEFINES += -DGRE_BUILDID=$(GRE_BUILDID)
|
|
|
|
|
|
|
|
webapprt.$(OBJ_SUFFIX): $(DEPTH)/config/buildid
|
|
|
|
|
|
|
|
# Control the default heap size.
|
|
|
|
# This is the heap returned by GetProcessHeap().
|
|
|
|
# As we use the CRT heap, the default size is too large and wastes VM.
|
|
|
|
#
|
|
|
|
# The default heap size is 1MB on Win32.
|
|
|
|
# The heap will grow if need be.
|
|
|
|
#
|
|
|
|
# Set it to 256k. See bug 127069.
|
|
|
|
#
|
|
|
|
ifndef GNU_CC
|
|
|
|
LDFLAGS += /HEAP:0x40000
|
|
|
|
ifeq ($(OS_TEST),x86_64)
|
|
|
|
# set stack to 2MB on x64 build. See bug 582910
|
|
|
|
LDFLAGS += -STACK:2097152
|
|
|
|
endif
|
|
|
|
endif
|