Bug 272283 - initial work for --enable-libxul r=bryner+darin This is on by default for xulrunner and off by default for all other apps.

This commit is contained in:
bsmedberg%covad.net 2004-12-06 22:39:54 +00:00
parent ec32e80f2d
commit f23f538920
20 changed files with 394 additions and 196 deletions

View File

@ -142,6 +142,13 @@ tier_2_dirs = \
xpcom/obsolete \
$(NULL)
ifdef MOZ_ENABLE_LIBXUL
tier_2_dirs += \
toolkit/library \
xpcom/stub \
$(NULL)
endif
ifdef NS_TRACE_MALLOC
tier_2_dirs += tools/trace-malloc/lib tools/trace-malloc
endif
@ -291,6 +298,21 @@ ifdef MOZ_XPINSTALL
tier_50_dirs += xpinstall
endif
# Many standalone tools/test can't be built until after libxul is available.
ifdef MOZ_ENABLE_LIBXUL
tier_50_dirs += xpcom/tools
ifdef ENABLE_TESTS
tier_50_dirs += \
xpcom/tests \
xpcom/sample \
xpcom/typelib/xpt/tests \
xpcom/reflect/xptinfo/tests \
xpcom/reflect/xptcall/tests \
xpcom/proxy/tests \
$(NULL)
endif
endif
#
# tier 9x - application features
#
@ -315,14 +337,6 @@ endif
# tier 99 - application binaries
#
ifdef MOZ_COMPONENTLIB
tier_99_dirs += embedding/componentlib
else
ifneq (,$(MOZ_STATIC_COMPONENTS)$(MOZ_META_COMPONENTS))
tier_99_dirs += modules/staticmod
endif
endif # MOZ_COMPONENTLIB
# axcontrol
ifeq ($(OS_ARCH),WINNT)
ifndef MOZ_NO_ACTIVEX_SUPPORT

View File

@ -941,6 +941,7 @@ chrome/src/Makefile
chrome/tools/Makefile
chrome/tools/chromereg/Makefile
toolkit/Makefile
toolkit/library/Makefile
toolkit/content/Makefile
toolkit/content/buildconfig.html
toolkit/obsolete/Makefile

View File

@ -103,9 +103,8 @@ MOZ_COMPOSER = @MOZ_COMPOSER@
BUILD_SHARED_LIBS = @BUILD_SHARED_LIBS@
BUILD_STATIC_LIBS = @BUILD_STATIC_LIBS@
MOZ_STATIC_COMPONENT_LOADER = @MOZ_STATIC_COMPONENT_LOADER@
MOZ_STATIC_COMPONENTS = @MOZ_STATIC_COMPONENTS@
MOZ_META_COMPONENTS = @MOZ_META_COMPONENTS@
MOZ_STATIC_COMPONENT_LIBS = @MOZ_STATIC_COMPONENT_LIBS@
MOZ_ENABLE_LIBXUL = @MOZ_ENABLE_LIBXUL@
ENABLE_TESTS = @ENABLE_TESTS@
IBMBIDI = @IBMBIDI@
SUNCTL = @SUNCTL@
@ -502,5 +501,4 @@ MOZ_SUNBIRD = @MOZ_SUNBIRD@
MINIMO = @MINIMO@
MOZ_COMPONENTLIB = @MOZ_COMPONENTLIB@
MACOS_SDK_DIR = @MACOS_SDK_DIR@

View File

@ -362,96 +362,6 @@ ifeq ($(MOZ_REORDER),1)
OS_CXXFLAGS += -ffunction-sections
endif
#
# List known meta modules and their dependent libs
#
_ALL_META_COMPONENTS=mail crypto
MOZ_META_COMPONENTS_mail = \
IMAP_factory \
mime_services \
nsMsgNewsModule \
nsImportServiceModule \
nsAbModule \
nsTextImportModule \
nsVCardModule \
nsMsgDBModule \
nsMsgMdnModule \
nsMsgMailViewModule \
nsBayesianFilterModule \
$(NULL)
MOZ_META_COMPONENTS_mail_comps = \
msgimap \
mime \
msgnews \
import \
addrbook \
impText \
vcard \
msgdb \
msgmdn \
mailview \
offline-startup \
bayesflt \
$(NULL)
MOZ_META_COMPONENTS_mail_libs = mimecthglue_s
ifdef USE_SHORT_LIBNAME
MOZ_META_COMPONENTS_mail_libs += msgbsutl
else
MOZ_META_COMPONENTS_mail_libs += msgbaseutil
endif
ifeq ($(OS_ARCH),WINNT)
MOZ_META_COMPONENTS_mail += \
nsMsgBaseModule \
nsEudoraImportModule \
nsOEImport \
nsOutlookImport \
msgMapiModule \
$(NULL)
MOZ_META_COMPONENTS_mail_comps += \
msgbase \
impEudra \
importOE \
impOutlk \
msgMapi \
$(NULL)
else
MOZ_META_COMPONENTS_mail += nsMsgBaseModule
MOZ_META_COMPONENTS_mail_comps += mailnews
endif
MOZ_META_COMPONENTS_mail += \
nsMimeEmitterModule \
nsMsgComposeModule \
local_mail_services \
nsComm4xMailImportModule \
$(NULL)
ifdef USE_SHORT_LIBNAME
MOZ_META_COMPONENTS_mail_comps += emitter msgcompo msglocal
ifeq ($(OS_ARCH),WINNT)
MOZ_META_COMPONENTS_mail_comps += impComm4xMail
else
MOZ_META_COMPONENTS_mail_comps += imp4Mail
endif
else
MOZ_META_COMPONENTS_mail_comps += mimeemitter msgcompose localmail impComm4xMail
endif
ifdef MOZ_PSM
MOZ_META_COMPONENTS_mail += nsMsgSMIMEModule
MOZ_META_COMPONENTS_mail_comps += msgsmime
else
MOZ_META_COMPONENTS_mail += nsSMIMEModule
MOZ_META_COMPONENTS_mail_comps += smimestb
endif
MOZ_META_COMPONENTS_crypto = BOOT PKI NSS
MOZ_META_COMPONENTS_crypto_comps = pipboot pippki pipnss
# If we're applying MOZ_PROFILE_GENERATE to a non-static build, then we
# need to create a static build _with_ PIC. This allows us to generate
# profile data that will still be valid when the object files are linked into
@ -480,7 +390,7 @@ endif
# the module is built static.
ifdef IS_COMPONENT
ifneq (,$(MOZ_STATIC_COMPONENT_LIBS)$(findstring $(LIBRARY_NAME), $(MOZ_STATIC_COMPONENTS)))
ifneq (,$(MOZ_STATIC_COMPONENT_LIBS))
ifdef MODULE_NAME
DEFINES += -DXPCOM_TRANSLATE_NSGM_ENTRY_POINT=1
FORCE_STATIC_LIB=1
@ -489,25 +399,21 @@ endif
endif
# Determine if module being compiled is destined
# to be merged into a meta module in the future
# to be merged into libxul
ifneq (, $(findstring $(META_COMPONENT), $(MOZ_META_COMPONENTS)))
ifdef MOZ_ENABLE_LIBXUL
ifdef LIBXUL_LIBRARY
ifdef IS_COMPONENT
ifdef MODULE_NAME
DEFINES += -DXPCOM_TRANSLATE_NSGM_ENTRY_POINT=1
else
$(error Component makefile doesn't specify MODULE_NAME.)
endif
endif
EXPORT_LIBRARY=
FORCE_STATIC_LIB=1
_ENABLE_PIC=1
endif
#
# Force PIC if we're generating the mozcomps meta module
#
ifneq (,$(findstring mozcomps, $(MOZ_META_COMPONENTS)))
_ENABLE_PIC=1
endif
ifdef STATIC_BUILD_PIC
@ -553,20 +459,6 @@ ifdef MOZ_PROFILE_USE
DSO_PIC_CFLAGS += $(PROFILE_USE_CFLAGS)
endif
# Force _all_ exported methods to be |_declspec(dllexport)| when we're
# building them into the executable.
ifeq ($(OS_ARCH),WINNT)
ifdef MOZ_STATIC_COMPONENT_LIBS
DEFINES += \
-D_IMPL_NS_GFX \
-D_IMPL_NS_MSG_BASE \
-D_IMPL_NS_WIDGET \
$(NULL)
endif
endif
#
# Personal makefile customizations go in these optional make include files.
#
@ -601,7 +493,7 @@ CXXFLAGS = $(OS_CXXFLAGS)
LDFLAGS = $(OS_LDFLAGS)
# Allow each module to override the *default* optimization settings
# by setting MODULE_OPTIMIZE_FLAGS iff the developer has not given
# by setting MODULE_OPTIMIZE_FLAGS if the developer has not given
# arguments to --enable-optimize
ifdef MOZ_OPTIMIZE
ifeq (1,$(MOZ_OPTIMIZE))

View File

@ -592,7 +592,8 @@ MOZ_PNG_CFLAGS=
MOZ_PNG_LIBS='-L$(DIST)/lib -lmozpng'
MOZ_JS_LIBS='-L$(DIST)/bin -lmozjs'
XPCOM_LIBS='-L$(DIST)/bin -lxpcom -lxpcom_core'
DYNAMIC_XPCOM_LIBS='-L$(DIST)/bin -lxpcom -lxpcom_core'
LIBXUL_LIBS='-L$(DIST)/bin -lxpcom -lxul'
MOZ_COMPONENT_NSPR_LIBS='-L$(DIST)/bin $(NSPR_LIBS)'
MOZ_XPCOM_OBSOLETE_LIBS='-L$(DIST)/lib -lxpcom_compat'
@ -1161,7 +1162,8 @@ case "$target" in
MOZ_ZLIB_LIBS='-L$(DIST)/lib -lmozz'
MOZ_PNG_LIBS='-L$(DIST)/lib -lpng'
MOZ_JS_LIBS='-L$(DIST)/lib -ljs$(MOZ_BITS)$(VERSION_NUMBER)'
XPCOM_LIBS='-L$(DIST)/lib -lxpcom -lxpcom_core'
DYNAMIC_XPCOM_LIBS='-L$(DIST)/lib -lxpcom -lxpcom_core'
LIBXUL_LIBS='-L$(DIST)/lib -lxpcom -lxul'
DLL_PREFIX=
IMPORT_LIB_SUFFIX=dll.a
else
@ -1197,7 +1199,8 @@ case "$target" in
MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.lib'
MOZ_PNG_LIBS='$(DIST)/lib/png.lib'
MOZ_JS_LIBS='$(DIST)/lib/js$(MOZ_BITS)$(VERSION_NUMBER).lib'
XPCOM_LIBS='$(DIST)/lib/xpcom.lib $(DIST)/lib/xpcom_core.lib'
DYNAMIC_XPCOM_LIBS='$(DIST)/lib/xpcom.lib $(DIST)/lib/xpcom_core.lib'
LIBXUL_LIBS='$(DIST)/lib/xpcom.lib $(DIST)/lib/xul.lib'
MOZ_COMPONENT_NSPR_LIBS='$(NSPR_LIBS)'
MOZ_XPCOM_OBSOLETE_LIBS='$(DIST)/lib/xpcom_compat.lib'
fi
@ -1441,7 +1444,8 @@ case "$target" in
MOZ_WIDGET_TOOLKIT_LDFLAGS='-lwdgt$(MOZ_WIDGET_TOOLKIT)'
MOZ_GFX_TOOLKIT_LDFLAGS='-lgfx_$(MOZ_GFX_TOOLKIT)'
MOZ_XPCOM_OBSOLETE_LIBS='-L$(DIST)/lib $(DIST)/lib/xpcomct.lib'
XPCOM_LIBS='-L$(DIST)/lib $(DIST)/lib/xpcom.lib $(DIST)/lib/xpcomcor.lib'
DYNAMIC_XPCOM_LIBS='-L$(DIST)/lib $(DIST)/lib/xpcom.lib $(DIST)/lib/xpcomcor.lib'
LIBXUL_LIBS='-L$(DIST)/lib $(DIST)/lib/xpcom.lib $(DIST)/lib/xul.lib'
# GCC for OS/2 currently predefines these, but we don't want them
_DEFINES_CFLAGS="$_DEFINES_CFLAGS -Uunix -U__unix -U__unix__"
@ -1484,7 +1488,8 @@ case "$target" in
MKCSHLIB='$(LD) $(DSO_LDOPTS)'
MOZ_JS_LIBS='$(DIST)/lib/mozjs.lib'
MOZ_XPCOM_OBSOLETE_LIBS='$(DIST)/lib/xpcomct.lib'
XPCOM_LIBS='$(DIST)/lib/xpcom.lib $(DIST)/lib/xpcomcor.lib'
DYNAMIC_XPCOM_LIBS='$(DIST)/lib/xpcom.lib $(DIST)/lib/xpcomcor.lib'
LIBXUL_LIBS='$(DIST)/lib/xpcom.lib $(DIST)/lib/xul.lib'
MOZ_JPEG_LIBS='$(DIST)/lib/mozjpeg.$(LIB_SUFFIX)'
MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.$(LIB_SUFFIX)'
MOZ_PNG_LIBS='$(DIST)/lib/mozpng.$(LIB_SUFFIX)'
@ -2441,7 +2446,8 @@ AC_CACHE_CHECK(
)
if test "$ac_cv_func_iconv" = "yes"; then
AC_DEFINE(HAVE_ICONV)
XPCOM_LIBS="$XPCOM_LIBS $_ICONV_LIBS"
DYNAMIC_XPCOM_LIBS="$DYNAMIC_XPCOM_LIBS $_ICONV_LIBS"
LIBXUL_LIBS="$LIBXUL_LIBS $_ICONV_LIBS"
LIBICONV="$_ICONV_LIBS"
AC_CACHE_CHECK(
[for iconv() with const input],
@ -3436,6 +3442,7 @@ MOZ_SINGLE_PROFILE=
MOZ_PROFILESHARING=1
MOZ_IPCD=
MOZ_PROFILELOCKING=1
MOZ_ENABLE_LIBXUL=
MOZ_ARG_ENABLE_STRING(application,
[ --enable-application=APP
@ -3512,7 +3519,8 @@ xulrunner)
MOZ_APP_NAME=xulrunner
MOZ_APP_DISPLAYNAME=Mozilla
MOZ_XUL_APP=1
MOZ_XULRUNNER=1
MOZ_XULRUNNER=1
MOZ_ENABLE_LIBXUL=1
MOZ_APP_VERSION=`cat $topsrcdir/xulrunner/config/version.txt`
MOZ_EXTENSIONS_DEFAULT=" xml-rpc xmlextras pref transformiix universalchardet webservices gnomevfs negotiateauth"
AC_DEFINE(MOZ_XULRUNNER)
@ -5433,6 +5441,27 @@ if (test -z "$BUILD_SHARED_LIBS" && test -z "$BUILD_STATIC_LIBS") ||
AC_MSG_ERROR([Only one of --enable-shared or --enable-static must be specified.])
fi
MOZ_ARG_ENABLE_BOOL(libxul,
[ --enable-libxul Enable building of libxul],
MOZ_ENABLE_LIBXUL=1,
MOZ_ENABLE_LIBXUL=)
if test -n "$MOZ_ENABLE_LIBXUL" -a -n "$BUILD_STATIC_LIBS"; then
AC_MSG_ERROR([--enable-libxul is not compatible with --enable-static])
fi
if test -n "$MOZ_ENABLE_LIBXUL" -a -z "$MOZ_XUL_APP"; then
AC_MSG_ERROR([--enable-libxul is only compatible with toolkit XUL applications.])
fi
if test -n "$MOZ_ENABLE_LIBXUL"; then
XPCOM_LIBS="$LIBXUL_LIBS"
AC_DEFINE(MOZ_ENABLE_LIBXUL)
MOZ_ZLIB_LIBS=
else
XPCOM_LIBS="$DYNAMIC_XPCOM_LIBS"
fi
dnl ========================================================
dnl static component loader
dnl ========================================================
@ -5446,40 +5475,6 @@ if test -n "$MOZ_STATIC_COMPONENT_LOADER"; then
AC_DEFINE(ENABLE_STATIC_COMPONENT_LOADER)
fi
dnl ========================================================
dnl Generate static component from list of modules
dnl ========================================================
MOZ_ARG_ENABLE_STRING(meta-component-modules,
[ --enable-meta-component-modules=mod1[,mod2]
Build single meta-component from specified modules],
[ MOZ_STATIC_COMPONENTS=`echo $enableval | sed 's/,/ /g'` ] )
dnl ========================================================
dnl Enable the use of predefined meta components
dnl ========================================================
MOZ_ARG_ENABLE_STRING(meta-components,
[ --enable-meta-components
Build predefined meta-components],
[ MOZ_META_COMPONENTS=`echo $enableval | sed 's/,/ /g'` ] )
if test -n "$MOZ_STATIC_COMPONENTS" && test -n "$MOZ_META_COMPONENTS"; then
AC_MSG_ERROR([Simultaneous use of meta-module-components & meta-components is not supported.])
fi
MOZ_COMPONENTLIB=
MOZ_ARG_ENABLE_BOOL(componentlib,
[ --enable-componentlib Build a shared library containing all of the components],
MOZ_COMPONENTLIB=1,
MOZ_COMPONENTLIB= )
AC_SUBST(MOZ_COMPONENTLIB)
if test "$MOZ_COMPONENTLIB"; then
BUILD_SHARED_LIBS=
BUILD_STATIC_LIBS=1
MOZ_STATIC_COMPONENT_LIBS=1
MOZ_META_COMPONENTS=mozcomps
fi
dnl ========================================================
dnl =
dnl = Standalone module options
@ -5910,8 +5905,7 @@ AC_SUBST(BUILD_SHARED_LIBS)
AC_SUBST(BUILD_STATIC_LIBS)
AC_SUBST(MOZ_STATIC_COMPONENT_LOADER)
AC_SUBST(MOZ_STATIC_COMPONENT_LIBS)
AC_SUBST(MOZ_STATIC_COMPONENTS)
AC_SUBST(MOZ_META_COMPONENTS)
AC_SUBST(MOZ_ENABLE_LIBXUL)
AC_SUBST(ENABLE_TESTS)
AC_SUBST(IBMBIDI)
AC_SUBST(SUNCTL)

View File

@ -30,14 +30,20 @@ include $(srcdir)/objs.mk
MODULE = zlib
LIBRARY_NAME = mozz
GRE_MODULE = 1
LIBXUL_LIBRARY = 1
PACKAGE_FILE = zlib.pkg
ifndef MOZ_ENABLE_LIBXUL
ifeq ($(OS_ARCH),WINNT)
ifndef GNU_CC
MAPFILE = $(LIBRARY_NAME).map
DEFFILE = $(srcdir)/zlib.def
endif
endif
endif
ifeq ($(OS_ARCH),WINNT)
DEFINES += -DZLIB_DLL=1
endif
@ -49,5 +55,3 @@ EXPORTS = $(MODULES_ZLIB_SRC_LEXPORTS)
FORCE_USE_PIC = 1
include $(topsrcdir)/config/rules.mk

View File

@ -37,11 +37,9 @@
#ifndef MOZZCONF_H
#define MOZZCONF_H
#ifdef XP_WIN
#ifdef ZLIB_DLL
#if defined(XP_WIN) && defined(ZLIB_DLL) && !defined(MOZ_ENABLE_LIBXUL)
#undef ZLIB_DLL
#endif
#endif
/* Symbols from zlib.def */
#define zlibVersion MOZ_Z_zlibVersion

138
toolkit/library/Makefile.in Normal file
View File

@ -0,0 +1,138 @@
#
# ***** 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
REQUIRES = \
xpcom \
string \
xpcom_obsolete \
zlib \
$(NULL)
CPPSRCS = \
nsStaticXULComponents.cpp \
$(NULL)
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
REQUIRES += libreg
CPPSRCS += \
dlldeps.cpp \
dlldeps-obs.cpp \
dlldeps-zlib.cpp \
$(NULL)
endif
ifeq ($(OS_ARCH),WINNT)
DEFINES += -DZLIB_DLL=1
endif
# dependent libraries
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/$(LIB_PREFIX)xpcom_core.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)xpcom_compat.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)mozz.$(LIB_SUFFIX) \
$(NULL)
# component libraries
SHARED_LIBRARY_LIBS += \
$(DIST)/lib/components/$(LIB_PREFIX)xpcom_compat_c.$(LIB_SUFFIX) \
$(NULL)
include $(topsrcdir)/config/rules.mk
ifdef GC_LEAK_DETECTOR
EXTRA_DSO_LIBS += boehm
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
EXTRA_DSO_LIBS += macmorefiles_s
EXTRA_DSO_LDOPTS += $(EXTRA_DSO_LIBS)
EXTRA_DEPS += $(DIST)/lib/$(LIB_PREFIX)macmorefiles_s.$(LIB_SUFFIX)
endif
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 \
$(NULL)
EXTRA_DSO_LDOPTS += $(NSPR_LIBS)
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
CXXFLAGS += $(TK_CFLAGS)
EXTRA_DSO_LDOPTS += $(TK_LIBS)
endif
ifeq ($(OS_ARCH),BeOS)
EXTRA_DSO_LDOPTS += -lbe
endif
ifeq ($(OS_ARCH),WINNT)
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid)
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
export:: dlldeps.cpp dlldeps-obs.cpp
dlldeps.cpp: $(topsrcdir)/xpcom/build/dlldeps.cpp
$(INSTALL) $^ .
dlldeps-obs.cpp: $(topsrcdir)/xpcom/obsolete/dlldeps-obs.cpp
$(INSTALL) $^ .

View File

@ -0,0 +1,55 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** 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
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2003
* 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 ***** */
// Force references to all of the symbols that we want exported from
// the dll that are located in the .lib files we link with
#define ZLIB_INTERNAL
#include "zlib.h"
void xxxNeverCalledZLib()
{
deflate(0, 0);
deflateInit(0, 0);
deflateInit2(0, 0, 0, 0, 0, 0);
deflateEnd(0);
inflate(0, 0);
inflateInit(0);
inflateInit2(0, 0);
inflateEnd(0);
inflateReset(0);
}

View File

@ -0,0 +1,84 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** 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
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Christopher Seawood <cls@seawood.org>
* Chris Waterson <waterson@netscape.com>
* Benjamin Smedberg <bsmedberg@covad.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either 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 ***** */
#define XPCOM_TRANSLATE_NSGM_ENTRY_POINT 1
#include "nsIGenericFactory.h"
#include "nsStaticComponent.h"
#define NSGETMODULE(_name) _name##_NSGetmodule
#define XUL_MODULES \
MODULE(xpcomObsoleteModule) \
/* end of list */
#define MODULE(_name) \
extern nsModuleInfo NSMODULEINFO(_name); \
extern "C" nsresult \
NSGETMODULE(_name) (nsIComponentManager* aCompMgr, \
nsIFile* aLocation, \
nsIModule** aResult) \
{ return NS_NewGenericModule2(&NSMODULEINFO(_name), aResult); }
XUL_MODULES
#undef MODULE
#define MODULE(_name) { (#_name), NSGETMODULE(_name) },
/**
* The nsStaticModuleInfo
*/
static nsStaticModuleInfo gStaticModuleInfo[] = {
XUL_MODULES
};
/**
* Our NSGetStaticModuleInfoFunc
*/
static nsresult PR_CALLBACK
xul_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count)
{
*info = gStaticModuleInfo;
*count = sizeof(gStaticModuleInfo) / sizeof(gStaticModuleInfo[0]);
return NS_OK;
}
NS_EXPORT NSGetStaticModuleInfoFunc NSGetStaticModuleInfo = &xul_getModuleInfo;

View File

@ -58,10 +58,15 @@ DIRS = \
reflect \
proxy \
build \
stub \
tools \
$(NULL)
ifndef MOZ_ENABLE_LIBXUL
DIRS += \
stub \
tools \
$(NULL)
endif
ifeq ($(OS_ARCH),WINNT)
ifdef MOZ_DEBUG
DIRS += windbgdlg
@ -69,6 +74,7 @@ endif
endif
ifdef ENABLE_TESTS
ifndef MOZ_ENABLE_LIBXUL
DIRS += \
tests \
sample \
@ -77,6 +83,7 @@ DIRS += \
reflect/xptcall/tests \
proxy/tests
endif
endif
# xpcom-config.h is generated by configure
SDK_HEADERS = xpcom-config.h

View File

@ -49,6 +49,7 @@ LIBRARY_NAME = xpcom_core
ifneq ($(OS_ARCH),WINNT)
SHORT_LIBNAME = xpcomcor
endif
LIBXUL_LIBRARY = 1
PACKAGE_FILE = xpcom.pkg
PACKAGE_VARS += USE_SHORT_LIBNAME
@ -75,7 +76,7 @@ CPPSRCS = \
nsStringAPI.cpp \
$(NULL)
ifeq ($(OS_ARCH),WINNT)
ifeq ($(OS_ARCH)$(MOZ_ENABLE_LIBXUL),WINNT)
CPPSRCS += dlldeps.cpp
endif
@ -129,7 +130,9 @@ endif
# Force use of PIC
FORCE_USE_PIC = 1
ifndef MOZ_ENABLE_LIBXUL
FORCE_SHARED_LIB = 1
endif
# UNIX98 iconv support
OS_LIBS += $(LIBICONV)

View File

@ -41,7 +41,6 @@
#include "nsVoidArray.h"
#include "nsValueArray.h"
#include "nsIAtom.h"
//#include "nsIBuffer.h"
#include "nsIByteArrayInputStream.h"
#include "nsFixedSizeAllocator.h"
#include "nsRecyclingAllocator.h"
@ -58,7 +57,6 @@
#include "nsSupportsArray.h"
#include "nsArray.h"
#include "nsArrayEnumerator.h"
#include "nsProxyEventPrivate.h"
#include "nsProxyRelease.h"
#include "xpt_xdr.h"
#include "xptcall.h"
@ -129,7 +127,6 @@ void XXXNeverCalled()
new nsArrayEnumerator(nsnull);
NS_QuickSort(nsnull, 0, 0, nsnull, nsnull);
nsString();
nsProxyObject(nsnull, 0, nsnull);
NS_ProxyRelease(nsnull, nsnull, PR_FALSE);
XPT_DoString(nsnull, nsnull, nsnull);
XPT_DoHeader(nsnull, nsnull, nsnull);

View File

@ -106,7 +106,9 @@ info_InitEntry(PLDHashTable *table, PLDHashEntryHdr *entry, const void *key)
NS_IMPL_THREADSAFE_ISUPPORTS1(nsStaticComponentLoader, nsIComponentLoader)
#ifndef MOZ_ENABLE_LIBXUL
NS_COM NSGetStaticModuleInfoFunc NSGetStaticModuleInfo;
#endif
nsresult
nsStaticComponentLoader::GetModuleInfo()

View File

@ -49,6 +49,7 @@ SHORT_LIBNAME = xpcomct
endif
GRE_MODULE = 1
LIBXUL_LIBRARY = 1
PACKAGE_FILE = xpcomobsolete.pkg
DIRS = component
@ -72,8 +73,10 @@ CPPSRCS = \
ifeq ($(OS_ARCH),WINNT)
REQUIRES += libreg
ifndef MOZ_ENABLE_LIBXUL
CPPSRCS += dlldeps-obs.cpp
endif
endif
EXPORTS = \
xpcomobsolete.h \
@ -100,7 +103,9 @@ SHARED_LIBRARY_LIBS = \
$(NULL)
# due to symbol conflicts on win32, this needs to be shared
ifndef MOZ_ENABLE_LIBXUL
FORCE_SHARED_LIB = 1
endif
include $(topsrcdir)/config/rules.mk

View File

@ -54,6 +54,7 @@ EXPORT_LIBRARY = 1
endif
IS_COMPONENT = 1
GRE_MODULE = 1
LIBXUL_LIBRARY = 1
PACKAGE_FILE = xpcomobsoletec.pkg
@ -77,5 +78,4 @@ EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) \
$(MOZ_XPCOM_OBSOLETE_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -41,7 +41,7 @@
#include "nsFileSpec.h"
#include "NSReg.h"
void XXXNeverCalled()
void XXXNeverCalled_obsolete()
{
nsFileURL(NULL);
nsFileSpec s;

View File

@ -42,9 +42,9 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = xpcom
MODULE = xpcom_tests
XPIDL_MODULE = proxytest
REQUIRES = $(NULL)
REQUIRES = xpcom
CPPSRCS = proxytests.cpp
XPIDLSRCS = nsITestProxy.idl
@ -57,4 +57,3 @@ LIBS = \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -80,11 +80,15 @@ FORCE_USE_PIC = 1
FORCE_SHARED_LIB = 1
ifdef MOZ_ENABLE_LIBXUL
EXTRA_DSO_LIBS = xul
else
ifeq ($(OS_TARGET),OS2)
EXTRA_DSO_LIBS = xpcomcor
else
EXTRA_DSO_LIBS = xpcom_core
endif
endif
EXTRA_DSO_LDOPTS = $(LIBS_DIR) $(EXTRA_DSO_LIBS) $(NSPR_LIBS)
include $(topsrcdir)/config/rules.mk

View File

@ -47,8 +47,13 @@ include $(DEPTH)/config/autoconf.mk
MODULE = xpinstall
LIBRARY_NAME = xpinstall
# Do not set EXPORT_LIBRARY as we do not want xpinstall in the static libs list
#EXPORT_LIBRARY = 1
ifndef MOZ_ENABLE_LIBXUL
# Make this a true dynamic component even in static builds because
# this component is shared by installer
FORCE_SHARED_LIB = 1
MOZ_STATIC_COMPONENT_LIBS=
endif
SHORT_LIBNAME = xpinstal
IS_COMPONENT = 1
MODULE_NAME = nsSoftwareUpdate
@ -151,24 +156,22 @@ EXTRA_DSO_LDOPTS = \
$(EXTRA_DSO_LIBS) \
$(MOZ_JS_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_XPCOM_OBSOLETE_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
$(ZLIB_LIBS) \
$(NULL)
ifndef MOZ_ENABLE_LIBXUL
EXTRA_DSO_LDOPTS += \
$(MOZ_XPCOM_OBSOLETE_LIBS) \
$(NULL)
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
EXTRA_DSO_LDOPTS += $(TK_LIBS)
endif
# Make this a true dynamic component even in static builds because
# this component is shared by installer
FORCE_SHARED_LIB = 1
MOZ_STATIC_COMPONENT_LIBS=
include $(topsrcdir)/config/rules.mk
ifeq ($(OS_ARCH),WINNT)
ifeq ($(OS_ARCH)$(MOZ_ENABLE_LIBXUL),WINNT)
DEFINES += -DZLIB_DLL
endif