diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index 11d8578a39f..ab3904bc923 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -162,16 +162,9 @@ else SDK_LIBRARY = $(SHARED_LIBRARY) endif -include $(topsrcdir)/config/rules.mk - -export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS) - $(INSTALL) $^ . - EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -ifdef MOZ_ENABLE_LIBXUL -include $(srcdir)/libxul-rules.mk -else +ifndef MOZ_ENABLE_LIBXUL EXTRA_DSO_LDOPTS += \ $(MOZ_COMPONENT_LIBS) \ $(MOZ_JS_LIBS) \ @@ -239,27 +232,26 @@ EXTRA_DSO_LDOPTS += -lbe -ltracker endif ifeq ($(OS_ARCH),SunOS) -EXTRA_DSO_LDOPTS += -lelf -ldemangle -lCstd +EXTRA_DSO_LDOPTS += -lelf -ldemangle endif ifeq ($(OS_ARCH),WINNT) -EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32 imm32 winmm wsock32 msimg32 shlwapi) +OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32 imm32 winmm wsock32 msimg32 shlwapi) ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC)) -EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp) +OS_LIBS += $(call EXPAND_LIBNAME,imagehlp) endif endif # WINNT ifeq ($(OS_ARCH),WINCE) -EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, aygshell uuid ole32 oleaut32 Ws2 ddraw) -EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, ceosutil libcmt comsuppw) +OS_LIBS += $(call EXPAND_LIBNAME, aygshell uuid ole32 oleaut32 Ws2 ddraw) +OS_LIBS += $(call EXPAND_LIBNAME, ceosutil libcmt comsuppw) ifdef WINCE_WINDOWS_MOBILE -EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, cellcore) +OS_LIBS += $(call EXPAND_LIBNAME, cellcore) endif ifdef HAS_OGLES -EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, libGLESv2 libEGL) +OS_LIBS += $(call EXPAND_LIBNAME, libGLESv2 libEGL) endif endif - ifdef MOZ_JPROF EXTRA_DSO_LDOPTS += -ljprof endif @@ -268,6 +260,15 @@ ifdef MOZ_ENABLE_QT EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS) endif +include $(topsrcdir)/config/rules.mk + +export:: $(RDF_UTIL_SRC_CPPSRCS) $(INTL_UNICHARUTIL_UTIL_CPPSRCS) + $(INSTALL) $^ . + +ifdef MOZ_ENABLE_LIBXUL +include $(srcdir)/libxul-rules.mk +endif + ifdef MOZ_JAVAXPCOM dlldeps-javaxpcom.cpp: $(topsrcdir)/extensions/java/xpcom/src/dlldeps-javaxpcom.cpp $(INSTALL) $^ . diff --git a/toolkit/library/libxul-config.mk b/toolkit/library/libxul-config.mk index 31909fdabb6..67ff6f215ef 100644 --- a/toolkit/library/libxul-config.mk +++ b/toolkit/library/libxul-config.mk @@ -346,5 +346,31 @@ COMPONENT_LIBS += gkdebug endif ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) -EXTRA_DSO_LDOPTS += -framework OpenGL +EXTRA_DSO_LDOPTS += -framework OpenGL -lcups +endif + +EXTRA_DSO_LDOPTS += \ + $(LIBS_DIR) \ + $(JPEG_LIBS) \ + $(PNG_LIBS) \ + $(QCMS_LIBS) \ + $(MOZ_JS_LIBS) \ + $(NSS_LIBS) \ + $(MOZ_CAIRO_LIBS) \ + $(NULL) + +ifdef MOZ_NATIVE_ZLIB +EXTRA_DSO_LDOPTS += $(ZLIB_LIBS) +else +EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS) +endif + +ifdef MOZ_NATIVE_HUNSPELL +EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS) +endif + +ifdef MOZ_SYDNEYAUDIO +ifeq ($(OS_ARCH),Linux) +EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) +endif endif diff --git a/toolkit/library/libxul-rules.mk b/toolkit/library/libxul-rules.mk index 91262984d46..d30ce5394fa 100644 --- a/toolkit/library/libxul-rules.mk +++ b/toolkit/library/libxul-rules.mk @@ -36,26 +36,6 @@ # # ***** END LICENSE BLOCK ***** -EXTRA_DSO_LDOPTS += \ - $(LIBS_DIR) \ - $(JPEG_LIBS) \ - $(PNG_LIBS) \ - $(QCMS_LIBS) \ - $(MOZ_JS_LIBS) \ - $(NSS_LIBS) \ - $(MOZ_CAIRO_LIBS) \ - $(NULL) - -ifdef MOZ_NATIVE_ZLIB -EXTRA_DSO_LDOPTS += $(ZLIB_LIBS) -else -EXTRA_DSO_LDOPTS += $(MOZ_ZLIB_LIBS) -endif - -ifdef MOZ_NATIVE_HUNSPELL -EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS) -endif - # need widget/src/windows for resource.h (included from widget.rc) LOCAL_INCLUDES += \ -I$(topsrcdir)/config \ @@ -79,15 +59,6 @@ ifneq ($(OS_ARCH),WINCE) OS_LIBS += $(call EXPAND_LIBNAME,usp10 oleaut32) endif endif -ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) -EXTRA_DSO_LDOPTS += -lcups -endif - -ifdef MOZ_SYDNEYAUDIO -ifeq ($(OS_ARCH),Linux) -EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) -endif -endif export:: dlldeps.cpp diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in index edc68ff0952..6b3be0703d7 100644 --- a/xpcom/build/Makefile.in +++ b/xpcom/build/Makefile.in @@ -174,14 +174,14 @@ endif endif ifeq ($(OS_ARCH),WINNT) -EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version) +OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version) ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC)) -EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp) +OS_LIBS += $(call EXPAND_LIBNAME,imagehlp) endif endif # WINNT ifeq ($(OS_ARCH),WINCE) -EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,ole32) +OS_LIBS += $(call EXPAND_LIBNAME,ole32) endif # WINCE export:: $(XPCOM_GLUE_SRC_CSRCS) $(XPCOM_GLUE_SRC_CPPSRCS) $(XPCOM_GLUENS_SRC_CPPSRCS)