Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / toolkit / xre / Makefile.in
blob161672be0a9fb6ffd1c07b097e063175e7f50b93
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
12 # License.
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.
21 # Contributor(s):
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 *****
39 DEPTH = ../..
40 topsrcdir = @top_srcdir@
41 srcdir = @srcdir@
42 VPATH = @srcdir@
44 include $(DEPTH)/config/autoconf.mk
46 MODULE = xulapp
47 LIBRARY_NAME = xulapp_s
48 LIBXUL_LIBRARY = 1
50 REQUIRES = \
51 appcomps \
52 toolkitcomps \
53 appshell \
54 chrome \
55 content \
56 docshell \
57 dom \
58 embed_base \
59 embedcomponents \
60 extensions \
61 gfx \
62 intl \
63 js \
64 necko \
65 pref \
66 profile \
67 string \
68 uriloader \
69 widget \
70 windowwatcher \
71 xpcom \
72 xpconnect \
73 xpinstall \
74 $(NULL)
76 ifdef MOZ_JPROF
77 REQUIRES += jprof
78 endif
80 ifdef NS_TRACE_MALLOC
81 REQUIRES += tracemalloc
82 endif
84 ifdef MOZ_CRASHREPORTER
85 REQUIRES += crashreporter
86 endif
88 FORCE_STATIC_LIB = 1
90 XPIDLSRCS = \
91 nsINativeAppSupport.idl \
92 nsIXULRuntime.idl \
93 $(NULL)
95 ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
96 XPIDLSRCS += nsIWinAppHelper.idl
97 endif
99 EXPORTS = \
100 xrecore.h \
101 nsXULAppAPI.h \
102 $(NULL)
104 CPPSRCS = \
105 nsAppRunner.cpp \
106 nsConsoleWriter.cpp \
107 nsXREDirProvider.cpp \
108 nsNativeAppSupportBase.cpp \
109 nsAppData.cpp \
110 $(NULL)
112 DEFINES += -DIMPL_XREAPI
114 ifndef BUILD_STATIC_LIBS
115 CPPSRCS += nsEmbedFunctions.cpp
116 endif
118 ifdef MOZ_UPDATER
119 CPPSRCS += nsUpdateDriver.cpp
120 DEFINES += -DMOZ_UPDATER
121 endif
123 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
124 ifdef WINCE
125 CPPSRCS += nsNativeAppSupportDefault.cpp
126 else
127 CPPSRCS += nsNativeAppSupportWin.cpp
128 endif
129 DEFINES += -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE
130 else
131 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
132 CMMSRCS = nsNativeAppSupportCocoa.mm
133 else
134 ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
135 CPPSRCS += nsNativeAppSupportOS2.cpp
136 else
137 ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
138 CPPSRCS += nsNativeAppSupportBeOS.cpp
139 else
140 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
141 CPPSRCS += nsNativeAppSupportUnix.cpp
142 else
143 CPPSRCS += nsNativeAppSupportDefault.cpp
144 endif
145 endif
146 endif
147 endif
148 endif
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)
156 endif
157 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
158 CMMSRCS += MacApplicationDelegate.mm
159 endif
161 ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
162 CPPSRCS += nsSigHandlers.cpp
163 endif
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
170 endif
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)
179 endif
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)
187 endif
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) \
195 $(NULL)
196 endif
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) \
204 $(NULL)
205 endif
206 endif
208 ifdef ENABLE_TESTS
209 DIRS += test
210 endif
212 include $(topsrcdir)/config/rules.mk
214 ifdef BUILD_STATIC_LIBS
215 export::
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) ""
220 endif
222 LOCAL_INCLUDES += \
223 -I$(srcdir) \
224 -I$(srcdir)/../profile/src \
225 -I$(topsrcdir)/config \
226 $(NULL)
228 CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
230 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
231 CXXFLAGS += $(MOZ_PANGO_CFLAGS)
232 endif
234 ifdef BUILD_STATIC_LIBS
235 DEFINES += -D_BUILD_STATIC_BIN
236 endif
238 DEFINES += -DOS_TARGET=\"$(OS_TARGET)\"
239 ifdef TARGET_XPCOM_ABI
240 DEFINES += \
241 -DTARGET_XPCOM_ABI=\"$(TARGET_XPCOM_ABI)\" \
242 -DTARGET_OS_ABI=\"$(OS_TARGET)_$(TARGET_XPCOM_ABI)\" \
243 $(NULL)
244 endif
246 DEFINES += -DTOOLKIT_EM_VERSION=\"$(shell $(PERL) $(topsrcdir)/config/milestone.pl --topsrcdir=$(topsrcdir))\"
248 ifdef WRAP_SYSTEM_INCLUDES
249 DEFINES += -DWRAP_SYSTEM_INCLUDES
250 endif
252 ifeq ($(OS_ARCH),Linux)
253 ifneq (,$(findstring lib64,$(libdir)))
254 DEFINES += -DHAVE_USR_LIB64_DIR
255 endif
256 endif
258 platform.ini: FORCE
259 $(PYTHON) $(srcdir)/make-platformini.py --buildid=$(shell cat $(DEPTH)/config/buildid) $(topsrcdir)/config/milestone.txt > $@
261 GARBAGE += platform.ini
263 libs:: platform.ini
264 $(INSTALL) $^ $(DIST)/bin
266 install::
267 $(INSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)