2 # vim:set ts=8 sw=8 sts=8 noet:
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 topsrcdir
= @top_srcdir@
13 include $(DEPTH
)/config
/autoconf.mk
15 milestone_txt
= $(topsrcdir
)/config
/milestone.txt
18 LIBRARY_NAME
= xulapp_s
24 nsINativeAppSupport.idl \
27 ifeq ($(OS_ARCH
),WINNT
)
28 XPIDLSRCS
+= nsIWinAppHelper.idl
34 nsXREDirProvider.
cpp \
35 nsNativeAppSupportBase.
cpp \
38 nsEmbedFunctions.
cpp \
42 ifeq ($(MOZ_GL_DEFAULT_PROVIDER
),GLX
)
43 DEFINES
+= -DUSE_GLX_TEST
44 CPPSRCS
+= glxtest.
cpp
47 ifdef MOZ_INSTRUMENT_EVENT_LOOP
48 CPPSRCS
+= EventTracer.
cpp
49 EXPORTS
+= EventTracer.h
52 DEFINES
+= -DIMPL_XREAPI \
53 -DMOZ_APP_NAME
='"$(MOZ_APP_NAME)"' \
54 -DMOZ_APP_VERSION
='"$(MOZ_APP_VERSION)"'
57 ifneq (android
,$(MOZ_WIDGET_TOOLKIT
))
58 CPPSRCS
+= nsUpdateDriver.
cpp
59 DEFINES
+= -DMOZ_UPDATER
63 ifeq ($(MOZ_WIDGET_TOOLKIT
),windows
)
64 CPPSRCS
+= nsNativeAppSupportWin.
cpp
65 CPPSRCS
+= nsWindowsDllBlocklist.
cpp
66 DEFINES
+= -DWIN32_LEAN_AND_MEAN
-DUNICODE
-D_UNICODE
67 EXPORTS
+= nsWindowsDllInterceptor.h
69 ifeq ($(MOZ_WIDGET_TOOLKIT
),cocoa
)
70 CMMSRCS
= nsNativeAppSupportCocoa.mm
71 EXPORTS
+= MacQuirks.h
73 ifeq ($(MOZ_WIDGET_TOOLKIT
),os2
)
74 CPPSRCS
+= nsNativeAppSupportOS2.
cpp
76 ifeq ($(MOZ_WIDGET_TOOLKIT
),gtk2
)
77 CPPSRCS
+= nsNativeAppSupportUnix.
cpp
79 ifeq ($(MOZ_WIDGET_TOOLKIT
),qt
)
80 MOCSRCS
+= moc_nsNativeAppSupportQt.
cpp
82 CPPSRCS
+= nsNativeAppSupportQt.
cpp
83 CPPSRCS
+= nsQAppInstance.
cpp
84 EXPORTS
+= nsQAppInstance.h
86 CPPSRCS
+= nsNativeAppSupportDefault.
cpp
93 ifeq ($(MOZ_WIDGET_TOOLKIT
),cocoa
)
94 CMMSRCS
+= MacLaunchHelper.mm
95 CMMSRCS
+= MacApplicationDelegate.mm
96 CMMSRCS
+= MacAutoreleasePool.mm
97 CPPSRCS
+= nsCommandLineServiceMac.
cpp
98 ENABLE_CXX_EXCEPTIONS
= 1
102 CPPSRCS
+= nsX11ErrorHandler.
cpp
105 ifeq ($(MOZ_WIDGET_TOOLKIT
),android
)
106 CPPSRCS
+= nsAndroidStartup.
cpp
107 DEFINES
+= -DANDROID_PACKAGE_NAME
='"$(ANDROID_PACKAGE_NAME)"'
110 SHARED_LIBRARY_LIBS
+= \
111 ..
/profile
/$(LIB_PREFIX
)profile_s.
$(LIB_SUFFIX
) \
115 ifneq (android
,$(MOZ_WIDGET_TOOLKIT
))
116 SHARED_LIBRARY_LIBS
+= \
117 ..
/mozapps
/update
/common
/$(LIB_PREFIX
)updatecommon.
$(LIB_SUFFIX
) \
122 ifdef MOZ_ENABLE_XREMOTE
123 SHARED_LIBRARY_LIBS
+= $(DEPTH
)/widget
/xremoteclient
/$(LIB_PREFIX
)xremote_client_s.
$(LIB_SUFFIX
)
124 LOCAL_INCLUDES
+= -I
$(topsrcdir
)/widget
/xremoteclient
127 ifdef MOZ_CRASHREPORTER
128 SHARED_LIBRARY_LIBS
+= $(DEPTH
)/toolkit
/crashreporter
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
)
129 ifeq ($(OS_ARCH
),WINNT
)
130 SHARED_LIBRARY_LIBS
+= \
131 $(DEPTH
)/toolkit
/crashreporter
/breakpad-windows-libxul
/$(LIB_PREFIX
)google_breakpad_libxul_s.
$(LIB_SUFFIX
)
134 ifeq ($(OS_ARCH
),Darwin
)
135 SHARED_LIBRARY_LIBS
+= \
136 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/$(LIB_PREFIX
)minidump_file_writer_s.
$(LIB_SUFFIX
) \
137 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/mac
/crash_generation
/$(LIB_PREFIX
)crash_generation_s.
$(LIB_SUFFIX
) \
138 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/mac
/handler
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
) \
139 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/$(LIB_PREFIX
)breakpad_common_s.
$(LIB_SUFFIX
) \
140 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/mac
/$(LIB_PREFIX
)breakpad_mac_common_s.
$(LIB_SUFFIX
)
143 ifeq ($(OS_ARCH
),Linux
)
144 SHARED_LIBRARY_LIBS
+= \
145 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/linux
/crash_generation
/$(LIB_PREFIX
)crash_generation_s.
$(LIB_SUFFIX
) \
146 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/linux
/handler
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
) \
147 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/linux
/minidump_writer
/$(LIB_PREFIX
)minidump_writer_s.
$(LIB_SUFFIX
) \
148 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/$(LIB_PREFIX
)minidump_file_writer_s.
$(LIB_SUFFIX
) \
149 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/$(LIB_PREFIX
)breakpad_common_s.
$(LIB_SUFFIX
) \
150 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/linux
/$(LIB_PREFIX
)breakpad_linux_common_s.
$(LIB_SUFFIX
) \
154 ifeq ($(OS_ARCH
),SunOS
)
155 SHARED_LIBRARY_LIBS
+= \
156 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/solaris
/handler
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
) \
157 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/$(LIB_PREFIX
)minidump_file_writer_s.
$(LIB_SUFFIX
) \
158 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/$(LIB_PREFIX
)breakpad_common_s.
$(LIB_SUFFIX
) \
159 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/solaris
/$(LIB_PREFIX
)breakpad_solaris_common_s.
$(LIB_SUFFIX
) \
166 include $(topsrcdir
)/config
/config.mk
167 include $(topsrcdir
)/ipc
/chromium
/chromium-config.mk
168 include $(topsrcdir
)/config
/rules.mk
171 -I
$(srcdir)/..
/profile \
172 -I
$(topsrcdir
)/dom
/ipc \
173 -I
$(topsrcdir
)/toolkit
/crashreporter \
174 -I
$(topsrcdir
)/dom
/base \
175 -I
$(topsrcdir
)/xpcom
/build \
176 -I
$(topsrcdir
)/config \
179 CXXFLAGS
+= $(TK_CFLAGS
) $(MOZ_DBUS_CFLAGS
) $(MOZ_DBUS_GLIB_CFLAGS
)
181 ifeq ($(MOZ_WIDGET_TOOLKIT
),gtk2
)
182 CXXFLAGS
+= $(MOZ_PANGO_CFLAGS
)
186 -DOS_TARGET
=\"$(OS_TARGET
)\" \
187 -DMOZ_WIDGET_TOOLKIT
=\"$(MOZ_WIDGET_TOOLKIT
)\"
189 ifdef TARGET_XPCOM_ABI
191 -DTARGET_XPCOM_ABI
=\"$(TARGET_XPCOM_ABI
)\" \
192 -DTARGET_OS_ABI
=\"$(OS_TARGET
)_
$(TARGET_XPCOM_ABI
)\" \
196 # Should version be optional or required ?
197 TOOLKIT_EM_VERSION
=$(shell $(PERL
) $(topsrcdir
)/config
/milestone.pl
--topsrcdir
=$(topsrcdir
))
198 $(call warnIfEmpty
,TOOLKIT_EM_VERSION
)
200 # Valid if null: {warn,error}IfEmpty
201 DEFINES
+= -DTOOLKIT_EM_VERSION
=\"$(TOOLKIT_EM_VERSION
)\"
203 ifdef WRAP_SYSTEM_INCLUDES
204 DEFINES
+= -DWRAP_SYSTEM_INCLUDES
207 ifeq ($(OS_ARCH
),Linux
)
208 ifneq (,$(findstring lib64
,$(libdir)))
209 DEFINES
+= -DHAVE_USR_LIB64_DIR
213 MOZ_SOURCE_STAMP ?
= $(firstword $(shell hg
-R
$(topsrcdir
) parent
--template
="{node|short}\n" 2>/dev
/null
))
214 ifdef MOZ_SOURCE_STAMP
216 INIARGS
= --sourcestamp
=$(MOZ_SOURCE_STAMP
)
218 # strip a trailing slash from the repo URL because it's not always present,
219 # and we want to construct a working URL in buildconfig.html
220 SOURCE_REPO
:= $(firstword $(shell hg
--repository
$(topsrcdir
) showconfig paths.default
2>/dev
/null
))
221 SOURCE_REPO
:= $(strip $(SOURCE_REPO
))
222 SOURCE_REPO
:= $(patsubst ssh
://%,http
://%,$(SOURCE_REPO
))
223 SOURCE_REPO
:= $(patsubst %/,%,$(SOURCE_REPO
))
225 # command set should change based on revision control use.
226 # warn for now in case (git, bzr, ...) is in use.
227 $(call warnIfEmpty
,SOURCE_REPO
)
229 # extra sanity check for old versions of hg, no showconfig support
230 ifeq (http
,$(patsubst http
%,http
,$(SOURCE_REPO
)))
231 INIARGS
+= --sourcerepo
=$(SOURCE_REPO
)
234 endif # MOZ_SOURCE_STAMP
236 GRE_MILESTONE
:= $(strip $(lastword
$(shell cat
$(milestone_txt
) 2>/dev
/null
)))
237 GRE_BUILDID
:= $(strip $(firstword $(shell cat
$(DEPTH
)/config
/buildid
2>/dev
/null
)))
238 $(call errorIfEmpty
,GRE_MILESTONE GRE_BUILDID
)
240 DEFINES
+= -DGRE_MILESTONE
=$(GRE_MILESTONE
) -DGRE_BUILDID
=$(GRE_BUILDID
)
242 ifdef MOZILLA_OFFICIAL
243 DEFINES
+= -DMOZILLA_OFFICIAL
246 DEFINES
+= -DAPP_VERSION
=$(MOZ_APP_VERSION
)
248 DEFINES
+= -DAPP_ID
=$(MOZ_APP_ID
)
250 $(srcdir)/nsAppRunner.
cpp: $(DEPTH
)/config
/buildid
$(milestone_txt
)
253 $(PYTHON
) $(srcdir)/make-platformini.py
--buildid
=$(GRE_BUILDID
) $(INIARGS
) $(milestone_txt
) > $@
255 GARBAGE
+= platform.ini
258 $(INSTALL
) $^
$(DIST
)/bin
261 $(INSTALL
) $(IFLAGS1
) $^
$(DESTDIR
)$(mozappdir
)