Fixed textfield rendering in nsNativeThemeQt
[mozilla-central.git] / toolkit / library / Makefile.in
blobce7fe7ef9a24751a1c68c387196915dbe77178a6
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.org code.
17 # The Initial Developer of the Original Code is
18 # Benjamin Smedberg <benjamin@smedbergs.us>
19 # Portions created by the Initial Developer are Copyright (C) 1998
20 # the Initial Developer. All Rights Reserved.
22 # Contributor(s):
24 # Alternatively, the contents of this file may be used under the terms of
25 # either of the GNU General Public License Version 2 or later (the "GPL"),
26 # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
38 DEPTH = ../..
39 topsrcdir = @top_srcdir@
40 srcdir = @srcdir@
41 VPATH = @srcdir@
43 include $(DEPTH)/config/autoconf.mk
45 ifdef MOZ_RDF
46 include $(topsrcdir)/rdf/util/src/objs.mk
47 endif
48 include $(topsrcdir)/intl/unicharutil/util/objs.mk
50 MODULE = libxul
51 LIBRARY_NAME = xul
52 FORCE_USE_PIC = 1
53 FORCE_SHARED_LIB = 1
54 MOZILLA_INTERNAL_API = 1
56 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
57 # This is going to be a framework named "XUL", not an ordinary library named
58 # "libxul.dylib"
59 LIBRARY_NAME=XUL
60 # Setting MAKE_FRAMEWORK makes DLL_PREFIX and DLL_SUFFIX be ignored when
61 # setting SHARED_LIBRARY; we need to leave DLL_PREFIX and DLL_SUFFIX
62 # as-is so that dependencies of the form -ltracemalloc still work.
63 MAKE_FRAMEWORK=1
64 endif
66 REQUIRES = \
67 xpcom \
68 string \
69 $(ZLIB_REQUIRES) \
70 xulapp \
71 $(NULL)
73 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
74 CPPSRCS += dlldeps-xul.cpp
75 endif
77 ifeq ($(OS_ARCH),WINCE)
78 CPPSRCS += dlldeps-xul.cpp
79 endif
81 ifeq ($(OS_ARCH),OS2)
82 CPPSRCS += dlldeps-xul.cpp
83 endif
85 # dependent libraries
86 ifneq (,$(MOZ_ENABLE_GTK2))
87 SHARED_LIBRARY_LIBS += \
88 $(DEPTH)/embedding/browser/gtk/src/$(LIB_PREFIX)gtkembedmoz.$(LIB_SUFFIX)
89 DEFINES += -DMOZ_ENABLE_GTK2
90 endif
91 ifneq (,$(MOZ_ENABLE_QT))
92 ifdef MOZ_ENABLE_LIBXUL
93 SHARED_LIBRARY_LIBS += \
94 $(DEPTH)/embedding/browser/qt/src/$(LIB_PREFIX)qgeckoembed.$(LIB_SUFFIX)
95 DEFINES += -DMOZ_ENABLE_QT
96 endif
97 endif
99 SHARED_LIBRARY_LIBS += \
100 $(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \
101 $(NULL)
103 SHARED_LIBRARY_LIBS += \
104 $(foreach component,$(COMPONENT_LIBS),$(DEPTH)/staticlib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
105 $(foreach lib,$(STATIC_LIBS),$(DEPTH)/staticlib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \
106 $(NULL)
108 ifdef MOZ_JAVAXPCOM
109 LOCAL_INCLUDES += \
110 -I$(topsrcdir)/extensions/java/xpcom/src \
111 -I$(JAVA_INCLUDE_PATH) \
112 $(NULL)
114 ifeq ($(OS_ARCH),WINNT)
115 CPPSRCS += dlldeps-javaxpcom.cpp
116 LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/win32
117 else
118 ifeq ($(OS_ARCH),OS2)
119 CPPSRCS += dlldeps-javaxpcom.cpp
120 LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/os2
121 else
122 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
123 EXTRA_DSO_LDOPTS += -framework JavaVM
124 else
125 LOCAL_INCLUDES += -I$(JAVA_INCLUDE_PATH)/linux
126 endif
127 endif
128 endif
130 SHARED_LIBRARY_LIBS += \
131 $(DEPTH)/extensions/java/xpcom/src/$(LIB_PREFIX)javaxpcom.$(LIB_SUFFIX)
132 endif #MOZ_JAVAXPCOM
134 ifdef MOZ_ENABLE_LIBXUL
135 include $(srcdir)/libxul-config.mk
137 EXTRA_DEPS += \
138 $(srcdir)/libxul-config.mk \
139 $(srcdir)/libxul-rules.mk \
140 $(topsrcdir)/intl/unicharutil/util/objs.mk \
141 $(NULL)
143 REQUIRES += \
144 uconv \
145 unicharutil \
146 $(NULL)
148 CPPSRCS += \
149 $(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \
150 $(NULL)
152 GARBAGE += \
153 $(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \
154 $(wildcard *.$(OBJ_SUFFIX)) \
155 dlldeps-javaxpcom.cpp \
156 $(NULL)
158 LOCAL_INCLUDES += -I$(topsrcdir)/intl/unicharutil/util
160 ifdef MOZ_RDF
161 EXTRA_DEPS += \
162 $(topsrcdir)/rdf/util/src/objs.mk \
163 $(NULL)
165 REQUIRES += \
166 rdf \
167 rdfutil \
168 $(NULL)
170 CPPSRCS += \
171 $(RDF_UTIL_SRC_LCPPSRCS) \
172 $(NULL)
174 GARBAGE += \
175 $(RDF_UTIL_SRC_LCPPSRCS) \
176 $(NULL)
177 endif
178 else
179 ifdef NS_TRACE_MALLOC
180 # In libxul builds, tracemalloc is part of libxul instead.
181 ifndef MOZ_ENABLE_LIBXUL
182 EXTRA_DSO_LIBS += tracemalloc
183 endif
184 endif
185 endif
187 ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
188 SDK_LIBRARY = $(IMPORT_LIBRARY)
189 else
190 SDK_LIBRARY = $(SHARED_LIBRARY)
191 endif
193 include $(topsrcdir)/config/rules.mk
195 export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS)
196 $(INSTALL) $^ .
198 EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS)
200 ifdef MOZ_ENABLE_LIBXUL
201 include $(srcdir)/libxul-rules.mk
202 else
203 EXTRA_DSO_LDOPTS += \
204 $(MOZ_COMPONENT_LIBS) \
205 $(MOZ_JS_LIBS) \
206 $(NULL)
207 endif
209 DEFINES += -DIMPL_XREAPI
211 EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
213 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
214 CXXFLAGS += $(TK_CFLAGS)
215 EXTRA_DSO_LDOPTS += \
216 -framework QuickTime \
217 -framework IOKit \
218 -lcrypto \
219 $(TK_LIBS) \
220 $(NULL)
221 endif
223 ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
224 EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(MOZ_XFT_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0
225 EXTRA_DSO_LDOPTS += $(FT2_LIBS)
226 endif
228 ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
229 EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(MOZ_XFT_LIBS) $(XT_LIBS) $(MOZ_QT_LIBS) -lgthread-2.0
230 EXTRA_DSO_LDOPTS += $(FT2_LIBS)
231 endif
233 ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
234 EXTRA_DSO_LDOPTS += $(MOZ_STARTUP_NOTIFICATION_LIBS)
235 endif
237 ifeq ($(OS_ARCH),BeOS)
238 EXTRA_DSO_LDOPTS += -lbe -ltracker
239 endif
241 ifeq ($(OS_ARCH),SunOS)
242 EXTRA_DSO_LDOPTS += -lelf -ldemangle -lCstd
243 endif
245 ifeq ($(OS_ARCH),WINNT)
246 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32 imm32 winmm wsock32 msimg32)
247 ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
248 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp)
249 endif
250 endif # WINNT
251 ifeq ($(OS_ARCH),WINCE)
252 EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, aygshell cellcore uuid ole32 oleaut32 )
253 endif
256 ifdef MOZ_JPROF
257 EXTRA_DSO_LDOPTS += -ljprof
258 endif
260 ifdef MOZ_ENABLE_QT
261 EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS)
262 endif
264 ifdef MOZ_JAVAXPCOM
265 dlldeps-javaxpcom.cpp: $(topsrcdir)/extensions/java/xpcom/src/dlldeps-javaxpcom.cpp
266 $(INSTALL) $^ .
267 endif
269 ifneq (,$(filter layout-debug,$(MOZ_EXTENSIONS)))
270 DEFINES += -DMOZ_ENABLE_EXTENSION_LAYOUT_DEBUG
271 endif
273 ifdef MOZ_MEMORY
274 ifneq ($(OS_ARCH),WINNT)
275 ifneq ($(OS_ARCH),Darwin)
276 EXTRA_DSO_LDOPTS += $(DEPTH)/memory/jemalloc/$(LIB_PREFIX)jemalloc.$(LIB_SUFFIX)
277 endif
278 endif
279 endif