diff --git a/config/rules.mk b/config/rules.mk index 151f37921ee..72823847a13 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -84,6 +84,9 @@ else _VPATH_SRCS = $< endif +# Add $(DIST)/lib to VPATH so that -lfoo dependencies are followed +VPATH += $(DIST)/lib + ifdef _LIBNAME_RELATIVE_PATHS EXPAND_LIBNAME = $(addsuffix .$(LIB_SUFFIX),$(1)) EXPAND_MOZLIBNAME = $(addsuffix .$(LIB_SUFFIX),$(addprefix $(DIST)/lib/$(LIB_PREFIX),$(1))) @@ -632,10 +635,10 @@ endif # IS_COMPONENT endif # EXPORT_LIBRARY endif # LIBRARY_NAME -# Create dependencies on static libraries +# Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(LIBS)) HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(HOST_LIBS)) -DSO_LDOPTS_DEPS = $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS)) +DSO_LDOPTS_DEPS = $(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS)) ############################################## libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(HOST_PROGRAM) $(PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS) $(MAPS) @@ -1732,6 +1735,9 @@ ifneq (,$(MOZ_DEBUG)$(MOZ_PROFILE)$(MOZ_COVERAGE)) endif endif +# Properly set LIBPATTERNS for the platform +.LIBPATTERNS = $(if $(IMPORT_LIB_SUFFIX),$(LIB_PREFIX)%.$(IMPORT_LIB_SUFFIX)) $(LIB_PREFIX)%.$(LIB_SUFFIX) $(DLL_PREFIX)%$(DLL_SUFFIX) + tags: TAGS TAGS: $(SUBMAKEFILES) $(CSRCS) $(CPPSRCS) $(wildcard *.h) diff --git a/gfx/src/ps/Makefile.in b/gfx/src/ps/Makefile.in index b7c4fe8e0a9..9eb3646ee4b 100644 --- a/gfx/src/ps/Makefile.in +++ b/gfx/src/ps/Makefile.in @@ -49,7 +49,7 @@ IS_COMPONENT = 1 MODULE_NAME = nsGfxPSModule GRE_MODULE = 1 LIBXUL_LIBRARY = 1 -EXTRA_DSO_LIBS = mozutil_s +EXTRA_DSO_LIBS = mozutil_s gfxshared_s gfxpsshar gkgfx REQUIRES = xpcom \ string \ widget \ @@ -62,7 +62,6 @@ REQUIRES = xpcom \ imglib2 \ unicharutil \ $(NULL) -EXTRA_DSO_LIBS += gkgfx CPPSRCS = \ nsDeviceContextPS.cpp \ @@ -89,10 +88,7 @@ EXPORT_RESOURCE = \ $(srcdir)/sample.unixpsfonts.properties EXTRA_DSO_LDOPTS = \ - -L$(DIST)/bin \ - -L$(DIST)/lib \ - -lgfxshared_s \ - -lgfxpsshar \ + $(LIBS_DIR) \ $(EXTRA_DSO_LIBS) \ $(MOZ_COMPONENT_LIBS) \ $(MOZ_UNICHARUTIL_LIBS) \