1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
14 # The Original Code is mozilla.org code.
16 # The Initial Developer of the Original Code is
17 # Netscape Communications.
18 # Portions created by the Initial Developer are Copyright (C) 2001
19 # the Initial Developer. All Rights Reserved.
22 # Brian Ryner <bryner@brianryner.com>
23 # Benjamin Smedberg <benjamin@smedbergs.us>
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
37 # ***** END LICENSE BLOCK *****
40 topsrcdir
= @top_srcdir@
44 include $(DEPTH
)/config
/autoconf.mk
47 LIBRARY_NAME
= xulapp_s
53 nsINativeAppSupport.idl \
56 ifneq (,$(filter WINCE WINNT
,$(OS_ARCH
)))
57 XPIDLSRCS
+= nsIWinAppHelper.idl
63 nsXREDirProvider.
cpp \
64 nsNativeAppSupportBase.
cpp \
69 ifdef MOZ_SPLASHSCREEN
70 ifeq ($(OS_ARCH
),WINCE
)
71 CPPSRCS
+= nsSplashScreenWin.
cpp
73 CPPSRCS
+= nsSplashScreenDummy.
cpp
77 DEFINES
+= -DIMPL_XREAPI
-DMOZ_APP_NAME
='"$(MOZ_APP_NAME)"'
79 ifndef BUILD_STATIC_LIBS
80 CPPSRCS
+= nsEmbedFunctions.
cpp
84 CPPSRCS
+= nsUpdateDriver.
cpp
85 DEFINES
+= -DMOZ_UPDATER
88 ifeq ($(MOZ_WIDGET_TOOLKIT
),windows
)
89 CPPSRCS
+= nsNativeAppSupportWin.
cpp
90 DEFINES
+= -DWIN32_LEAN_AND_MEAN
-DUNICODE
-D_UNICODE
91 EXPORTS
= nsWindowsDllInterceptor.h
93 ifeq ($(MOZ_WIDGET_TOOLKIT
),cocoa
)
94 CMMSRCS
= nsNativeAppSupportCocoa.mm
96 ifeq ($(MOZ_WIDGET_TOOLKIT
),os2
)
97 CPPSRCS
+= nsNativeAppSupportOS2.
cpp
99 ifeq ($(MOZ_WIDGET_TOOLKIT
),beos
)
100 CPPSRCS
+= nsNativeAppSupportBeOS.
cpp
102 ifeq ($(MOZ_WIDGET_TOOLKIT
),gtk2
)
103 CPPSRCS
+= nsNativeAppSupportUnix.
cpp
105 ifeq ($(MOZ_WIDGET_TOOLKIT
),qt
)
106 CPPSRCS
+= nsNativeAppSupportQt.
cpp
107 CPPSRCS
+= nsQAppInstance.
cpp
108 EXPORTS
+= nsQAppInstance.h
109 ifdef MOZ_ENABLE_MEEGOTOUCH
110 MOCSRCS
+= moc_MozMeegoAppService.
cpp
111 CPPSRCS
+= moc_MozMeegoAppService.
cpp
114 CPPSRCS
+= nsNativeAppSupportDefault.
cpp
122 ifeq ($(MOZ_WIDGET_TOOLKIT
),cocoa
)
123 CMMSRCS
+= MacLaunchHelper.mm
124 CMMSRCS
+= MacApplicationDelegate.mm
125 CMMSRCS
+= MacAutoreleasePool.mm
126 CPPSRCS
+= nsCommandLineServiceMac.
cpp
127 OS_CXXFLAGS
+= -fexceptions
131 CPPSRCS
+= nsX11ErrorHandler.
cpp
134 ifeq ($(OS_TARGET
),Android
)
135 CPPSRCS
+= nsAndroidStartup.
cpp
138 SHARED_LIBRARY_LIBS
+= ..
/profile
/src
/$(LIB_PREFIX
)profile_s.
$(LIB_SUFFIX
)
140 ifdef MOZ_ENABLE_XREMOTE
141 SHARED_LIBRARY_LIBS
+= $(DEPTH
)/widget
/src
/xremoteclient
/$(LIB_PREFIX
)xremote_client_s.
$(LIB_SUFFIX
)
142 LOCAL_INCLUDES
+= -I
$(topsrcdir
)/widget
/src
/xremoteclient
145 ifdef MOZ_CRASHREPORTER
146 SHARED_LIBRARY_LIBS
+= $(DEPTH
)/toolkit
/crashreporter
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
)
147 ifeq ($(OS_ARCH
),WINNT
)
148 SHARED_LIBRARY_LIBS
+= \
149 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/windows
/handler
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
) \
150 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/windows
/crash_generation
/$(LIB_PREFIX
)crash_generation_s.
$(LIB_SUFFIX
) \
151 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/windows
/$(LIB_PREFIX
)breakpad_windows_common_s.
$(LIB_SUFFIX
)
154 ifeq ($(OS_ARCH
),Darwin
)
155 SHARED_LIBRARY_LIBS
+= \
156 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/$(LIB_PREFIX
)minidump_file_writer_s.
$(LIB_SUFFIX
) \
157 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/mac
/crash_generation
/$(LIB_PREFIX
)crash_generation_s.
$(LIB_SUFFIX
) \
158 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/mac
/handler
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
) \
159 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/$(LIB_PREFIX
)breakpad_common_s.
$(LIB_SUFFIX
) \
160 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/mac
/$(LIB_PREFIX
)breakpad_mac_common_s.
$(LIB_SUFFIX
)
163 ifeq ($(OS_ARCH
),Linux
)
164 SHARED_LIBRARY_LIBS
+= \
165 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/linux
/crash_generation
/$(LIB_PREFIX
)crash_generation_s.
$(LIB_SUFFIX
) \
166 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/linux
/handler
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
) \
167 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/linux
/minidump_writer
/$(LIB_PREFIX
)minidump_writer_s.
$(LIB_SUFFIX
) \
168 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/$(LIB_PREFIX
)minidump_file_writer_s.
$(LIB_SUFFIX
) \
169 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/$(LIB_PREFIX
)breakpad_common_s.
$(LIB_SUFFIX
) \
170 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/linux
/$(LIB_PREFIX
)breakpad_linux_common_s.
$(LIB_SUFFIX
) \
174 ifeq ($(OS_ARCH
),SunOS
)
175 SHARED_LIBRARY_LIBS
+= \
176 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/solaris
/handler
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
) \
177 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/$(LIB_PREFIX
)minidump_file_writer_s.
$(LIB_SUFFIX
) \
178 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/$(LIB_PREFIX
)breakpad_common_s.
$(LIB_SUFFIX
) \
179 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/solaris
/$(LIB_PREFIX
)breakpad_solaris_common_s.
$(LIB_SUFFIX
) \
188 include $(topsrcdir
)/config
/config.mk
189 include $(topsrcdir
)/ipc
/chromium
/chromium-config.mk
190 include $(topsrcdir
)/config
/rules.mk
193 -I
$(topsrcdir
)/dom
/ipc \
194 -I
$(topsrcdir
)/toolkit
/crashreporter \
197 ifdef BUILD_STATIC_LIBS
199 @
$(PYTHON
) $(MOZILLA_DIR
)/config
/buildlist.py
$(FINAL_LINK_COMP_NAMES
) Apprunner
204 -I
$(srcdir)/..
/profile
/src \
205 -I
$(topsrcdir
)/config \
208 CXXFLAGS
+= $(TK_CFLAGS
) $(MOZ_DBUS_CFLAGS
) $(MOZ_DBUS_GLIB_CFLAGS
)
210 ifeq ($(MOZ_WIDGET_TOOLKIT
),gtk2
)
211 CXXFLAGS
+= $(MOZ_PANGO_CFLAGS
)
214 ifdef BUILD_STATIC_LIBS
215 DEFINES
+= -D_BUILD_STATIC_BIN
219 -DOS_TARGET
=\"$(OS_TARGET
)\" \
220 -DMOZ_WIDGET_TOOLKIT
=\"$(MOZ_WIDGET_TOOLKIT
)\"
222 ifdef TARGET_XPCOM_ABI
224 -DTARGET_XPCOM_ABI
=\"$(TARGET_XPCOM_ABI
)\" \
225 -DTARGET_OS_ABI
=\"$(OS_TARGET
)_
$(TARGET_XPCOM_ABI
)\" \
229 DEFINES
+= -DTOOLKIT_EM_VERSION
=\"$(shell $(PERL
) $(topsrcdir
)/config
/milestone.pl
--topsrcdir
=$(topsrcdir
))\"
231 ifdef WRAP_SYSTEM_INCLUDES
232 DEFINES
+= -DWRAP_SYSTEM_INCLUDES
235 ifeq ($(OS_ARCH
),Linux
)
236 ifneq (,$(findstring lib64
,$(libdir)))
237 DEFINES
+= -DHAVE_USR_LIB64_DIR
241 MOZ_SOURCE_STAMP ?
= $(firstword $(shell hg
-R
$(topsrcdir
) parent
--template
="{node|short}\n" 2>/dev
/null
))
242 # strip a trailing slash from the repo URL because it's not always present,
243 # and we want to construct a working URL in buildconfig.html
244 # make+shell+sed = awful
246 SOURCE_REPO
:= $(shell cd
$(topsrcdir
) && hg showconfig paths.default
2>/dev
/null | head
-n1 | sed
-e
"s/^ssh:/http:/" -e
"s/\/$(_dollar)//" )
248 ifdef MOZ_SOURCE_STAMP
249 INIARGS
= --sourcestamp
=$(MOZ_SOURCE_STAMP
)
250 # extra sanity check for old versions of hg
251 # that don't support showconfig
252 ifeq (http
,$(patsubst http
%,http
,$(SOURCE_REPO
)))
253 INIARGS
+= --sourcerepo
=$(SOURCE_REPO
)
257 # Solaris /usr/bin/diff doesn't have -n option
258 GRE_MILESTONE
:= $(shell tail
-n
1 $(topsrcdir
)/config
/milestone.txt
2>/dev
/null || tail
-1 $(topsrcdir
)/config
/milestone.txt
)
259 GRE_BUILDID
:= $(shell cat
$(DEPTH
)/config
/buildid
)
261 DEFINES
+= -DGRE_MILESTONE
=$(GRE_MILESTONE
) -DGRE_BUILDID
=$(GRE_BUILDID
)
263 $(srcdir)/nsAppRunner.
cpp: $(DEPTH
)/config
/buildid
$(topsrcdir
)/config
/milestone.txt
266 $(PYTHON
) $(srcdir)/make-platformini.py
--buildid
=$(shell cat
$(DEPTH
)/config
/buildid
) $(INIARGS
) $(topsrcdir
)/config
/milestone.txt
> $@
268 GARBAGE
+= platform.ini
271 $(INSTALL
) $^
$(DIST
)/bin
274 $(INSTALL
) $(IFLAGS1
) $^
$(DESTDIR
)$(mozappdir
)