From 26c32e28f60cd17c45f52ca0e2f248223b5c8ef2 Mon Sep 17 00:00:00 2001 From: "cls%seawood.org" Date: Tue, 18 Apr 2006 15:52:41 +0000 Subject: [PATCH] Allow libxul to link in mingw builds. Bug #334403 r=bsmedberg git-svn-id: svn://10.0.0.236/trunk@194606 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/intl/unicharutil/util/Makefile.in | 9 ++--- mozilla/intl/unicharutil/util/objs.mk | 42 +++++++++++++++++++++++ mozilla/parser/xml/src/Makefile.in | 1 + mozilla/rdf/build/Makefile.in | 5 +++ mozilla/rdf/util/src/Makefile.in | 6 +++- mozilla/rdf/util/src/objs.mk | 41 ++++++++++++++++++++++ mozilla/toolkit/library/Makefile.in | 33 +++++++++++++++--- mozilla/toolkit/library/libxul-config.mk | 1 - mozilla/toolkit/library/libxul-rules.mk | 2 +- 9 files changed, 128 insertions(+), 12 deletions(-) create mode 100644 mozilla/intl/unicharutil/util/objs.mk create mode 100644 mozilla/rdf/util/src/objs.mk diff --git a/mozilla/intl/unicharutil/util/Makefile.in b/mozilla/intl/unicharutil/util/Makefile.in index 1c344ca74b3..389fa5ab59a 100644 --- a/mozilla/intl/unicharutil/util/Makefile.in +++ b/mozilla/intl/unicharutil/util/Makefile.in @@ -42,6 +42,10 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk +include $(srcdir)/objs.mk + +EXTRA_DEPS += $(srcdir)/objs.mk + MODULE=unicharutil LIBRARY_NAME=unicharutil_s EXPORT_LIBRARY=1 @@ -58,10 +62,7 @@ EXPORTS = \ nsCompressedCharMap.h \ $(NULL) -CPPSRCS = \ - nsUnicharUtils.cpp \ - nsCompressedCharMap.cpp \ - $(NULL) +CPPSRCS = $(INTL_UNICHARUTIL_UTIL_LCPPSRCS) FORCE_STATIC_LIB = 1 FORCE_USE_PIC = 1 diff --git a/mozilla/intl/unicharutil/util/objs.mk b/mozilla/intl/unicharutil/util/objs.mk new file mode 100644 index 00000000000..e97753f3867 --- /dev/null +++ b/mozilla/intl/unicharutil/util/objs.mk @@ -0,0 +1,42 @@ +# ***** 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. +# +# The Initial Developer of the Original Code is +# Netscape Communications Corporation. +# Portions created by the Initial Developer are Copyright (C) 2002 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# +# 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 ***** + +INTL_UNICHARUTIL_UTIL_LCPPSRCS = \ + nsUnicharUtils.cpp \ + nsCompressedCharMap.cpp \ + $(NULL) + +INTL_UNICHARUTIL_UTIL_CPPSRCS = $(addprefix $(topsrcdir)/intl/unicharutil/util/, $(INTL_UNICHARUTIL_UTIL_LCPPSRCS)) diff --git a/mozilla/parser/xml/src/Makefile.in b/mozilla/parser/xml/src/Makefile.in index 6ec335a08fb..5f908d84774 100644 --- a/mozilla/parser/xml/src/Makefile.in +++ b/mozilla/parser/xml/src/Makefile.in @@ -45,6 +45,7 @@ MODULE = xml LIBRARY_NAME = saxp MOZILLA_INTERNAL_API = 1 +LIBXUL_LIBRARY = 1 REQUIRES = \ necko \ diff --git a/mozilla/rdf/build/Makefile.in b/mozilla/rdf/build/Makefile.in index 5346ca6f176..2f3d53b97c3 100644 --- a/mozilla/rdf/build/Makefile.in +++ b/mozilla/rdf/build/Makefile.in @@ -70,8 +70,13 @@ CPPSRCS = \ SHARED_LIBRARY_LIBS = \ ../base/src/$(LIB_PREFIX)rdfbase_s.$(LIB_SUFFIX) \ ../datasource/src/$(LIB_PREFIX)rdfdatasource_s.$(LIB_SUFFIX) \ + $(NULL) + +ifndef MOZ_ENABLE_LIBXUL +SHARED_LIBRARY_LIBS += \ ../util/src/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \ $(NULL) +endif EXTRA_DSO_LDOPTS = \ $(LIBS_DIR) \ diff --git a/mozilla/rdf/util/src/Makefile.in b/mozilla/rdf/util/src/Makefile.in index f1354d78b91..de1db18dd0b 100644 --- a/mozilla/rdf/util/src/Makefile.in +++ b/mozilla/rdf/util/src/Makefile.in @@ -42,6 +42,10 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk +include $(srcdir)/objs.mk + +EXTRA_DEPS += $(srcdir)/objs.mk + MODULE = rdfutil LIBRARY_NAME = rdfutil_s MOZILLA_INTERNAL_API = 1 @@ -51,7 +55,7 @@ REQUIRES = xpcom \ rdf \ $(NULL) -CPPSRCS = nsRDFResource.cpp +CPPSRCS = $(RDF_UTIL_SRC_LCPPSRCS) # we don't want the shared lib, but we want to force the creation of a static lib. FORCE_STATIC_LIB = 1 diff --git a/mozilla/rdf/util/src/objs.mk b/mozilla/rdf/util/src/objs.mk new file mode 100644 index 00000000000..9c4fa0181ab --- /dev/null +++ b/mozilla/rdf/util/src/objs.mk @@ -0,0 +1,41 @@ +# ***** 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. +# +# The Initial Developer of the Original Code is +# Netscape Communications Corporation. +# Portions created by the Initial Developer are Copyright (C) 2002 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# +# 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 ***** + +RDF_UTIL_SRC_LCPPSRCS = \ + nsRDFResource.cpp \ + $(NULL) + +RDF_UTIL_SRC_CPPSRCS = $(addprefix $(topsrcdir)/rdf/util/src/, $(RDF_UTIL_SRC_LCPPSRCS)) diff --git a/mozilla/toolkit/library/Makefile.in b/mozilla/toolkit/library/Makefile.in index 3e1b3457ea3..a8748c7378d 100644 --- a/mozilla/toolkit/library/Makefile.in +++ b/mozilla/toolkit/library/Makefile.in @@ -42,6 +42,9 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk +include $(topsrcdir)/rdf/util/src/objs.mk +include $(topsrcdir)/intl/unicharutil/util/objs.mk + MODULE = libxul LIBRARY_NAME = xul FORCE_USE_PIC = 1 @@ -83,8 +86,8 @@ endif 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)) \ + $(foreach lib,$(STATIC_LIBS),$(DIST)/lib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \ $(NULL) ifdef MOZ_JAVAXPCOM @@ -108,11 +111,34 @@ include $(srcdir)/libxul-config.mk EXTRA_DEPS += \ $(srcdir)/libxul-config.mk \ $(srcdir)/libxul-rules.mk \ + $(topsrcdir)/rdf/util/src/objs.mk \ + $(topsrcdir)/intl/unicharutil/util/objs.mk \ + $(NULL) + +REQUIRES += \ + rdf \ + rdfutil \ + uconv \ + unicharutil \ + $(NULL) + +CPPSRCS += \ + $(RDF_UTIL_SRC_LCPPSRCS) \ + $(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \ + $(NULL) + +GARBAGE += \ + $(RDF_UTIL_SRC_LCPPSRCS) \ + $(INTL_UNICHARUTIL_UTIL_LCPPSRCS) \ + $(wildcard *.$(OBJ_SUFFIX)) \ $(NULL) endif include $(topsrcdir)/config/rules.mk +export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS) + $(INSTALL) $^ . + EXTRA_DSO_LDOPTS += $(EXTRA_DSO_LIBS) ifdef MOZ_ENABLE_LIBXUL @@ -159,13 +185,10 @@ EXTRA_DSO_LDOPTS += -lbe -ltracker endif ifeq ($(OS_ARCH),WINNT) -EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32 imm32) +EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32 imm32 winmm wsock32) 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 ifdef MOZ_JAVAXPCOM diff --git a/mozilla/toolkit/library/libxul-config.mk b/mozilla/toolkit/library/libxul-config.mk index 5a2684879fc..1851e2a788d 100644 --- a/mozilla/toolkit/library/libxul-config.mk +++ b/mozilla/toolkit/library/libxul-config.mk @@ -83,7 +83,6 @@ endif STATIC_LIBS += \ xpcom_core \ mozreg_s \ - unicharutil_s \ ucvutil_s \ gkgfx \ gfxshared_s \ diff --git a/mozilla/toolkit/library/libxul-rules.mk b/mozilla/toolkit/library/libxul-rules.mk index af0d32fee5c..12c7f6e02d2 100644 --- a/mozilla/toolkit/library/libxul-rules.mk +++ b/mozilla/toolkit/library/libxul-rules.mk @@ -71,7 +71,7 @@ DEFINES += \ ifdef MOZ_ENABLE_CAIRO_GFX ifeq ($(MOZ_WIDGET_TOOLKIT),windows) -OS_LIBS += usp10.lib +OS_LIBS += $(call EXPAND_LIBNAME,usp10) endif ifneq (,$(filter $(MOZ_GFX_TOOLKIT),mac cocoa)) ifdef MOZ_ENABLE_GLITZ