Bug 901583: Reapply mozilla patches on top of webrtc.org 3.34, use NEON detection...
[gecko.git] / ipc / app / Makefile.in
blob288caf7bc5668e3acf72a2cc5ef0eba61705abe8
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/.
5 DEPTH = @DEPTH@
6 topsrcdir = @top_srcdir@
7 srcdir = @srcdir@
8 VPATH = @srcdir@
10 include $(DEPTH)/config/autoconf.mk
12 ifneq ($(dir $(PROGRAM)),./)
13 GENERATED_DIRS = $(dir $(PROGRAM))
14 endif
16 ifeq (android,$(MOZ_WIDGET_TOOLKIT))
17 WRAP_LDFLAGS =
18 else
19 LIBS += \
20 $(XPCOM_LIBS) \
21 $(NSPR_LIBS) \
22 $(NULL)
23 endif
25 ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
26 LIBS += \
27 -lbinder \
28 -lutils \
29 $(NULL)
30 endif
32 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
33 LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
35 ifndef MOZ_WINCONSOLE
36 ifdef MOZ_DEBUG
37 MOZ_WINCONSOLE = 1
38 else
39 MOZ_WINCONSOLE = 0
40 endif
41 endif
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.
45 NSDISTMODE = copy
47 include $(topsrcdir)/config/config.mk
49 ifeq (android,$(MOZ_WIDGET_TOOLKIT))
50 FINAL_TARGET = $(DIST)/bin/lib
51 endif
53 ifdef _MSC_VER
54 # Always enter a Windows program through wmain, whether or not we're
55 # a console application.
56 WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
57 endif
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.
76 ifndef GNU_CC #{
77 LDFLAGS += /HEAP:0x40000
78 endif #}
79 endif #}
81 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) #{
83 libs::
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)
92 endif #}