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
12 ifneq ($(dir $(PROGRAM
)),.
/)
13 GENERATED_DIRS
= $(dir $(PROGRAM
))
16 ifeq (android
,$(MOZ_WIDGET_TOOLKIT
))
25 ifeq (gonk
,$(MOZ_WIDGET_TOOLKIT
))
32 LOCAL_INCLUDES
+= -I
$(topsrcdir
)/toolkit
/xre
33 LOCAL_INCLUDES
+= -I
$(topsrcdir
)/xpcom
/base
43 # This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
44 # shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
47 include $(topsrcdir
)/config
/config.mk
49 ifeq (android
,$(MOZ_WIDGET_TOOLKIT
))
50 FINAL_TARGET
= $(DIST
)/bin
/lib
54 # Always enter a Windows program through wmain, whether or not we're
55 # a console application.
56 WIN32_EXE_LDFLAGS
+= -ENTRY
:wmainCRTStartup
59 include $(topsrcdir
)/config
/rules.mk
60 include $(topsrcdir
)/ipc
/chromium
/chromium-config.mk
62 LDFLAGS
+= $(MOZ_ALLOW_HEAP_EXECUTE_FLAGS
)
64 ifeq ($(OS_ARCH
),WINNT
) #{
65 EXTRA_DEPS
+= $(PROGRAM
).manifest
67 # Control the default heap size.
68 # This is the heap returned by GetProcessHeap().
69 # As we use the CRT heap, the default size is too large and wastes VM.
71 # The default heap size is 1MB on Win32.
72 # The heap will grow if need be.
74 # Set it to 256k. See bug 127069.
77 LDFLAGS
+= /HEAP
:0x40000
81 ifeq (cocoa
,$(MOZ_WIDGET_TOOLKIT
)) #{
84 $(NSINSTALL
) -D
$(DIST
)/bin
/$(PROGRAM
).app
85 rsync
-a
-C
--exclude
"*.in" $(srcdir)/macbuild
/Contents
$(DIST
)/bin
/$(PROGRAM
).app
86 sed
-e
"s/%PROGRAM%/$(PROGRAM)/" $(srcdir)/macbuild
/Contents
/Info.plist.in
> $(DIST
)/bin
/$(PROGRAM
).app
/Contents
/Info.plist
87 sed
-e
"s/%APP_NAME%/$(MOZ_APP_DISPLAYNAME)/" $(srcdir)/macbuild
/Contents
/Resources
/English.lproj
/InfoPlist.strings.in | \
88 iconv
-f UTF-8
-t UTF-16
> $(DIST
)/bin
/$(PROGRAM
).app
/Contents
/Resources
/English.lproj
/InfoPlist.strings
89 $(NSINSTALL
) -D
$(DIST
)/bin
/$(PROGRAM
).app
/Contents
/MacOS
90 $(NSINSTALL
) $(PROGRAM
) $(DIST
)/bin
/$(PROGRAM
).app
/Contents
/MacOS
91 $(RM
) $(DIST
)/bin
/$(PROGRAM
)