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
81 REQUIRES
+= tracemalloc
84 ifdef MOZ_CRASHREPORTER
85 REQUIRES
+= crashreporter
91 nsINativeAppSupport.idl \
95 ifneq (,$(filter WINCE WINNT
,$(OS_ARCH
)))
96 XPIDLSRCS
+= nsIWinAppHelper.idl
106 nsConsoleWriter.
cpp \
107 nsXREDirProvider.
cpp \
108 nsNativeAppSupportBase.
cpp \
112 DEFINES
+= -DIMPL_XREAPI
114 ifndef BUILD_STATIC_LIBS
115 CPPSRCS
+= nsEmbedFunctions.
cpp
119 CPPSRCS
+= nsUpdateDriver.
cpp
120 DEFINES
+= -DMOZ_UPDATER
123 ifeq ($(MOZ_WIDGET_TOOLKIT
),windows
)
125 CPPSRCS
+= nsNativeAppSupportDefault.
cpp
127 CPPSRCS
+= nsNativeAppSupportWin.
cpp
129 DEFINES
+= -DWIN32_LEAN_AND_MEAN
-DUNICODE
-D_UNICODE
131 ifeq ($(MOZ_WIDGET_TOOLKIT
),cocoa
)
132 CMMSRCS
= nsNativeAppSupportCocoa.mm
134 ifeq ($(MOZ_WIDGET_TOOLKIT
),os2
)
135 CPPSRCS
+= nsNativeAppSupportOS2.
cpp
137 ifeq ($(MOZ_WIDGET_TOOLKIT
),beos
)
138 CPPSRCS
+= nsNativeAppSupportBeOS.
cpp
140 ifeq ($(MOZ_WIDGET_TOOLKIT
),gtk2
)
141 CPPSRCS
+= nsNativeAppSupportUnix.
cpp
143 CPPSRCS
+= nsNativeAppSupportDefault.
cpp
150 ifeq ($(MOZ_WIDGET_TOOLKIT
),cocoa
)
151 CMMSRCS
+= MacLaunchHelper.mm
152 CPPSRCS
+= nsCommandLineServiceMac.
cpp
153 LOCAL_INCLUDES
+= -I
$(topsrcdir
)/xpfe
/bootstrap
/appleevents
154 OS_CXXFLAGS
+= -fexceptions
155 SHARED_LIBRARY_LIBS
+= $(DEPTH
)/xpfe
/bootstrap
/appleevents
/$(LIB_PREFIX
)appleevents_s.
$(LIB_SUFFIX
)
157 ifeq ($(MOZ_WIDGET_TOOLKIT
),cocoa
)
158 CMMSRCS
+= MacApplicationDelegate.mm
161 ifneq (,$(filter-out OS2 WINNT
,$(OS_ARCH
)))
162 CPPSRCS
+= nsSigHandlers.
cpp
165 SHARED_LIBRARY_LIBS
+= ..
/profile
/src
/$(LIB_PREFIX
)profile_s.
$(LIB_SUFFIX
)
167 ifdef MOZ_ENABLE_XREMOTE
168 SHARED_LIBRARY_LIBS
+= $(DEPTH
)/widget
/src
/xremoteclient
/$(LIB_PREFIX
)xremote_client_s.
$(LIB_SUFFIX
)
169 LOCAL_INCLUDES
+= -I
$(topsrcdir
)/widget
/src
/xremoteclient
172 ifdef MOZ_CRASHREPORTER
173 SHARED_LIBRARY_LIBS
+= $(DEPTH
)/toolkit
/crashreporter
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
)
174 ifeq ($(OS_ARCH
),WINNT
)
175 SHARED_LIBRARY_LIBS
+= \
176 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/windows
/handler
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
) \
177 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/windows
/crash_generation
/$(LIB_PREFIX
)crash_generation_s.
$(LIB_SUFFIX
) \
178 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/windows
/$(LIB_PREFIX
)breakpad_windows_common_s.
$(LIB_SUFFIX
)
181 ifeq ($(OS_ARCH
),Darwin
)
182 SHARED_LIBRARY_LIBS
+= \
183 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/$(LIB_PREFIX
)minidump_file_writer_s.
$(LIB_SUFFIX
) \
184 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/mac
/handler
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
) \
185 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/$(LIB_PREFIX
)breakpad_common_s.
$(LIB_SUFFIX
) \
186 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/mac
/$(LIB_PREFIX
)breakpad_mac_common_s.
$(LIB_SUFFIX
)
189 ifeq ($(OS_ARCH
),Linux
)
190 SHARED_LIBRARY_LIBS
+= \
191 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/linux
/handler
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
) \
192 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/$(LIB_PREFIX
)minidump_file_writer_s.
$(LIB_SUFFIX
) \
193 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/$(LIB_PREFIX
)breakpad_common_s.
$(LIB_SUFFIX
) \
194 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/linux
/$(LIB_PREFIX
)breakpad_linux_common_s.
$(LIB_SUFFIX
) \
198 ifeq ($(OS_ARCH
),SunOS
)
199 SHARED_LIBRARY_LIBS
+= \
200 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/solaris
/handler
/$(LIB_PREFIX
)exception_handler_s.
$(LIB_SUFFIX
) \
201 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/client
/$(LIB_PREFIX
)minidump_file_writer_s.
$(LIB_SUFFIX
) \
202 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/$(LIB_PREFIX
)breakpad_common_s.
$(LIB_SUFFIX
) \
203 $(DEPTH
)/toolkit
/crashreporter
/google-breakpad
/src
/common
/solaris
/$(LIB_PREFIX
)breakpad_solaris_common_s.
$(LIB_SUFFIX
) \
212 include $(topsrcdir
)/config
/rules.mk
214 ifdef BUILD_STATIC_LIBS
216 @
$(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/build-list.pl
$(FINAL_LINK_COMP_NAMES
) Apprunner
217 # embedding/browser/gtk/src/Makefile.in sucks! we need to add an empty line to
218 # FINAL_LINK_COMPS to keep the two lists in sync :-(
219 @
$(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/build-list.pl
$(FINAL_LINK_COMPS
) ""
224 -I
$(srcdir)/..
/profile
/src \
225 -I
$(topsrcdir
)/config \
228 CXXFLAGS
+= $(TK_CFLAGS
) $(MOZ_DBUS_GLIB_CFLAGS
)
230 ifeq ($(MOZ_WIDGET_TOOLKIT
),gtk2
)
231 CXXFLAGS
+= $(MOZ_PANGO_CFLAGS
)
234 ifdef BUILD_STATIC_LIBS
235 DEFINES
+= -D_BUILD_STATIC_BIN
238 DEFINES
+= -DOS_TARGET
=\"$(OS_TARGET
)\"
239 ifdef TARGET_XPCOM_ABI
241 -DTARGET_XPCOM_ABI
=\"$(TARGET_XPCOM_ABI
)\" \
242 -DTARGET_OS_ABI
=\"$(OS_TARGET
)_
$(TARGET_XPCOM_ABI
)\" \
246 DEFINES
+= -DTOOLKIT_EM_VERSION
=\"$(shell $(PERL
) $(topsrcdir
)/config
/milestone.pl
--topsrcdir
=$(topsrcdir
))\"
248 ifdef WRAP_SYSTEM_INCLUDES
249 DEFINES
+= -DWRAP_SYSTEM_INCLUDES
252 ifeq ($(OS_ARCH
),Linux
)
253 ifneq (,$(findstring lib64
,$(libdir)))
254 DEFINES
+= -DHAVE_USR_LIB64_DIR
259 $(PYTHON
) $(srcdir)/make-platformini.py
--buildid
=$(shell cat
$(DEPTH
)/config
/buildid
) $(topsrcdir
)/config
/milestone.txt
> $@
261 GARBAGE
+= platform.ini
264 $(INSTALL
) $^
$(DIST
)/bin
267 $(INSTALL
) $(IFLAGS1
) $^
$(DESTDIR
)$(mozappdir
)