1999-12-15 12:40:24 +03:00
|
|
|
#
|
2004-07-16 22:13:26 +04:00
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1998-08-21 07:34:44 +04:00
|
|
|
#
|
2004-07-16 22:13:26 +04:00
|
|
|
# The contents of this file are subject to the Mozilla 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/MPL/
|
|
|
|
#
|
|
|
|
# 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.
|
1998-08-21 07:34:44 +04:00
|
|
|
#
|
1999-11-06 06:43:54 +03:00
|
|
|
# The Original Code is mozilla.org code.
|
|
|
|
#
|
2004-07-16 22:13:26 +04:00
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# Netscape Communications Corporation.
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
1999-11-06 06:43:54 +03:00
|
|
|
#
|
2004-07-16 22:13:26 +04:00
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
# of those above. If you wish to allow use of your version of this file only
|
|
|
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
# use your version of this file under the terms of the MPL, indicate your
|
|
|
|
# decision by deleting the provisions above and replace them with the notice
|
|
|
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
# the provisions above, a recipient may use your version of this file under
|
|
|
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
1998-08-21 07:34:44 +04:00
|
|
|
#
|
2004-07-16 22:13:26 +04:00
|
|
|
# ***** END LICENSE BLOCK *****
|
1998-08-21 07:34:44 +04:00
|
|
|
|
|
|
|
DEPTH = .
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
2009-03-11 23:32:10 +03:00
|
|
|
ifndef .PYMAKE
|
|
|
|
ifeq (,$(MAKE_VERSION))
|
|
|
|
$(error GNU Make is required)
|
|
|
|
endif
|
|
|
|
ifeq (,$(filter-out 3.78 3.79,$(MAKE_VERSION)))
|
|
|
|
$(error GNU Make 3.80 or higher is required)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
1998-08-21 07:34:44 +04:00
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2008-12-19 17:50:24 +03:00
|
|
|
default::
|
2005-11-08 20:53:54 +03:00
|
|
|
|
2006-08-29 20:53:40 +04:00
|
|
|
TIERS += base
|
2000-05-04 02:49:47 +04:00
|
|
|
|
2006-08-29 20:53:40 +04:00
|
|
|
#
|
|
|
|
# tier "base" - basic setup
|
2007-09-10 21:36:17 +04:00
|
|
|
#
|
2006-08-29 20:53:40 +04:00
|
|
|
tier_base_dirs = \
|
2006-03-09 08:47:25 +03:00
|
|
|
config \
|
|
|
|
build \
|
2007-10-11 03:03:14 +04:00
|
|
|
probes \
|
2006-03-09 08:47:25 +03:00
|
|
|
$(NULL)
|
|
|
|
|
2008-02-05 06:16:24 +03:00
|
|
|
ifdef MOZ_MEMORY
|
|
|
|
tier_base_dirs += memory/jemalloc
|
|
|
|
endif
|
|
|
|
|
2006-08-29 20:53:40 +04:00
|
|
|
include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
|
2006-03-09 08:47:25 +03:00
|
|
|
|
2006-08-29 20:53:40 +04:00
|
|
|
TIERS += testharness
|
2002-10-25 09:59:52 +04:00
|
|
|
|
2007-09-10 21:36:17 +04:00
|
|
|
# test harnesses
|
2006-08-29 20:53:40 +04:00
|
|
|
ifdef ENABLE_TESTS
|
2009-01-22 21:39:02 +03:00
|
|
|
tier_testharness_dirs += testing/xpcshell
|
2002-10-25 13:48:06 +04:00
|
|
|
endif
|
2002-10-25 09:59:52 +04:00
|
|
|
|
2008-12-19 17:50:24 +03:00
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
|
2008-03-14 18:18:24 +03:00
|
|
|
GARBAGE_DIRS += dist _javagen _profile _tests staticlib
|
2000-03-17 03:49:15 +03:00
|
|
|
DIST_GARBAGE = config.cache config.log config.status config-defs.h \
|
2000-06-13 03:02:14 +04:00
|
|
|
dependencies.beos config/autoconf.mk config/myrules.mk config/myconfig.mk \
|
2002-08-22 04:50:51 +04:00
|
|
|
unallmakefiles mozilla-config.h \
|
2008-01-29 01:05:47 +03:00
|
|
|
netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
|
2007-09-10 21:36:17 +04:00
|
|
|
$(topsrcdir)/.mozconfig.mk $(topsrcdir)/.mozconfig.out
|
1998-10-28 06:40:33 +03:00
|
|
|
|
2008-12-19 17:50:24 +03:00
|
|
|
default alldep all::
|
|
|
|
$(RM) -rf $(DIST)/sdk
|
|
|
|
$(RM) -rf $(DIST)/include
|
|
|
|
$(RM) -rf $(DIST)/private
|
|
|
|
$(RM) -rf $(DIST)/public
|
|
|
|
$(RM) -rf $(DIST)/bin/components
|
|
|
|
$(RM) -rf _tests
|
|
|
|
|
2002-10-25 09:59:52 +04:00
|
|
|
# Build pseudo-external modules first when export is explicitly called
|
2002-01-26 01:29:51 +03:00
|
|
|
export::
|
2004-03-23 23:58:21 +03:00
|
|
|
$(RM) -rf $(DIST)/sdk
|
2002-01-26 01:29:51 +03:00
|
|
|
$(MAKE) -C config export
|
2006-08-25 14:45:39 +04:00
|
|
|
$(MAKE) tier_nspr
|
2002-04-26 00:40:00 +04:00
|
|
|
|
2008-12-19 17:50:24 +03:00
|
|
|
ifdef ENABLE_TESTS
|
|
|
|
# Additional makefile targets to call automated test suites
|
|
|
|
include $(topsrcdir)/testing/testsuite-targets.mk
|
|
|
|
endif
|
|
|
|
|
2000-03-14 09:16:27 +03:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2000-02-24 01:47:39 +03:00
|
|
|
|
2006-08-29 22:02:16 +04:00
|
|
|
# After we build tier toolkit, go back and build the tools from previous dirs
|
2006-08-29 20:53:40 +04:00
|
|
|
tier_toolkit::
|
2006-08-29 22:02:16 +04:00
|
|
|
$(MAKE) tools_tier_js
|
|
|
|
$(MAKE) tools_tier_xpcom
|
2006-09-29 01:22:27 +04:00
|
|
|
$(MAKE) tools_tier_necko
|
2006-08-29 20:53:40 +04:00
|
|
|
$(MAKE) tools_tier_gecko
|
|
|
|
$(MAKE) tools_tier_toolkit
|
2001-11-16 10:40:42 +03:00
|
|
|
|
2006-09-29 01:22:27 +04:00
|
|
|
ifeq (netwerk,$(MOZ_BUILD_APP))
|
|
|
|
tier_necko::
|
|
|
|
$(EXIT_ON_ERROR) \
|
|
|
|
$(foreach tier,$(TIERS),$(MAKE) tools_tier_$(tier); )
|
|
|
|
endif
|
|
|
|
|
2000-12-13 00:28:24 +03:00
|
|
|
distclean::
|
|
|
|
cat unallmakefiles | $(XARGS) rm -f
|
|
|
|
rm -f unallmakefiles $(DIST_GARBAGE)
|
2002-03-01 04:01:42 +03:00
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
rebase:
|
2002-03-07 11:23:11 +03:00
|
|
|
ifdef MOZILLA_OFFICIAL
|
2002-03-01 04:01:42 +03:00
|
|
|
echo rebasing $(DIST)
|
2007-06-21 20:55:48 +04:00
|
|
|
/bin/find $(DIST) -name "*.dll" -a -not -name "msvc*" > rebase.lst
|
2002-03-01 04:01:42 +03:00
|
|
|
rebase -b 60000000 -R . -G rebase.lst
|
2002-03-07 11:23:11 +03:00
|
|
|
rm rebase.lst
|
2002-03-01 04:01:42 +03:00
|
|
|
endif
|
2007-05-02 22:45:36 +04:00
|
|
|
endif # WINNT
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
# we want to copy PDB files on Windows
|
|
|
|
MAKE_SYM_STORE_ARGS := -c
|
2008-02-27 03:54:47 +03:00
|
|
|
ifdef PDBSTR_PATH
|
|
|
|
MAKE_SYM_STORE_ARGS += -i
|
|
|
|
endif
|
2007-08-22 01:52:54 +04:00
|
|
|
ifeq (,$(CYGWIN_WRAPPER))
|
|
|
|
# this doesn't work with Cygwin Python
|
|
|
|
MAKE_SYM_STORE_ARGS += --vcs-info
|
|
|
|
endif
|
2007-08-19 22:06:53 +04:00
|
|
|
DUMP_SYMS_BIN ?= $(topsrcdir)/toolkit/crashreporter/tools/win32/dump_syms.exe
|
2007-06-27 14:25:14 +04:00
|
|
|
# PDB files don't get moved to dist, so we need to scan the whole objdir
|
|
|
|
MAKE_SYM_STORE_PATH := .
|
2007-05-02 22:45:36 +04:00
|
|
|
endif
|
|
|
|
ifeq ($(OS_ARCH),Darwin)
|
|
|
|
# need to pass arch flags for universal builds
|
|
|
|
ifdef UNIVERSAL_BINARY
|
2009-03-11 18:56:57 +03:00
|
|
|
MAKE_SYM_STORE_ARGS := -c -a "ppc i386" --vcs-info
|
2007-06-27 14:25:14 +04:00
|
|
|
MAKE_SYM_STORE_PATH := $(DIST)/universal
|
2007-05-02 22:45:36 +04:00
|
|
|
else
|
2009-03-11 18:56:57 +03:00
|
|
|
MAKE_SYM_STORE_ARGS := -c -a $(OS_TEST) --vcs-info
|
2007-06-27 14:25:14 +04:00
|
|
|
MAKE_SYM_STORE_PATH := $(DIST)/bin
|
2007-05-02 22:45:36 +04:00
|
|
|
endif
|
2007-08-19 22:06:53 +04:00
|
|
|
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
|
2007-05-02 22:45:36 +04:00
|
|
|
endif
|
2008-03-20 04:13:36 +03:00
|
|
|
ifeq (,$(filter-out Linux SunOS,$(OS_ARCH)))
|
2009-03-11 18:56:57 +03:00
|
|
|
MAKE_SYM_STORE_ARGS := -c --vcs-info
|
2007-08-19 22:06:53 +04:00
|
|
|
DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms
|
2007-06-27 14:25:14 +04:00
|
|
|
MAKE_SYM_STORE_PATH := $(DIST)/bin
|
2007-05-23 00:20:55 +04:00
|
|
|
endif
|
2002-03-01 04:01:42 +03:00
|
|
|
|
2009-02-17 10:46:32 +03:00
|
|
|
SYM_STORE_SOURCE_DIRS := $(topsrcdir)
|
|
|
|
|
2009-02-17 17:18:50 +03:00
|
|
|
include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
|
|
|
|
|
2007-05-28 05:57:56 +04:00
|
|
|
ifdef MOZ_SYMBOLS_EXTRA_BUILDID
|
|
|
|
EXTRA_BUILDID := -$(MOZ_SYMBOLS_EXTRA_BUILDID)
|
|
|
|
endif
|
|
|
|
|
2009-02-17 17:18:50 +03:00
|
|
|
SYMBOL_INDEX_NAME = \
|
|
|
|
$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)-$(OS_ARCH)-$(BUILDID)$(EXTRA_BUILDID)-symbols.txt
|
2007-09-10 21:36:17 +04:00
|
|
|
|
2007-01-12 02:42:21 +03:00
|
|
|
buildsymbols:
|
2007-08-08 19:19:57 +04:00
|
|
|
ifdef MOZ_CRASHREPORTER
|
2007-03-26 18:55:27 +04:00
|
|
|
echo building symbol store
|
2009-03-10 20:36:14 +03:00
|
|
|
$(RM) -rf $(DIST)/crashreporter-symbols
|
|
|
|
$(NSINSTALL) -D $(DIST)/crashreporter-symbols
|
2009-02-17 10:46:32 +03:00
|
|
|
$(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/symbolstore.py \
|
|
|
|
$(MAKE_SYM_STORE_ARGS) \
|
|
|
|
$(foreach dir,$(SYM_STORE_SOURCE_DIRS),-s $(dir)) \
|
|
|
|
$(DUMP_SYMS_BIN) \
|
2009-03-10 20:36:14 +03:00
|
|
|
$(DIST)/crashreporter-symbols \
|
2009-02-17 10:46:32 +03:00
|
|
|
$(MAKE_SYM_STORE_PATH) > \
|
2009-03-10 20:36:14 +03:00
|
|
|
$(DIST)/crashreporter-symbols/$(SYMBOL_INDEX_NAME)
|
2007-01-12 02:42:21 +03:00
|
|
|
echo packing symbols
|
|
|
|
mkdir -p $(topsrcdir)/../$(BUILDID)
|
2009-03-10 20:36:14 +03:00
|
|
|
cd $(DIST)/crashreporter-symbols && \
|
|
|
|
zip -r9D ../$(SYMBOL_ARCHIVE_BASENAME).zip .
|
2007-08-08 19:19:57 +04:00
|
|
|
endif # MOZ_CRASHREPORTER
|
2007-01-12 02:42:21 +03:00
|
|
|
|
2006-12-06 04:16:05 +03:00
|
|
|
uploadsymbols:
|
2007-08-08 19:19:57 +04:00
|
|
|
ifdef MOZ_CRASHREPORTER
|
2009-02-17 17:18:50 +03:00
|
|
|
$(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh $(DIST)/$(SYMBOL_ARCHIVE_BASENAME).zip
|
2006-12-06 04:16:05 +03:00
|
|
|
endif
|
|
|
|
|
2007-05-02 22:45:36 +04:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2003-05-17 04:58:24 +04:00
|
|
|
signnss:
|
|
|
|
ifdef MOZILLA_OFFICIAL
|
|
|
|
echo signing NSS libs
|
|
|
|
cd $(DIST)/bin; ./shlibsign.exe -v -i softokn3.dll
|
2006-01-13 21:09:32 +03:00
|
|
|
cd $(DIST)/bin; ./shlibsign.exe -v -i freebl3.dll
|
2003-05-17 04:58:24 +04:00
|
|
|
endif # MOZILLA_OFFICIAL
|
|
|
|
|
2009-03-28 05:00:25 +03:00
|
|
|
deliver: rebase signnss
|
2002-03-01 04:01:42 +03:00
|
|
|
|
|
|
|
endif # WINNT
|
2002-03-05 18:22:48 +03:00
|
|
|
|
2007-08-19 22:03:13 +04:00
|
|
|
ifneq (,$(wildcard $(DIST)/bin/application.ini))
|
2007-07-02 22:20:24 +04:00
|
|
|
BUILDID = $(shell $(PYTHON) $(srcdir)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID)
|
2007-08-19 22:03:13 +04:00
|
|
|
else
|
|
|
|
BUILDID = $(shell $(PYTHON) $(srcdir)/config/printconfigsetting.py $(DIST)/bin/platform.ini Build BuildID)
|
|
|
|
endif
|
2008-02-21 02:29:11 +03:00
|
|
|
|
|
|
|
#XXX: this is a hack, since we don't want to clobber for MSVC
|
|
|
|
# PGO support, but we can't do this test in client.mk
|
|
|
|
ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_)
|
2008-03-06 14:57:21 +03:00
|
|
|
# No point in clobbering if PGO has been explicitly disabled.
|
|
|
|
ifndef NO_PROFILE_GUIDED_OPTIMIZE
|
2008-02-21 02:29:11 +03:00
|
|
|
maybe_clobber_profiledbuild: clobber_all
|
|
|
|
else
|
|
|
|
maybe_clobber_profiledbuild:
|
|
|
|
endif
|
2008-03-06 14:57:21 +03:00
|
|
|
else
|
|
|
|
maybe_clobber_profiledbuild:
|
|
|
|
endif
|
2008-02-21 02:29:11 +03:00
|
|
|
|
|
|
|
.PHONY: maybe_clobber_profiledbuild
|