1
# This Source Code Form is subject to the terms of the Mozilla Public
2
# License, v. 2.0. If a copy of the MPL was not distributed with this
3
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
topsrcdir = @top_srcdir@
10
include $(DEPTH)/config/autoconf.mk
14
include $(topsrcdir)/ipc/app/defs.mk
15
PROGRAM = $(MOZ_CHILD_PROCESS_NAME)
17
ifneq ($(dir $(PROGRAM)),./)
18
GENERATED_DIRS = $(dir $(PROGRAM))
22
MozillaRuntimeMain.cpp \
25
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
27
CPPSRCS = MozillaRuntimeMainAndroid.cpp
35
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
36
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
46
# This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
47
# shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
50
include $(topsrcdir)/config/config.mk
51
include $(topsrcdir)/ipc/chromium/chromium-config.mk
53
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
54
FINAL_TARGET = $(DIST)/bin/lib
58
# Always enter a Windows program through wmain, whether or not we're
59
# a console application.
60
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
63
include $(topsrcdir)/config/rules.mk
65
LDFLAGS += $(MOZ_ALLOW_HEAP_EXECUTE_FLAGS)
67
ifeq ($(OS_ARCH),WINNT) #{
69
# Control the default heap size.
70
# This is the heap returned by GetProcessHeap().
71
# As we use the CRT heap, the default size is too large and wastes VM.
73
# The default heap size is 1MB on Win32.
74
# The heap will grow if need be.
76
# Set it to 256k. See bug 127069.
79
LDFLAGS += /HEAP:0x40000
80
ifeq ($(OS_TEST),x86_64) #{
81
# set stack to 2MB on x64 build. See bug 582910
82
LDFLAGS += -STACK:2097152
87
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) #{
90
$(NSINSTALL) -D $(DIST)/bin/$(PROGRAM).app
91
rsync -a -C --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/bin/$(PROGRAM).app
92
sed -e "s/%PROGRAM%/$(PROGRAM)/" $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/bin/$(PROGRAM).app/Contents/Info.plist
93
sed -e "s/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/" $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | \
94
iconv -f UTF-8 -t UTF-16 > $(DIST)/bin/$(PROGRAM).app/Contents/Resources/English.lproj/InfoPlist.strings
95
$(NSINSTALL) -D $(DIST)/bin/$(PROGRAM).app/Contents/MacOS
96
$(NSINSTALL) $(PROGRAM) $(DIST)/bin/$(PROGRAM).app/Contents/MacOS
97
$(RM) $(DIST)/bin/$(PROGRAM)