diff --git a/memory/jemalloc/Makefile.in b/memory/jemalloc/Makefile.in index 71d03d92ef8c..456d48977ca8 100644 --- a/memory/jemalloc/Makefile.in +++ b/memory/jemalloc/Makefile.in @@ -99,7 +99,12 @@ LIBRARY_NAME = jemalloc # Build jemalloc as a shared lib. This is mandatory for Darwin, since a library # init function is used on that platform. +ifeq ($(OS_ARCH),Darwin) FORCE_SHARED_LIB= 1 +else +DIST_INSTALL = 1 +FORCE_STATIC_LIB= 1 +endif CSRCS = \ jemalloc.c \ diff --git a/xulrunner/app/Makefile.in b/xulrunner/app/Makefile.in index 83a5d236af61..f4ab6fe9418b 100644 --- a/xulrunner/app/Makefile.in +++ b/xulrunner/app/Makefile.in @@ -174,6 +174,12 @@ endif RCFLAGS += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\" endif +ifdef MOZ_MEMORY +ifneq ($(OS_ARCH),WINNT) +LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc) +endif +endif + include $(topsrcdir)/config/rules.mk DEFINES += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\" diff --git a/xulrunner/stub/Makefile.in b/xulrunner/stub/Makefile.in index 880606808d74..3e953f2349a7 100644 --- a/xulrunner/stub/Makefile.in +++ b/xulrunner/stub/Makefile.in @@ -97,6 +97,12 @@ ifdef _MSC_VER WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup endif +ifdef MOZ_MEMORY +ifneq ($(OS_ARCH),WINNT) +LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc) +endif +endif + include $(topsrcdir)/config/rules.mk ifeq ($(OS_ARCH),WINNT)