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
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.
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 *****
39 topsrcdir
= @top_srcdir@
43 include $(DEPTH
)/config
/autoconf.mk
46 include $(topsrcdir
)/rdf
/util
/src
/objs.mk
48 include $(topsrcdir
)/intl
/unicharutil
/util
/objs.mk
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
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.
73 ifeq ($(OS_ARCH
)_
$(GNU_CC
),WINNT_
)
74 CPPSRCS
+= dlldeps-xul.
cpp
77 ifeq ($(OS_ARCH
),WINCE
)
78 CPPSRCS
+= dlldeps-xul.
cpp
82 CPPSRCS
+= dlldeps-xul.
cpp
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
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
99 SHARED_LIBRARY_LIBS
+= \
100 $(DEPTH
)/toolkit
/xre
/$(LIB_PREFIX
)xulapp_s.
$(LIB_SUFFIX
) \
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
)) \
110 -I
$(topsrcdir
)/extensions
/java
/xpcom
/src \
111 -I
$(JAVA_INCLUDE_PATH
) \
114 ifeq ($(OS_ARCH
),WINNT
)
115 CPPSRCS
+= dlldeps-javaxpcom.
cpp
116 LOCAL_INCLUDES
+= -I
$(JAVA_INCLUDE_PATH
)/win32
118 ifeq ($(OS_ARCH
),OS2
)
119 CPPSRCS
+= dlldeps-javaxpcom.
cpp
120 LOCAL_INCLUDES
+= -I
$(JAVA_INCLUDE_PATH
)/os2
122 ifeq ($(MOZ_WIDGET_TOOLKIT
),cocoa
)
123 EXTRA_DSO_LDOPTS
+= -framework JavaVM
125 LOCAL_INCLUDES
+= -I
$(JAVA_INCLUDE_PATH
)/linux
130 SHARED_LIBRARY_LIBS
+= \
131 $(DEPTH
)/extensions
/java
/xpcom
/src
/$(LIB_PREFIX
)javaxpcom.
$(LIB_SUFFIX
)
134 ifdef MOZ_ENABLE_LIBXUL
135 include $(srcdir)/libxul-config.mk
138 $(srcdir)/libxul-config.mk \
139 $(srcdir)/libxul-rules.mk \
140 $(topsrcdir
)/intl
/unicharutil
/util
/objs.mk \
149 $(INTL_UNICHARUTIL_UTIL_LCPPSRCS
) \
153 $(INTL_UNICHARUTIL_UTIL_LCPPSRCS
) \
154 $(wildcard *.
$(OBJ_SUFFIX
)) \
155 dlldeps-javaxpcom.
cpp \
158 LOCAL_INCLUDES
+= -I
$(topsrcdir
)/intl
/unicharutil
/util
162 $(topsrcdir
)/rdf
/util
/src
/objs.mk \
171 $(RDF_UTIL_SRC_LCPPSRCS
) \
175 $(RDF_UTIL_SRC_LCPPSRCS
) \
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
187 ifneq (,$(filter OS2 WINCE WINNT
,$(OS_ARCH
)))
188 SDK_LIBRARY
= $(IMPORT_LIBRARY
)
190 SDK_LIBRARY
= $(SHARED_LIBRARY
)
193 include $(topsrcdir
)/config
/rules.mk
195 export:: $(RDF_UTIL_SRC_CPPSRCS
) $(INTL_UNICHARUTIL_UTIL_CPPSRCS
)
198 EXTRA_DSO_LDOPTS
+= $(LIBS_DIR
) $(EXTRA_DSO_LIBS
)
200 ifdef MOZ_ENABLE_LIBXUL
201 include $(srcdir)/libxul-rules.mk
203 EXTRA_DSO_LDOPTS
+= \
204 $(MOZ_COMPONENT_LIBS
) \
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 \
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
)
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
)
233 ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
234 EXTRA_DSO_LDOPTS
+= $(MOZ_STARTUP_NOTIFICATION_LIBS
)
237 ifeq ($(OS_ARCH
),BeOS
)
238 EXTRA_DSO_LDOPTS
+= -lbe
-ltracker
241 ifeq ($(OS_ARCH
),SunOS
)
242 EXTRA_DSO_LDOPTS
+= -lelf
-ldemangle
-lCstd
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
)
251 ifeq ($(OS_ARCH
),WINCE
)
252 EXTRA_DSO_LDOPTS
+= $(call EXPAND_LIBNAME
, aygshell cellcore uuid ole32 oleaut32
)
257 EXTRA_DSO_LDOPTS
+= -ljprof
261 EXTRA_DSO_LDOPTS
+= $(MOZ_QT_LDFLAGS
)
265 dlldeps-javaxpcom.
cpp: $(topsrcdir
)/extensions
/java
/xpcom
/src
/dlldeps-javaxpcom.
cpp
269 ifneq (,$(filter layout-debug
,$(MOZ_EXTENSIONS
)))
270 DEFINES
+= -DMOZ_ENABLE_EXTENSION_LAYOUT_DEBUG
274 ifneq ($(OS_ARCH
),WINNT
)
275 ifneq ($(OS_ARCH
),Darwin
)
276 EXTRA_DSO_LDOPTS
+= $(DEPTH
)/memory
/jemalloc
/$(LIB_PREFIX
)jemalloc.
$(LIB_SUFFIX
)