mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-05 03:54:35 +00:00
e116353653
Bug #145343 r=mcafee
400 lines
7.3 KiB
Makefile
400 lines
7.3 KiB
Makefile
#
|
|
# 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
|
|
|
|
include $(topsrcdir)/build/unix/modules.mk
|
|
|
|
ifneq ($(BUILD_MODULES),all)
|
|
|
|
DIRS = $(BUILD_MODULE_DIRS)
|
|
EXPORT_DIRS = $(BUILD_MODULE_DEP_DIRS)
|
|
|
|
else
|
|
|
|
#
|
|
# And now for something completely different...
|
|
# Divide the default build into tiers.
|
|
# Tiers must be defined on module boundaries
|
|
#
|
|
default: $(SUBMAKEFILES)
|
|
$(MAKE) tier_0
|
|
$(MAKE) nspr
|
|
$(MAKE) ldap
|
|
ifdef MOZ_ENABLE_XFT
|
|
$(MAKE) freetype
|
|
$(MAKE) expat
|
|
endif
|
|
$(MAKE) tier_1
|
|
$(MAKE) tier_2
|
|
$(MAKE) tier_9
|
|
ifdef MOZ_EXTENSIONS
|
|
$(MAKE) tier_94
|
|
endif
|
|
ifdef MOZ_PSM
|
|
$(MAKE) tier_95
|
|
endif
|
|
ifdef MOZ_MAIL_NEWS
|
|
$(MAKE) tier_97
|
|
endif
|
|
ifdef MOZ_CALENDAR
|
|
$(MAKE) tier_98
|
|
endif
|
|
$(MAKE) tier_99
|
|
|
|
# Make sure that the existing rulesets work
|
|
DIRS = \
|
|
$(tier_0_dirs) \
|
|
$(tier_1_dirs) \
|
|
$(tier_2_dirs) \
|
|
$(tier_9_dirs) \
|
|
$(NULL)
|
|
|
|
ifdef GC_LEAK_DETECTOR
|
|
DIRS += gc/boehm
|
|
endif
|
|
|
|
ifdef MOZ_EXTENSIONS
|
|
DIRS += $(tier_94_dirs)
|
|
endif
|
|
ifdef MOZ_PSM
|
|
DIRS += $(tier_95_dirs)
|
|
endif
|
|
ifdef MOZ_MAIL_NEWS
|
|
DIRS += $(tier_97_dirs)
|
|
endif
|
|
ifdef MOZ_CALENDAR
|
|
DIRS += $(tier_98_dirs)
|
|
endif
|
|
|
|
DIRS += $(tier_99_dirs)
|
|
|
|
#
|
|
# tier 0 - base build config dirs
|
|
#
|
|
tier_0_dirs = \
|
|
config \
|
|
build \
|
|
include \
|
|
$(NULL)
|
|
|
|
#
|
|
# tier 1 - 3rd party individual libraries
|
|
#
|
|
tier_1_dirs += dbm
|
|
|
|
ifndef MOZ_NATIVE_JPEG
|
|
tier_1_dirs += jpeg
|
|
endif
|
|
|
|
ifndef MOZ_NATIVE_ZLIB
|
|
tier_1_dirs += modules/zlib
|
|
endif
|
|
|
|
# Installer needs standalone libjar, hence standalone zlib
|
|
ifdef MOZ_INSTALLER
|
|
tier_1_dirs += modules/zlib/standalone
|
|
endif
|
|
|
|
ifdef MOZ_INTERNAL_LIBART_LGPL
|
|
tier_1_dirs += other-licenses/libart_lgpl
|
|
endif
|
|
|
|
#
|
|
# tier 2 - base libraries
|
|
#
|
|
tier_2_dirs = js
|
|
|
|
# MacOSX needs to build lib for MoreFiles before xpcom
|
|
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
|
tier_2_dirs += lib/mac/MoreFiles
|
|
endif
|
|
|
|
tier_2_dirs += \
|
|
modules/libreg \
|
|
string \
|
|
xpcom \
|
|
$(NULL)
|
|
|
|
#
|
|
# tier 9 - core components (necko,gecko)
|
|
#
|
|
|
|
tier_9_dirs += \
|
|
js/src/xpconnect \
|
|
intl \
|
|
modules/libjar \
|
|
$(NULL)
|
|
|
|
ifdef MOZ_JAVA_SUPPLEMENT
|
|
tier_9_dirs += \
|
|
java/util \
|
|
java/webclient \
|
|
$(NULL)
|
|
endif
|
|
|
|
ifdef MOZ_OJI
|
|
tier_9_dirs += js/src/liveconnect
|
|
endif
|
|
|
|
ifdef MOZ_JSDEBUGGER
|
|
tier_9_dirs += js/jsd
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_XFT
|
|
tier_9_dirs += other-licenses/Xft
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_XLIB
|
|
tier_9_dirs += gfx/src/xlibrgb widget/src/xlibxtbin
|
|
endif
|
|
|
|
ifdef MOZ_ENABLE_GTK
|
|
tier_9_dirs += widget/src/gtksuperwin widget/src/gtkxtbin
|
|
endif
|
|
|
|
tier_9_dirs += \
|
|
modules/libutil \
|
|
netwerk \
|
|
modules/mpfilelocprovider \
|
|
uriloader \
|
|
modules/libpref \
|
|
modules/libimg \
|
|
modules/oji \
|
|
caps \
|
|
rdf \
|
|
expat \
|
|
htmlparser \
|
|
gfx \
|
|
gfx2 \
|
|
modules/libpr0n \
|
|
modules/plugin \
|
|
dom \
|
|
view \
|
|
widget \
|
|
content \
|
|
layout \
|
|
db \
|
|
docshell \
|
|
webshell \
|
|
embedding \
|
|
editor \
|
|
sun-java \
|
|
profile \
|
|
themes \
|
|
$(NULL)
|
|
|
|
ifdef ACCESSIBILITY
|
|
tier_9_dirs += accessible
|
|
endif
|
|
|
|
ifdef MOZ_LDAP_XPCOM
|
|
tier_9_dirs += directory/xpcom
|
|
endif
|
|
|
|
# This must preceed xpfe
|
|
ifdef MOZ_JPROF
|
|
tier_9_dirs += tools/jprof
|
|
endif
|
|
|
|
tier_9_dirs += xpfe xpinstall
|
|
|
|
ifdef MOZ_LEAKY
|
|
tier_9_dirs += tools/leaky
|
|
endif
|
|
|
|
ifdef NS_TRACE_MALLOC
|
|
tier_9_dirs += tools/trace-malloc
|
|
endif
|
|
|
|
tier_9_dirs += l10n
|
|
|
|
#
|
|
# tier 9x - application features
|
|
#
|
|
|
|
ifdef MOZ_EXTENSIONS
|
|
tier_94_dirs += extensions
|
|
endif
|
|
|
|
ifdef MOZ_PSM
|
|
tier_95_dirs += security/manager
|
|
endif
|
|
|
|
ifdef MOZ_MAIL_NEWS
|
|
tier_97_dirs += mailnews
|
|
endif
|
|
|
|
ifdef MOZ_CALENDAR
|
|
tier_98_dirs += calendar
|
|
endif
|
|
|
|
#
|
|
# tier 99 - application binaries
|
|
#
|
|
|
|
ifneq (,$(MOZ_STATIC_COMPONENTS)$(MOZ_META_COMPONENTS))
|
|
tier_99_dirs += modules/staticmod
|
|
endif
|
|
|
|
tier_99_dirs += xpfe/bootstrap
|
|
|
|
ifdef MOZ_ENABLE_GTK
|
|
tier_99_dirs += embedding/browser/gtk/tests
|
|
endif
|
|
|
|
endif # BUILD_MODULES == all
|
|
|
|
STATIC_MAKEFILES := nsprpub directory/c-sdk
|
|
|
|
ifdef MOZ_PSM
|
|
STATIC_MAKEFILES += security/nss
|
|
endif
|
|
|
|
GARBAGE_DIRS += dist
|
|
DIST_GARBAGE = config.cache config.log config.status config-defs.h \
|
|
dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
|
|
unallmakefiles \
|
|
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
|
|
|
|
ifeq ($(BUILD_MODULES),all)
|
|
# Build psuedo-external modules first when export is explicitly called
|
|
export::
|
|
$(MAKE) -C config export
|
|
$(MAKE) nspr
|
|
$(MAKE) ldap
|
|
ifdef MOZ_ENABLE_XFT
|
|
$(MAKE) freetype
|
|
$(MAKE) expat
|
|
endif
|
|
|
|
install::
|
|
ifndef MOZ_NATIVE_NSPR
|
|
$(MAKE) -C nsprpub real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/nspr
|
|
$(RM) -f $(addprefix $(DESTDIR)$(mozappdir)/$(LIB_PREFIX), $(addsuffix .$(LIB_SUFFIX), nspr4 plds4 plc4))
|
|
$(RM) -f $(addprefix $(DESTDIR)$(bindir)/,nspr-config compile-et.pl prerr.properties)
|
|
endif
|
|
ifdef MOZ_LDAP_XPCOM
|
|
$(MAKE) -C directory/c-sdk real_install DESTDIR=$(DESTDIR) libdir=$(mozappdir) includedir=$(includedir)/ldap
|
|
endif
|
|
|
|
endif
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
ifeq ($(BUILD_MODULES),all)
|
|
# Clean up after psuedo-external modules
|
|
clean clobber realclean clobber_all distclean::
|
|
ifndef MOZ_NATIVE_NSPR
|
|
$(MAKE) -C nsprpub $@
|
|
endif
|
|
ifdef MOZ_LDAP_XPCOM
|
|
$(MAKE) -C directory/c-sdk $@
|
|
endif
|
|
endif
|
|
|
|
tier_%:
|
|
@echo "$@: $($@_dirs)"
|
|
@$(EXIT_ON_ERROR) \
|
|
for d in $($@_dirs); do $(UPDATE_TITLE) \
|
|
$(MAKE) -C $$d export; \
|
|
done ; \
|
|
$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include ;\
|
|
for d in $($@_dirs); do $(UPDATE_TITLE) \
|
|
$(MAKE) -C $$d libs; \
|
|
done
|
|
#
|
|
# Individual modules
|
|
#
|
|
boehm:
|
|
ifdef GC_LEAK_DETECTOR
|
|
$(MAKE) -C gc/boehm
|
|
endif
|
|
|
|
nspr: boehm
|
|
ifndef MOZ_NATIVE_NSPR
|
|
$(MAKE) -C nsprpub
|
|
endif
|
|
|
|
ldap:
|
|
ifdef MOZ_LDAP_XPCOM
|
|
$(MAKE) -C directory/c-sdk
|
|
endif
|
|
|
|
freetype:
|
|
ifdef MOZ_ENABLE_XFT
|
|
ifndef MOZ_XFT_SYSTEM_FREETYPE2
|
|
$(MAKE) -C other-licenses/freetype
|
|
$(MAKE) -C other-licenses/freetype install
|
|
endif
|
|
endif
|
|
|
|
expat:
|
|
ifdef MOZ_ENABLE_XFT
|
|
$(MAKE) -C other-licenses/expat
|
|
$(MAKE) -C other-licenses/expat install
|
|
endif
|
|
|
|
# For modules.mk standalone build
|
|
export::
|
|
+$(LOOP_OVER_EXPORT_DIRS)
|
|
|
|
export::
|
|
@$(PERL) $(MOZILLA_DIR)/config/purge-old-headers.pl $(DIST)/include
|
|
|
|
distclean::
|
|
cat unallmakefiles | $(XARGS) rm -f
|
|
rm -f unallmakefiles $(DIST_GARBAGE)
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
rebase:
|
|
ifdef MOZILLA_OFFICIAL
|
|
echo rebasing $(DIST)
|
|
/bin/find $(DIST) -name "*.dll" > rebase.lst
|
|
rebase -b 60000000 -R . -G rebase.lst
|
|
rm rebase.lst
|
|
endif
|
|
|
|
splitsymbols:
|
|
ifdef MOZILLA_OFFICIAL
|
|
echo splitting symbols out of binaries
|
|
/bin/find $(DIST) -name "*.dll" -exec splitsym {} \;
|
|
/bin/find $(DIST) -name "*.exe" -exec splitsym {} \;
|
|
/bin/find $(DIST) -name "*.EXE" -exec splitsym {} \;
|
|
endif # MOZILLA_OFFICIAL
|
|
|
|
deliver: splitsymbols rebase
|
|
|
|
endif # WINNT
|
|
|
|
# Temporary hack for NSS 3.4 landing (bug 116334, wtc@netscape.com)
|
|
ifdef MOZ_PSM
|
|
ifdef COMPILER_DEPEND
|
|
depend::
|
|
$(MAKE) -C security/manager depend
|
|
endif
|
|
endif
|