Bug 628949 - Update visible region / glass regions after we paint. r=roc a=2.0.
[mozilla-central.git] / toolkit / library / libxul-config.mk
blob39a67e5353029971617d2ff77bfcb48606c0df2e
2 # ***** BEGIN LICENSE BLOCK *****
3 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
8 # http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
13 # License.
15 # The Original Code is Mozilla libxul
17 # The Initial Developer of the Original Code is
18 # Benjamin Smedberg <benjamin@smedbergs.us>
20 # Portions created by the Initial Developer are Copyright (C) 2005
21 # the Initial Developer. All Rights Reserved.
23 # Contributor(s):
24 # Shawn Wilsher <me@shawnwilsher.com>
26 # Alternatively, the contents of this file may be used under the terms of
27 # either of the GNU General Public License Version 2 or later (the "GPL"),
28 # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 # in which case the provisions of the GPL or the LGPL are applicable instead
30 # of those above. If you wish to allow use of your version of this file only
31 # under the terms of either the GPL or the LGPL, and not to allow others to
32 # use your version of this file under the terms of the MPL, indicate your
33 # decision by deleting the provisions above and replace them with the notice
34 # and other provisions required by the GPL or the LGPL. If you do not delete
35 # the provisions above, a recipient may use your version of this file under
36 # the terms of any one of the MPL, the GPL or the LGPL.
38 # ***** END LICENSE BLOCK *****
40 CPPSRCS += \
41 nsStaticXULComponents.cpp \
42 $(NULL)
44 ifeq (,$(filter-out WINCE WINNT,$(OS_ARCH)))
45 REQUIRES += widget gfx
46 CPPSRCS += \
47 nsDllMain.cpp \
48 $(NULL)
49 endif
51 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
52 CPPSRCS += \
53 dlldeps.cpp \
54 nsGFXDeps.cpp \
55 $(NULL)
57 RCINCLUDE = xulrunner.rc
59 ifndef MOZ_NATIVE_ZLIB
60 CPPSRCS += dlldeps-zlib.cpp
61 endif
63 LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/windows
64 LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
65 endif
67 ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
68 REQUIRES += libreg
69 DEFINES += -DZLIB_DLL=1
70 endif
72 ifeq ($(OS_ARCH),OS2)
73 REQUIRES += widget gfx
75 CPPSRCS += \
76 dlldeps.cpp \
77 nsGFXDeps.cpp \
78 $(NULL)
80 ifndef MOZ_NATIVE_ZLIB
81 CPPSRCS += dlldeps-zlib.cpp
82 endif
84 ifdef MOZ_ENABLE_LIBXUL
85 RESFILE = xulrunos2.res
86 RCFLAGS += -i $(topsrcdir)/widget/src/os2
87 endif
89 LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/os2
90 LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
91 endif
93 # dependent libraries
94 ifdef MOZ_IPC
95 STATIC_LIBS += \
96 jsipc_s \
97 domipc_s \
98 domplugins_s \
99 mozipc_s \
100 mozipdlgen_s \
101 ipcshell_s \
102 gfxipc_s \
103 $(NULL)
105 ifdef MOZ_IPDL_TESTS
106 STATIC_LIBS += ipdlunittest_s
107 endif
109 ifeq (Linux,$(OS_ARCH))
110 ifneq (Android,$(OS_TARGET))
111 OS_LIBS += -lrt
112 endif
113 endif
114 ifeq (WINNT,$(OS_ARCH))
115 OS_LIBS += dbghelp.lib
116 endif
117 endif
119 STATIC_LIBS += \
120 xpcom_core \
121 ucvutil_s \
122 gkgfx \
123 $(NULL)
125 ifdef MOZ_IPC
126 STATIC_LIBS += chromium_s
127 endif
129 ifndef WINCE
130 STATIC_LIBS += \
131 mozreg_s \
132 $(NULL)
133 endif
135 # component libraries
136 COMPONENT_LIBS += \
137 necko \
138 uconv \
139 i18n \
140 chardet \
141 jar$(VERSION_NUMBER) \
142 startupcache \
143 pref \
144 htmlpars \
145 imglib2 \
146 gklayout \
147 docshell \
148 embedcomponents \
149 webbrwsr \
150 nsappshell \
151 txmgr \
152 commandlines \
153 toolkitcomps \
154 pipboot \
155 pipnss \
156 appcomps \
157 $(NULL)
159 ifdef MOZ_IPC
160 COMPONENT_LIBS += jetpack_s
161 endif
163 ifdef BUILD_CTYPES
164 COMPONENT_LIBS += \
165 jsctypes \
166 $(NULL)
167 endif
169 COMPONENT_LIBS += jsperf
171 ifdef MOZ_PLUGINS
172 DEFINES += -DMOZ_PLUGINS
173 COMPONENT_LIBS += \
174 gkplugin \
175 $(NULL)
176 endif
178 ifdef MOZ_XUL
179 ifdef MOZ_ENABLE_GTK2
180 COMPONENT_LIBS += \
181 unixproxy \
182 $(NULL)
183 endif
184 endif
186 ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
187 COMPONENT_LIBS += \
188 osxproxy \
189 $(NULL)
190 endif
192 ifdef MOZ_XUL
193 ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
194 COMPONENT_LIBS += \
195 unixproxy \
196 $(NULL)
197 endif
198 endif
200 ifneq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
201 COMPONENT_LIBS += \
202 windowsproxy \
203 $(NULL)
204 endif
206 ifdef MOZ_JSDEBUGGER
207 DEFINES += -DMOZ_JSDEBUGGER
208 COMPONENT_LIBS += \
209 jsd \
210 $(NULL)
211 endif
213 ifdef MOZ_PREF_EXTENSIONS
214 DEFINES += -DMOZ_PREF_EXTENSIONS
215 COMPONENT_LIBS += \
216 autoconfig \
217 $(NULL)
218 endif
220 ifdef MOZ_AUTH_EXTENSION
221 COMPONENT_LIBS += auth
222 DEFINES += -DMOZ_AUTH_EXTENSION
223 endif
225 ifdef MOZ_PERMISSIONS
226 COMPONENT_LIBS += cookie permissions
227 DEFINES += -DMOZ_PERMISSIONS
228 endif
230 ifdef MOZ_UNIVERSALCHARDET
231 COMPONENT_LIBS += universalchardet
232 DEFINES += -DMOZ_UNIVERSALCHARDET
233 endif
235 ifndef MOZ_PLAINTEXT_EDITOR_ONLY
236 COMPONENT_LIBS += composer
237 else
238 DEFINES += -DMOZ_PLAINTEXT_EDITOR_ONLY
239 endif
241 ifdef MOZ_RDF
242 COMPONENT_LIBS += \
243 rdf \
244 windowds \
245 $(NULL)
246 endif
248 ifeq (,$(filter android qt beos os2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
249 ifdef MOZ_XUL
250 COMPONENT_LIBS += fileview
251 DEFINES += -DMOZ_FILEVIEW
252 endif
253 endif
255 ifdef MOZ_STORAGE
256 COMPONENT_LIBS += storagecomps
257 EXTRA_DSO_LDOPTS += $(SQLITE_LIBS)
258 endif
260 ifdef MOZ_PLACES
261 STATIC_LIBS += morkreader_s
263 COMPONENT_LIBS += \
264 places \
265 $(NULL)
266 endif
268 ifdef MOZ_MORK
269 ifdef MOZ_XUL
270 COMPONENT_LIBS += \
271 mork \
272 $(NULL)
273 endif
274 endif
276 ifdef MOZ_XUL
277 COMPONENT_LIBS += \
278 tkautocomplete \
279 satchel \
280 pippki \
281 $(NULL)
282 endif
284 ifdef MOZ_ENABLE_GTK2
285 COMPONENT_LIBS += widget_gtk2
286 ifdef MOZ_PREF_EXTENSIONS
287 COMPONENT_LIBS += system-pref
288 endif
289 endif
291 ifdef MOZ_ENABLE_GTK2
292 ifdef MOZ_X11
293 STATIC_LIBS += gtkxtbin
294 endif
295 endif
297 # Platform-specific icon channel stuff - supported mostly-everywhere
298 ifneq (,$(filter beos windows os2 mac cocoa gtk2 qt,$(MOZ_WIDGET_TOOLKIT)))
299 DEFINES += -DICON_DECODER
300 COMPONENT_LIBS += imgicon
301 endif
303 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
304 COMPONENT_LIBS += widget_android
305 endif
307 STATIC_LIBS += thebes ycbcr
309 STATIC_LIBS += angle
311 COMPONENT_LIBS += gkgfxthebes
313 ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
314 COMPONENT_LIBS += gkwidget
315 endif
316 ifeq (beos,$(MOZ_WIDGET_TOOLKIT))
317 COMPONENT_LIBS += widget_beos
318 endif
319 ifeq (os2,$(MOZ_WIDGET_TOOLKIT))
320 COMPONENT_LIBS += wdgtos2
321 endif
322 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
323 COMPONENT_LIBS += widget_mac
324 endif
325 ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
326 COMPONENT_LIBS += widget_qt
327 endif
329 ifdef ACCESSIBILITY
330 COMPONENT_LIBS += accessibility
331 endif
333 ifdef MOZ_ENABLE_XREMOTE
334 COMPONENT_LIBS += remoteservice
335 endif
337 ifdef MOZ_SPELLCHECK
338 DEFINES += -DMOZ_SPELLCHECK
339 COMPONENT_LIBS += spellchecker
340 endif
342 ifdef MOZ_ZIPWRITER
343 DEFINES += -DMOZ_ZIPWRITER
344 COMPONENT_LIBS += zipwriter
345 endif
347 COMPONENT_LIBS += services-crypto
349 ifdef MOZ_DEBUG
350 ifdef ENABLE_TESTS
351 COMPONENT_LIBS += gkdebug
352 endif
353 endif
355 ifdef MOZ_APP_COMPONENT_LIBS
356 COMPONENT_LIBS += $(MOZ_APP_COMPONENT_LIBS)
357 endif
359 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
360 OS_LIBS += -framework OpenGL -lcups
361 endif
363 EXTRA_DSO_LDOPTS += \
364 $(LIBS_DIR) \
365 $(JPEG_LIBS) \
366 $(PNG_LIBS) \
367 $(QCMS_LIBS) \
368 $(MOZ_JS_LIBS) \
369 $(NSS_LIBS) \
370 $(MOZ_CAIRO_LIBS) \
371 $(MOZ_HARFBUZZ_LIBS) \
372 $(MOZ_OTS_LIBS) \
373 $(MOZ_APP_EXTRA_LIBS) \
374 $(NULL)
376 ifdef MOZ_NATIVE_ZLIB
377 EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
378 else
379 EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
380 endif
382 ifdef MOZ_NATIVE_HUNSPELL
383 EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS)
384 endif
386 ifdef MOZ_NATIVE_LIBEVENT
387 EXTRA_DSO_LDOPTS += $(MOZ_LIBEVENT_LIBS)
388 endif
390 ifdef MOZ_NATIVE_LIBVPX
391 EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS)
392 endif
394 ifdef MOZ_SYDNEYAUDIO
395 ifeq ($(OS_ARCH),Linux)
396 EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
397 endif
398 endif
400 ifdef HAVE_CLOCK_MONOTONIC
401 EXTRA_DSO_LDOPTS += $(REALTIME_LIBS)
402 endif
404 ifeq (android,$(MOZ_WIDGET_TOOLKIT))
405 OS_LIBS += -lGLESv2
406 endif