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 = \
|
|
|
|
$(foreach m, $(MOZ_STATIC_COMPONENTS), $(DIST)/lib/components/lib$(m).$(LIB_SUFFIX))
|
2001-06-21 00:21:49 +04:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef _COMPONENT_BASE
|
|
|
|
SHARED_LIBRARY_LIBS = $(foreach m,$($(_META_COMPONENT_LIBS)), $(DIST)/lib/components/lib$(m).$(LIB_SUFFIX))
|
|
|
|
SHARED_LIBRARY_LIBS += $(foreach m,$($(_META_DEP_LIBS)), $(DIST)/lib/lib$(m).$(LIB_SUFFIX))
|
|
|
|
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
|
|
|
|
|
|
|
|
#EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
|
2000-10-24 21:16:20 +04:00
|
|
|
|
2001-06-21 00:21:49 +04:00
|
|
|
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
|
2001-06-21 00:21:49 +04:00
|
|
|
ifeq ($(LIBRARY_NAME),meta_crypto)
|
|
|
|
EXTRA_LIBS += $(NSS_LIBS)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
GARBAGE += $(CPPSRCS)
|
2000-10-24 21:16:20 +04:00
|
|
|
|
|
|
|
list:
|
|
|
|
echo $(MOZ_STATIC_COMPONENTS)
|
|
|
|
|
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)),)|" \
|
2001-08-21 04:55:20 +04:00
|
|
|
> $@
|
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)),)|" \
|
2001-08-21 04:55:20 +04:00
|
|
|
> $@
|