2004-12-07 01:39:54 +03:00
|
|
|
#
|
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
# http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
# for the specific language governing rights and limitations under the
|
|
|
|
# License.
|
|
|
|
#
|
|
|
|
# The Original Code is mozilla.org code.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# Benjamin Smedberg <benjamin@smedbergs.us>
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
# of those above. If you wish to allow use of your version of this file only
|
|
|
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
# use your version of this file under the terms of the MPL, indicate your
|
|
|
|
# decision by deleting the provisions above and replace them with the notice
|
|
|
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
# the provisions above, a recipient may use your version of this file under
|
|
|
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
#
|
|
|
|
# ***** END LICENSE BLOCK *****
|
|
|
|
|
|
|
|
DEPTH = ../..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
|
|
|
MODULE = libxul
|
|
|
|
LIBRARY_NAME = xul
|
|
|
|
EXPORT_LIBRARY = 1
|
|
|
|
FORCE_USE_PIC = 1
|
|
|
|
FORCE_SHARED_LIB = 1
|
2005-04-05 20:34:09 +04:00
|
|
|
MOZILLA_INTERNAL_API = 1
|
2004-12-07 01:39:54 +03:00
|
|
|
|
2005-06-23 20:55:52 +04:00
|
|
|
ifeq ($(OS_ARCH),Darwin)
|
|
|
|
# This is going to be a framework named "XUL", not an ordinary library named
|
|
|
|
# "libxul.dylib"
|
|
|
|
LIBRARY_NAME=XUL
|
|
|
|
DLL_PREFIX=
|
|
|
|
DLL_SUFFIX=
|
|
|
|
endif
|
|
|
|
|
2004-12-07 01:39:54 +03:00
|
|
|
REQUIRES = \
|
|
|
|
xpcom \
|
|
|
|
string \
|
|
|
|
xpcom_obsolete \
|
2004-12-09 22:28:35 +03:00
|
|
|
$(ZLIB_REQUIRES) \
|
2005-03-19 00:24:05 +03:00
|
|
|
xulapp \
|
2004-12-07 01:39:54 +03:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
CPPSRCS = \
|
|
|
|
nsStaticXULComponents.cpp \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
|
2004-12-09 22:28:35 +03:00
|
|
|
REQUIRES += libreg widget gfx
|
2004-12-07 01:39:54 +03:00
|
|
|
|
|
|
|
CPPSRCS += \
|
|
|
|
dlldeps.cpp \
|
|
|
|
dlldeps-obs.cpp \
|
2004-12-09 22:28:35 +03:00
|
|
|
nsGFXDeps.cpp \
|
|
|
|
nsDllMain.cpp \
|
2005-03-19 00:24:05 +03:00
|
|
|
dlldeps-xul.cpp \
|
2004-12-07 01:39:54 +03:00
|
|
|
$(NULL)
|
2004-12-09 22:28:35 +03:00
|
|
|
|
|
|
|
ifndef MOZ_NATIVE_ZLIB
|
|
|
|
CPPSRCS += dlldeps-zlib.cpp
|
|
|
|
DEFINES += -DZLIB_INTERNAL
|
|
|
|
endif
|
|
|
|
|
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/windows
|
2004-12-07 01:39:54 +03:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
DEFINES += -DZLIB_DLL=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
# dependent libraries
|
2004-12-09 22:28:35 +03:00
|
|
|
STATIC_LIBS = \
|
|
|
|
xpcom_core \
|
|
|
|
xpcom_compat \
|
|
|
|
unicharutil_s \
|
|
|
|
ucvutil_s \
|
|
|
|
gkgfx \
|
|
|
|
gfxshared_s \
|
2005-03-19 00:24:05 +03:00
|
|
|
xulapp_s \
|
2004-12-07 01:39:54 +03:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
# component libraries
|
2004-12-09 22:28:35 +03:00
|
|
|
COMPONENT_LIBS += \
|
|
|
|
xpcom_compat_c \
|
|
|
|
xpconnect \
|
|
|
|
necko \
|
|
|
|
uconv \
|
|
|
|
i18n \
|
|
|
|
jar$(VERSION_NUMBER) \
|
|
|
|
pref \
|
|
|
|
caps \
|
|
|
|
rdf \
|
|
|
|
htmlpars \
|
|
|
|
imglib2 \
|
|
|
|
gkplugin \
|
2004-12-15 07:07:01 +03:00
|
|
|
gklayout \
|
|
|
|
docshell \
|
|
|
|
embedcomponents \
|
|
|
|
webbrwsr \
|
|
|
|
editor \
|
|
|
|
nsappshell \
|
|
|
|
txmgr \
|
|
|
|
composer \
|
2005-03-19 00:24:05 +03:00
|
|
|
chrome \
|
|
|
|
mork \
|
|
|
|
mozfind \
|
|
|
|
appcomps \
|
|
|
|
commandlines \
|
|
|
|
toolkitcomps \
|
|
|
|
xpinstall \
|
2005-04-05 20:34:09 +04:00
|
|
|
jsd \
|
2004-12-09 22:28:35 +03:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
COMPONENT_LIBS += intlcmpt
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_MATHML
|
|
|
|
COMPONENT_LIBS += ucvmath
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter xlib,$(MOZ_WIDGET_TOOLKIT))$(MOZ_ENABLE_XLIB)$(MOZ_ENABLE_XPRINT))
|
|
|
|
STATIC_LIBS += xlibrgb
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_XPRINT
|
|
|
|
DEFINES += -DMOZ_ENABLE_XPRINT
|
2004-12-10 21:58:34 +03:00
|
|
|
STATIC_LIBS += xprintutil
|
2004-12-09 22:28:35 +03:00
|
|
|
COMPONENTS_LIBS += gfxxprint
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_XLIB
|
|
|
|
STATIC_LIBS += xlibxtbin
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_GTK
|
|
|
|
STATIC_LIBS += gtksuperwin
|
|
|
|
COMPONENT_LIBS += widget_gtk
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_GTK2
|
|
|
|
COMPONENT_LIBS += widget_gtk2
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(MOZ_ENABLE_GTK)$(MOZ_ENABLE_GTK2))
|
|
|
|
STATIC_LIBS += gtkxtbin
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_IPCD
|
|
|
|
DEFINES += -DMOZ_IPCD
|
|
|
|
COMPONENT_LIBS += ipcdc
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(strip $(filter data keyword gopher viewsource,$(NECKO_PROTOCOLS))))
|
|
|
|
DEFINES += -DNECKO2
|
|
|
|
COMPONENT_LIBS += necko2
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_POSTSCRIPT
|
|
|
|
DEFINES += -DMOZ_ENABLE_POSTSCRIPT
|
2004-12-10 21:15:15 +03:00
|
|
|
STATIC_LIBS += gfxpsshar
|
2004-12-09 22:28:35 +03:00
|
|
|
COMPONENT_LIBS += gfxps
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter icon,$(MOZ_IMG_DECODERS)))
|
2004-12-10 21:15:15 +03:00
|
|
|
ifndef MOZ_ENABLE_GNOMEUI
|
2004-12-09 22:28:35 +03:00
|
|
|
DEFINES += -DICON_DECODER
|
|
|
|
COMPONENT_LIBS += imgicon
|
|
|
|
endif
|
2004-12-10 21:15:15 +03:00
|
|
|
endif
|
2004-12-09 22:28:35 +03:00
|
|
|
ifeq (windows,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
COMPONENT_LIBS += gkgfxwin gkwidget
|
|
|
|
endif
|
|
|
|
ifeq (beos,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
COMPONENT_LIBS += gfx_beos widget_beos
|
|
|
|
endif
|
|
|
|
ifeq (os2,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
COMPONENT_LIBS += gfx_os2 wdgtos2
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
|
|
|
COMPONENT_LIBS += gfx_mac widget_mac
|
|
|
|
endif
|
2005-04-04 19:45:48 +04:00
|
|
|
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
|
|
|
|
COMPONENT_LIBS += widget_qt
|
|
|
|
endif
|
2004-12-09 22:28:35 +03:00
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_CAIRO_GFX
|
|
|
|
DEFINES += -DMOZ_ENABLE_CAIRO_GFX
|
|
|
|
COMPONENT_LIBS += gkgfxcairo
|
|
|
|
else
|
|
|
|
ifneq (,$(MOZ_ENABLE_GTK)$(MOZ_ENABLE_GTK2))
|
|
|
|
COMPONENT_LIBS += gfx_gtk
|
|
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_QT
|
|
|
|
COMPONENT_LIBS += gfx_qt
|
|
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_XLIB
|
|
|
|
COMPONENT_LIBS += gfx_xlib
|
|
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_PHOTON
|
|
|
|
COMPONENT_LIBS += gfx_photon
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_XLIB
|
|
|
|
COMPONENT_LIBS += widget_xlib
|
|
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_PHOTON
|
|
|
|
COMPONENT_LIBS += widget_photon
|
|
|
|
endif
|
|
|
|
|
2004-12-15 07:07:01 +03:00
|
|
|
ifdef MOZ_OJI
|
|
|
|
STATIC_LIBS += jsj
|
|
|
|
COMPONENT_LIBS += oji
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef ACCESSIBILITY
|
|
|
|
COMPONENT_LIBS += accessibility
|
|
|
|
endif
|
|
|
|
|
2005-04-08 08:59:36 +04:00
|
|
|
ifdef MOZ_ENABLE_XREMOTE
|
|
|
|
COMPONENT_LIBS += remoteservice
|
|
|
|
endif
|
|
|
|
|
2004-12-09 22:28:35 +03:00
|
|
|
SHARED_LIBRARY_LIBS = \
|
|
|
|
$(foreach lib,$(STATIC_LIBS),$(DIST)/lib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \
|
|
|
|
$(foreach component,$(COMPONENT_LIBS),$(DIST)/lib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
|
2004-12-07 01:39:54 +03:00
|
|
|
$(NULL)
|
|
|
|
|
2004-12-09 22:28:35 +03:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
2005-04-11 19:19:42 +04:00
|
|
|
$(MOZ_FIX_LINK_PATHS) \
|
2005-06-07 10:57:19 +04:00
|
|
|
$(LIBS_DIR) \
|
2004-12-09 22:28:35 +03:00
|
|
|
$(JPEG_LIBS) \
|
|
|
|
$(PNG_LIBS) \
|
|
|
|
$(MOZ_JS_LIBS) \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ifdef MOZ_NATIVE_ZLIB
|
|
|
|
EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
|
|
|
|
else
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS)
|
|
|
|
endif
|
|
|
|
|
2004-12-07 01:39:54 +03:00
|
|
|
ifdef GC_LEAK_DETECTOR
|
|
|
|
EXTRA_DSO_LIBS += boehm
|
|
|
|
endif
|
|
|
|
|
2005-07-21 17:33:43 +04:00
|
|
|
ifdef NS_TRACE_MALLOC
|
|
|
|
EXTRA_DSO_LIBS += tracemalloc
|
2005-06-11 16:52:23 +04:00
|
|
|
endif
|
|
|
|
|
2004-12-07 01:39:54 +03:00
|
|
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
|
|
|
EXTRA_DSO_LIBS += macmorefiles_s
|
|
|
|
EXTRA_DEPS += $(DIST)/lib/$(LIB_PREFIX)macmorefiles_s.$(LIB_SUFFIX)
|
|
|
|
endif
|
|
|
|
|
2005-07-21 17:33:43 +04:00
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/config
|
|
|
|
|
2005-04-04 19:45:48 +04:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2004-12-09 22:28:35 +03:00
|
|
|
EXTRA_DSO_LDOPTS += $(EXTRA_DSO_LIBS)
|
|
|
|
|
2004-12-07 01:39:54 +03:00
|
|
|
OS_LIBS += $(LIBICONV)
|
|
|
|
|
|
|
|
DEFINES += \
|
|
|
|
-D_IMPL_NS_COM \
|
|
|
|
-D_IMPL_NS_STRINGAPI \
|
|
|
|
-DEXPORT_XPT_API \
|
|
|
|
-DEXPORT_XPTC_API \
|
|
|
|
-DEXPORT_XPTI_API \
|
|
|
|
-D_IMPL_NS_COM_OBSOLETE \
|
2004-12-09 22:28:35 +03:00
|
|
|
-D_IMPL_NS_GFX \
|
|
|
|
-D_IMPL_NS_WIDGET \
|
2005-03-19 00:24:05 +03:00
|
|
|
-DIMPL_XULAPI \
|
2004-12-07 01:39:54 +03:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
|
|
|
|
|
|
|
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
|
|
|
CXXFLAGS += $(TK_CFLAGS)
|
2005-04-04 19:45:48 +04:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
|
|
|
-framework Cocoa \
|
|
|
|
-framework QuickTime \
|
|
|
|
-framework IOKit \
|
|
|
|
$(TK_LIBS) \
|
|
|
|
$(NULL)
|
2004-12-07 01:39:54 +03:00
|
|
|
endif
|
|
|
|
|
2004-12-10 21:15:15 +03:00
|
|
|
ifdef MOZ_ENABLE_XINERAMA
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_XINERAMA_LIBS)
|
|
|
|
endif
|
|
|
|
|
2004-12-10 21:58:34 +03:00
|
|
|
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(MOZ_GTK_LDFLAGS) $(MOZ_XFT_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS)
|
2004-12-10 21:15:15 +03:00
|
|
|
|
|
|
|
ifdef MOZ_ENABLE_XPRINT
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_XPRINT_LDFLAGS)
|
|
|
|
endif
|
|
|
|
|
2004-12-07 01:39:54 +03:00
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
|
|
|
EXTRA_DSO_LDOPTS += -lbe
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2004-12-09 22:28:35 +03:00
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool Comdlg32)
|
2004-12-07 01:39:54 +03:00
|
|
|
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
|
|
|
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp)
|
|
|
|
endif
|
|
|
|
ifdef GNU_CXX
|
|
|
|
DSO_LDOPTS += -Wl,--export-all-symbols
|
|
|
|
endif
|
|
|
|
endif # WINNT
|
|
|
|
|
2004-12-15 07:07:01 +03:00
|
|
|
ifdef MOZ_SVG_RENDERER_GDIPLUS
|
|
|
|
OS_LIBS += Gdiplus.lib
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_SVG_RENDERER_LIBART
|
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_LIBART_LIBS)
|
|
|
|
endif
|
|
|
|
|
2005-05-12 03:49:52 +04:00
|
|
|
ifneq (,$(MOZ_ENABLE_CANVAS)$(MOZ_SVG_RENDERER_CAIRO))
|
2004-12-15 07:07:01 +03:00
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_CAIRO_LIBS)
|
|
|
|
endif
|
|
|
|
|
2004-12-07 01:39:54 +03:00
|
|
|
export:: dlldeps.cpp dlldeps-obs.cpp
|
|
|
|
|
|
|
|
dlldeps.cpp: $(topsrcdir)/xpcom/build/dlldeps.cpp
|
|
|
|
$(INSTALL) $^ .
|
|
|
|
|
|
|
|
dlldeps-obs.cpp: $(topsrcdir)/xpcom/obsolete/dlldeps-obs.cpp
|
|
|
|
$(INSTALL) $^ .
|