From 420da0d96df8a1122708984ceb52b60feb720206 Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Sun, 6 Jun 2004 22:40:42 +0000 Subject: [PATCH] Bug #245430 --> static build work for Thunderbird --- mail/app/Makefile.in | 53 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/mail/app/Makefile.in b/mail/app/Makefile.in index 29e7b3992f3f..bf70464af758 100644 --- a/mail/app/Makefile.in +++ b/mail/app/Makefile.in @@ -66,18 +66,12 @@ REQUIRES = \ CPPSRCS = nsMailApp.cpp -# This code removes the console from release builds -# (unless you've set MOZ_WINCONSOLE=1). - -ifndef MOZ_WINCONSOLE -ifdef MOZ_DEBUG -MOZ_WINCONSOLE = 1 -else -MOZ_WINCONSOLE = 0 -endif +ifdef BUILD_STATIC_LIBS +STATIC_COMPONENTS_LINKER_PATH = -L$(DIST)/lib/components endif LIBS = \ + $(STATIC_COMPONENTS_LINKER_PATH) \ $(EXTRA_DSO_LIBS) \ $(DIST)/lib/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) \ $(MOZ_JS_LIBS) \ @@ -94,12 +88,40 @@ ifneq (,$(filter gtk gtk2 xlib,$(MOZ_WIDGET_TOOLKIT))) LIBS += $(XLDFLAGS) $(XLIBS) endif +# This code removes the console from release builds +# (unless you've set MOZ_WINCONSOLE=1). + +ifndef MOZ_WINCONSOLE +ifdef MOZ_DEBUG +MOZ_WINCONSOLE = 1 +else +MOZ_WINCONSOLE = 0 +endif +endif + +NSDISTMODE = copy + include $(topsrcdir)/config/config.mk +ifndef BUILD_STATIC_LIBS + ifdef NS_TRACE_MALLOC EXTRA_DSO_LIBS += tracemalloc endif +else +include $(topsrcdir)/config/static-config.mk + +EXTRA_DEPS += \ + $(STATIC_EXTRA_DEPS) \ + $(NULL) +DEFINES += $(STATIC_DEFINES) +CPPSRCS += $(STATIC_CPPSRCS) +EXTRA_DSO_LIBS += $(STATIC_EXTRA_DSO_LIBS) +REQUIRES += $(STATIC_REQUIRES) +EXTRA_LIBS += $(STATIC_EXTRA_LIBS) +endif + ifeq ($(OS_ARCH),WINNT) OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool gdi32) RCINCLUDE = splash.rc @@ -108,6 +130,9 @@ RCFLAGS += -DMOZ_THUNDERBIRD -I$(srcdir) else RCFLAGS += -DMOZ_THUNDERBIRD --include-dir $(srcdir) endif +ifdef BUILD_STATIC_LIBS +RCFLAGS += -DMOZ_STATIC_BUILD +endif endif ifeq ($(OS_ARCH),OS2) @@ -116,9 +141,19 @@ endif include $(topsrcdir)/config/rules.mk +ifdef BUILD_STATIC_LIBS +include $(topsrcdir)/config/static-rules.mk +endif + APP_VERSION = $(shell cat $(srcdir)/../config/version.txt) DEFINES += -DAPP_VERSION=\"$(APP_VERSION)\" +ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) +ifdef BUILD_STATIC_LIBS +LIBS += -framework QuickTime -framework IOKit +endif +endif + ifeq ($(OS_ARCH),WINNT) # # Control the default heap size.