2000-10-24 21:16:20 +04:00
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Netscape 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/NPL/
|
|
|
|
#
|
|
|
|
# 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 code.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is Netscape
|
|
|
|
# Communications Corporation. Portions created by Netscape are
|
|
|
|
# Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
# Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
#
|
|
|
|
|
|
|
|
DEPTH = ../..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2001-06-21 00:21:49 +04:00
|
|
|
ifdef MOZ_STATIC_COMPONENTS
|
2000-10-24 21:16:20 +04:00
|
|
|
MODULE = staticmod
|
|
|
|
LIBRARY_NAME = staticmod
|
|
|
|
SHORT_LIBNAME = statcmod
|
2001-06-21 00:21:49 +04:00
|
|
|
endif
|
2000-10-24 21:16:20 +04:00
|
|
|
IS_COMPONENT = 1
|
|
|
|
|
2001-06-21 00:21:49 +04:00
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
|
2001-09-28 19:36:20 +04:00
|
|
|
REQUIRES = xpcom \
|
|
|
|
$(NULL)
|
|
|
|
|
2001-06-21 00:21:49 +04:00
|
|
|
ifdef MOZ_STATIC_COMPONENTS
|
2000-10-24 21:16:20 +04:00
|
|
|
CPPSRCS = nsStaticModule.cpp
|
2001-06-21 00:21:49 +04:00
|
|
|
endif
|
2000-10-24 21:16:20 +04:00
|
|
|
|
|
|
|
LOCAL_INCLUDES = -I$(srcdir)
|
|
|
|
|
2001-06-21 00:21:49 +04:00
|
|
|
ifdef _COMPONENT_BASE
|
|
|
|
_META_COMPONENT_NAMES := MOZ_META_COMPONENTS_$(_COMPONENT_BASE)
|
|
|
|
_META_COMPONENT_LIBS := MOZ_META_COMPONENTS_$(_COMPONENT_BASE)_comps
|
|
|
|
_META_DEP_LIBS := MOZ_META_COMPONENTS_$(_COMPONENT_BASE)_libs
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_STATIC_COMPONENTS
|
2000-10-24 21:16:20 +04:00
|
|
|
SHARED_LIBRARY_LIBS = \
|
2002-08-06 08:17:50 +04:00
|
|
|
$(foreach m, $(MOZ_STATIC_COMPONENTS), $(DIST)/lib/components/$(LIB_PREFIX)$(m).$(LIB_SUFFIX))
|
2001-06-21 00:21:49 +04:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef _COMPONENT_BASE
|
2002-08-06 08:17:50 +04:00
|
|
|
SHARED_LIBRARY_LIBS = $(foreach m,$($(_META_COMPONENT_LIBS)), $(DIST)/lib/components/$(LIB_PREFIX)$(m).$(LIB_SUFFIX))
|
|
|
|
SHARED_LIBRARY_LIBS += $(foreach m,$($(_META_DEP_LIBS)), $(DIST)/lib/$(LIB_PREFIX)$(m).$(LIB_SUFFIX))
|
2001-06-21 00:21:49 +04:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef NO_RECURSE
|
2001-11-21 11:55:59 +03:00
|
|
|
libs clean distclean clobber realclean clobber_all::
|
2001-06-21 00:21:49 +04:00
|
|
|
set -e; \
|
|
|
|
for f in $(MOZ_META_COMPONENTS); do \
|
|
|
|
$(MAKE) NO_RECURSE=1 BUILD_SHARED_LIBS=1 BUILD_STATIC_LIBS= LIBRARY_NAME=meta_$$f CPPSRCS=nsMetaModule_$$f.cpp _COMPONENT_BASE=$$f $@ ; \
|
|
|
|
done
|
|
|
|
endif
|
|
|
|
|
2000-10-24 21:16:20 +04:00
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2001-06-21 00:21:49 +04:00
|
|
|
ifdef MOZ_STATIC_COMPONENTS
|
2000-10-24 21:16:20 +04:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
|
|
|
$(ZLIB_LIBS) \
|
|
|
|
$(XPCOM_LIBS) \
|
|
|
|
$(MOZ_JS_LIBS) \
|
|
|
|
$(NSPR_LIBS) \
|
|
|
|
$(PNG_LIBS) \
|
|
|
|
-ljsdom
|
2001-06-21 00:21:49 +04:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MOZ_META_COMPONENTS
|
2001-09-06 23:13:41 +04:00
|
|
|
# Force XPCOM_TRANSLATE_NSGM_ENTRY_POINT to be defined so the macros
|
|
|
|
# in nsIGenericFactory.h will come out in the wash.
|
|
|
|
DEFINES += -DMETA_MODULE=\"$(LIBRARY_NAME)\" -DXPCOM_TRANSLATE_NSGM_ENTRY_POINT
|
2002-03-05 11:10:54 +03:00
|
|
|
ifeq ($(LIBRARY_NAME),meta_mail)
|
|
|
|
EXTRA_DSO_LDOPTS += \
|
2002-08-06 08:17:50 +04:00
|
|
|
$(DIST)/lib/$(LIB_PREFIX)gkgfx.$(LIB_SUFFIX) \
|
2002-03-05 11:10:54 +03:00
|
|
|
$(DIST)/lib/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
2001-06-21 00:21:49 +04:00
|
|
|
ifeq ($(LIBRARY_NAME),meta_crypto)
|
2002-03-05 11:10:54 +03:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
|
|
|
$(MOZ_JS_LIBS) \
|
|
|
|
$(NSS_LIBS) \
|
|
|
|
$(NULL)
|
2001-06-21 00:21:49 +04:00
|
|
|
endif
|
2002-03-05 11:10:54 +03:00
|
|
|
EXTRA_DSO_LDOPTS += \
|
|
|
|
$(MOZ_UNICHARUTIL_LIBS) \
|
|
|
|
$(MOZ_COMPONENT_LIBS) \
|
|
|
|
$(NULL)
|
2001-06-21 00:21:49 +04:00
|
|
|
endif
|
|
|
|
|
2002-08-06 08:17:50 +04:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
OS_LIBS += ole32.lib shell32.lib
|
|
|
|
endif
|
|
|
|
|
2001-06-21 00:21:49 +04:00
|
|
|
GARBAGE += $(CPPSRCS)
|
2000-10-24 21:16:20 +04:00
|
|
|
|
|
|
|
list:
|
|
|
|
echo $(MOZ_STATIC_COMPONENTS)
|
|
|
|
|
2002-08-06 08:17:50 +04:00
|
|
|
ifdef _NO_AUTO_VARS
|
|
|
|
_TARGET = $(srcdir)/$(@F)
|
|
|
|
GARBAGE += $(addprefix $(srcdir)/,$(CPPSRCS))
|
|
|
|
else
|
|
|
|
_TARGET = $@
|
|
|
|
endif
|
|
|
|
|
2001-06-21 00:21:49 +04:00
|
|
|
ifdef MOZ_STATIC_COMPONENTS
|
2001-08-21 04:55:20 +04:00
|
|
|
nsStaticModule.cpp: nsMetaModule.cpp.in Makefile Makefile.in $(DEPTH)/config/autoconf.mk
|
2000-10-24 21:16:20 +04:00
|
|
|
rm -f $@
|
2001-08-21 04:55:20 +04:00
|
|
|
cat $< | \
|
|
|
|
sed -e "s|%DECLARE_SUBMODULE_INFOS%|$(foreach m, $(MOZ_STATIC_COMPONENTS), extern nsModuleInfo NSMODULEINFO($(m));)|" | \
|
2001-09-06 23:13:41 +04:00
|
|
|
sed -e "s|%SUBMODULE_INFOS%|$(foreach m, $(MOZ_STATIC_COMPONENTS), \\& NSMODULEINFO($(m)),)|" \
|
2002-08-06 08:17:50 +04:00
|
|
|
> $(_TARGET)
|
2001-06-21 00:21:49 +04:00
|
|
|
endif
|
2000-10-24 21:16:20 +04:00
|
|
|
|
2001-08-21 04:55:20 +04:00
|
|
|
nsMetaModule_%.cpp: nsMetaModule.cpp.in Makefile Makefile.in $(topsrcdir)/config/config.mk
|
2001-06-21 00:21:49 +04:00
|
|
|
rm -f $@
|
|
|
|
cat $< | \
|
2001-08-21 04:55:20 +04:00
|
|
|
sed -e "s|%DECLARE_SUBMODULE_INFOS%|$(foreach m, $($(_META_COMPONENT_NAMES)), extern nsModuleInfo NSMODULEINFO($(m));)|" | \
|
2001-09-06 23:13:41 +04:00
|
|
|
sed -e "s|%SUBMODULE_INFOS%|$(foreach m, $($(_META_COMPONENT_NAMES)), \\& NSMODULEINFO($(m)),)|" \
|
2002-08-06 08:17:50 +04:00
|
|
|
> $(_TARGET)
|