2005-03-28 19:36:24 +00:00
|
|
|
# vim:set ts=8 sw=8 sts=8 noet:
|
1998-03-28 02:44:41 +00:00
|
|
|
#
|
2004-04-18 14:21:17 +00:00
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1998-03-28 02:44:41 +00:00
|
|
|
#
|
2004-04-18 14:21:17 +00: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/
|
1998-03-28 02:44:41 +00:00
|
|
|
#
|
2004-04-18 14:21:17 +00:00
|
|
|
# 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-03-28 02:44:41 +00:00
|
|
|
#
|
2004-04-18 14:21:17 +00:00
|
|
|
# The Original Code is mozilla.org code.
|
1998-03-28 02:44:41 +00:00
|
|
|
#
|
2004-04-18 14:21:17 +00: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.
|
1998-03-28 02:44:41 +00:00
|
|
|
#
|
2004-04-18 14:21:17 +00:00
|
|
|
# Contributor(s):
|
2005-06-02 23:27:48 +00:00
|
|
|
# Chase Phillips <chase@mozilla.org>
|
2006-01-28 17:32:37 +00:00
|
|
|
# Benjamin Smedberg <benjamin@smedbergs.us>
|
1998-03-28 02:44:41 +00:00
|
|
|
#
|
2004-04-18 14:21:17 +00:00
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either of 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-03-28 02:44:41 +00:00
|
|
|
#
|
2004-04-18 14:21:17 +00:00
|
|
|
# ***** END LICENSE BLOCK *****
|
1998-08-19 20:42:14 +00:00
|
|
|
ifndef topsrcdir
|
1999-09-09 09:24:58 +00:00
|
|
|
topsrcdir = $(DEPTH)
|
1998-08-19 20:42:14 +00:00
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2000-09-20 19:35:24 +00:00
|
|
|
ifndef MOZILLA_DIR
|
2000-10-27 08:47:51 +00:00
|
|
|
MOZILLA_DIR = $(topsrcdir)
|
2000-09-20 19:35:24 +00:00
|
|
|
endif
|
|
|
|
|
2000-03-14 03:00:52 +00:00
|
|
|
ifndef INCLUDED_CONFIG_MK
|
1998-08-19 20:42:14 +00:00
|
|
|
include $(topsrcdir)/config/config.mk
|
1998-03-28 02:44:41 +00:00
|
|
|
endif
|
|
|
|
|
2002-03-22 15:01:17 +00:00
|
|
|
ifndef INCLUDED_VERSION_MK
|
|
|
|
include $(topsrcdir)/config/version.mk
|
|
|
|
endif
|
|
|
|
|
2000-02-25 03:55:50 +00:00
|
|
|
REPORT_BUILD = @echo $(notdir $<)
|
|
|
|
|
2000-06-21 00:54:56 +00:00
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
EXEC =
|
|
|
|
else
|
|
|
|
EXEC = exec
|
|
|
|
endif
|
|
|
|
|
2000-03-14 03:00:52 +00:00
|
|
|
# ELOG prints out failed command when building silently (gmake -s).
|
2005-01-23 21:32:20 +00:00
|
|
|
ifneq (,$(findstring -s,$(MAKEFLAGS)))
|
2000-06-21 00:54:56 +00:00
|
|
|
ELOG := $(EXEC) sh $(BUILD_TOOLS)/print-failed-commands.sh
|
2000-02-26 04:21:53 +00:00
|
|
|
else
|
2000-03-14 03:00:52 +00:00
|
|
|
ELOG :=
|
2000-02-26 04:21:53 +00:00
|
|
|
endif
|
|
|
|
|
2000-03-31 01:24:48 +00:00
|
|
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
2003-03-08 05:18:43 +00:00
|
|
|
_LIBNAME_RELATIVE_PATHS=1
|
2001-12-04 21:17:48 +00:00
|
|
|
else
|
2005-04-22 19:06:27 +00:00
|
|
|
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
|
2003-03-08 05:18:43 +00:00
|
|
|
ifndef GNU_CC
|
|
|
|
_LIBNAME_RELATIVE_PATHS=1
|
|
|
|
endif
|
2001-12-04 21:17:48 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2005-04-22 19:06:27 +00:00
|
|
|
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
|
2003-08-05 04:43:49 +00:00
|
|
|
PWD := $(shell pwd)
|
|
|
|
_VPATH_SRCS = $(if $(filter /%,$<),$<,$(PWD)/$<)
|
2002-12-13 02:36:06 +00:00
|
|
|
else
|
|
|
|
_VPATH_SRCS = $<
|
|
|
|
endif
|
|
|
|
|
2005-11-08 23:08:05 +00:00
|
|
|
# Add $(DIST)/lib to VPATH so that -lfoo dependencies are followed
|
|
|
|
VPATH += $(DIST)/lib
|
2006-01-28 17:32:37 +00:00
|
|
|
ifdef LIBXUL_SDK
|
|
|
|
VPATH += $(LIBXUL_SDK)/lib
|
|
|
|
endif
|
2005-11-08 23:08:05 +00:00
|
|
|
|
2006-02-24 20:34:03 +00:00
|
|
|
# EXPAND_LIBNAME - $(call EXPAND_LIBNAME,foo)
|
|
|
|
# expands to foo.lib on platforms with import libs and -lfoo otherwise
|
|
|
|
|
|
|
|
# EXPAND_LIBNAME_PATH - $(call EXPAND_LIBNAME_PATH,foo,dir)
|
|
|
|
# expands to dir/foo.lib on platforms with import libs and
|
|
|
|
# -Ldir -lfoo otherwise
|
|
|
|
|
|
|
|
# EXPAND_MOZLIBNAME - $(call EXPAND_MOZLIBNAME,foo)
|
|
|
|
# expands to $(DIST)/lib/foo.lib on platforms with import libs and
|
|
|
|
# -lfoo otherwise
|
|
|
|
|
2003-03-08 05:18:43 +00:00
|
|
|
ifdef _LIBNAME_RELATIVE_PATHS
|
2006-02-24 20:34:03 +00:00
|
|
|
EXPAND_LIBNAME = $(foreach lib,$(1),$(LIB_PREFIX)$(lib).$(LIB_SUFFIX))
|
|
|
|
EXPAND_LIBNAME_PATH = $(foreach lib,$(1),$(2)/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX))
|
|
|
|
EXPAND_MOZLIBNAME = $(foreach lib,$(1),$(DIST)/lib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX))
|
2000-03-31 01:24:48 +00:00
|
|
|
else
|
2003-03-08 05:18:43 +00:00
|
|
|
EXPAND_LIBNAME = $(addprefix -l,$(1))
|
2006-02-24 20:34:03 +00:00
|
|
|
EXPAND_LIBNAME_PATH = -L$(2) $(addprefix -l,$(1))
|
2003-03-08 05:18:43 +00:00
|
|
|
EXPAND_MOZLIBNAME = $(addprefix -l,$(1))
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef EXTRA_DSO_LIBS
|
|
|
|
EXTRA_DSO_LIBS := $(call EXPAND_MOZLIBNAME,$(EXTRA_DSO_LIBS))
|
1999-09-09 09:24:58 +00:00
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2003-03-08 05:18:43 +00:00
|
|
|
#
|
|
|
|
# Library rules
|
|
|
|
#
|
2005-10-17 14:57:32 +00:00
|
|
|
# If BUILD_STATIC_LIBS or FORCE_STATIC_LIB is set, build a static library.
|
|
|
|
# Otherwise, build a shared library.
|
2003-03-08 05:18:43 +00:00
|
|
|
#
|
|
|
|
|
2000-03-31 01:24:48 +00:00
|
|
|
ifndef LIBRARY
|
|
|
|
ifdef LIBRARY_NAME
|
2005-04-22 19:06:27 +00:00
|
|
|
ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
|
2000-03-31 01:24:48 +00:00
|
|
|
ifdef SHORT_LIBNAME
|
|
|
|
LIBRARY_NAME := $(SHORT_LIBNAME)
|
|
|
|
endif
|
|
|
|
endif
|
2001-12-09 07:08:58 +00:00
|
|
|
LIBRARY := $(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX)
|
1999-09-09 09:24:58 +00:00
|
|
|
endif
|
|
|
|
endif
|
1999-02-19 03:06:32 +00:00
|
|
|
|
2000-03-31 07:18:52 +00:00
|
|
|
ifndef HOST_LIBRARY
|
|
|
|
ifdef HOST_LIBRARY_NAME
|
2001-12-09 07:08:58 +00:00
|
|
|
HOST_LIBRARY := $(LIB_PREFIX)$(HOST_LIBRARY_NAME).$(LIB_SUFFIX)
|
2000-03-31 07:18:52 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2000-03-31 01:24:48 +00:00
|
|
|
ifdef LIBRARY
|
2005-10-17 14:57:32 +00:00
|
|
|
ifneq (_1,$(FORCE_SHARED_LIB)_$(BUILD_STATIC_LIBS))
|
1998-03-28 02:44:41 +00:00
|
|
|
ifdef MKSHLIB
|
1999-05-05 23:38:15 +00:00
|
|
|
|
2001-12-09 07:08:58 +00:00
|
|
|
ifdef LIB_IS_C_ONLY
|
|
|
|
MKSHLIB = $(MKCSHLIB)
|
|
|
|
endif
|
|
|
|
|
2003-04-23 00:54:38 +00:00
|
|
|
SHARED_LIBRARY := $(DLL_PREFIX)$(LIBRARY_NAME)$(DLL_SUFFIX)
|
2001-12-09 07:08:58 +00:00
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
ifeq ($(OS_ARCH),OS2)
|
2000-03-31 01:24:48 +00:00
|
|
|
DEF_FILE := $(SHARED_LIBRARY:.dll=.def)
|
2000-03-31 10:49:39 +00:00
|
|
|
endif
|
1999-05-05 23:38:15 +00:00
|
|
|
|
2005-04-22 19:06:27 +00:00
|
|
|
ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
|
2003-04-23 00:54:38 +00:00
|
|
|
IMPORT_LIBRARY := $(LIB_PREFIX)$(LIBRARY_NAME).$(IMPORT_LIB_SUFFIX)
|
2001-12-09 07:08:58 +00:00
|
|
|
endif
|
1999-06-26 08:16:01 +00:00
|
|
|
|
1999-02-19 03:06:32 +00:00
|
|
|
endif # MKSHLIB
|
2005-10-17 14:57:32 +00:00
|
|
|
endif # FORCE_SHARED_LIB && !BUILD_STATIC_LIBS
|
2000-03-31 10:49:39 +00:00
|
|
|
endif # LIBRARY
|
1998-07-08 03:49:31 +00:00
|
|
|
|
2001-06-18 22:10:38 +00:00
|
|
|
ifeq (,$(BUILD_STATIC_LIBS)$(FORCE_STATIC_LIB))
|
|
|
|
LIBRARY := $(NULL)
|
1998-07-08 03:49:31 +00:00
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2005-10-17 14:57:32 +00:00
|
|
|
ifeq (_1,$(FORCE_SHARED_LIB)_$(BUILD_STATIC_LIBS))
|
2001-06-18 22:10:38 +00:00
|
|
|
SHARED_LIBRARY := $(NULL)
|
2001-06-19 00:08:53 +00:00
|
|
|
DEF_FILE := $(NULL)
|
|
|
|
IMPORT_LIBRARY := $(NULL)
|
2001-06-18 22:10:38 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef FORCE_STATIC_LIB
|
|
|
|
ifndef FORCE_SHARED_LIB
|
|
|
|
SHARED_LIBRARY := $(NULL)
|
2001-06-19 00:08:53 +00:00
|
|
|
DEF_FILE := $(NULL)
|
|
|
|
IMPORT_LIBRARY := $(NULL)
|
2001-06-18 22:10:38 +00:00
|
|
|
endif
|
1998-08-19 20:42:14 +00:00
|
|
|
endif
|
|
|
|
|
2002-01-25 03:20:51 +00:00
|
|
|
ifdef FORCE_SHARED_LIB
|
|
|
|
ifndef FORCE_STATIC_LIB
|
|
|
|
LIBRARY := $(NULL)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2005-04-22 19:06:27 +00:00
|
|
|
ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
|
2003-03-08 05:18:43 +00:00
|
|
|
ifndef GNU_CC
|
2001-12-09 07:08:58 +00:00
|
|
|
|
2005-06-02 23:27:48 +00:00
|
|
|
# Previously when possible we wrote to $LIBRARY_NAME.pdb. This broke parallel
|
|
|
|
# make builds on Windows. Now we just write to a pdb file per compiled file.
|
|
|
|
# See bug 286179 <https://bugzilla.mozilla.org/show_bug.cgi?id=286179> for
|
|
|
|
# details. -- chase@mozilla.org
|
|
|
|
#
|
2005-07-06 01:49:32 +00:00
|
|
|
# Changes to the PDBFILE naming scheme should also be reflected in HOST_PDBFILE
|
|
|
|
#
|
2002-06-17 17:09:57 +00:00
|
|
|
PDBFILE=$(basename $(@F)).pdb
|
2001-12-09 07:08:58 +00:00
|
|
|
ifdef MOZ_DEBUG
|
2002-06-17 17:09:57 +00:00
|
|
|
CODFILE=$(basename $(@F)).cod
|
2002-01-01 00:03:57 +00:00
|
|
|
endif
|
2001-12-09 07:08:58 +00:00
|
|
|
|
2002-10-07 19:09:05 +00:00
|
|
|
ifdef MOZ_MAPINFO
|
|
|
|
ifdef LIBRARY_NAME
|
|
|
|
MAPFILE=$(LIBRARY_NAME).map
|
|
|
|
else
|
|
|
|
MAPFILE=$(basename $(@F)).map
|
|
|
|
endif # LIBRARY_NAME
|
|
|
|
endif # MOZ_MAPINFO
|
|
|
|
|
2001-12-09 07:08:58 +00:00
|
|
|
ifdef DEFFILE
|
2005-06-01 14:28:35 +00:00
|
|
|
OS_LDFLAGS += -DEF:$(DEFFILE)
|
2001-12-09 07:08:58 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MAPFILE
|
2005-06-01 14:28:35 +00:00
|
|
|
OS_LDFLAGS += -MAP:$(MAPFILE) -MAPINFO:LINES
|
2001-12-09 07:08:58 +00:00
|
|
|
#CFLAGS += -Fm$(MAPFILE)
|
|
|
|
#CXXFLAGS += -Fm$(MAPFILE)
|
2001-12-04 21:17:48 +00:00
|
|
|
endif
|
|
|
|
|
2001-12-09 07:08:58 +00:00
|
|
|
#ifdef CODFILE
|
|
|
|
#CFLAGS += -Fa$(CODFILE) -FAsc
|
|
|
|
#CFLAGS += -Fa$(CODFILE) -FAsc
|
|
|
|
#endif
|
|
|
|
|
2003-03-08 05:18:43 +00:00
|
|
|
endif # !GNU_CC
|
2004-11-23 19:34:02 +00:00
|
|
|
|
|
|
|
ifdef ENABLE_CXX_EXCEPTIONS
|
2004-11-28 01:20:08 +00:00
|
|
|
ifdef GNU_CC
|
|
|
|
CXXFLAGS += -fexceptions
|
|
|
|
else
|
|
|
|
ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER)))
|
|
|
|
CXXFLAGS += -GX
|
|
|
|
else
|
|
|
|
CXXFLAGS += -EHsc
|
|
|
|
endif # _MSC_VER
|
2004-11-23 19:34:02 +00:00
|
|
|
endif # GNU_CC
|
|
|
|
endif # ENABLE_CXX_EXCEPTIONS
|
2001-12-09 07:08:58 +00:00
|
|
|
endif # WINNT
|
|
|
|
|
2005-07-06 01:49:32 +00:00
|
|
|
ifeq (,$(filter-out WINNT WINCE,$(HOST_OS_ARCH)))
|
|
|
|
HOST_PDBFILE=$(basename $(@F)).pdb
|
|
|
|
endif
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
ifndef TARGETS
|
2000-03-31 07:18:52 +00:00
|
|
|
TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS)
|
1998-03-28 02:44:41 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef OBJS
|
2001-09-29 04:30:14 +00:00
|
|
|
_OBJS = \
|
|
|
|
$(JRI_STUB_CFILES) \
|
|
|
|
$(addsuffix .$(OBJ_SUFFIX), $(JMC_GEN)) \
|
|
|
|
$(CSRCS:.c=.$(OBJ_SUFFIX)) \
|
|
|
|
$(CPPSRCS:.cpp=.$(OBJ_SUFFIX)) \
|
2004-06-18 00:56:48 +00:00
|
|
|
$(CMSRCS:.m=.$(OBJ_SUFFIX)) \
|
2001-10-31 01:20:39 +00:00
|
|
|
$(CMMSRCS:.mm=.$(OBJ_SUFFIX)) \
|
2001-09-29 04:30:14 +00:00
|
|
|
$(ASFILES:.$(ASM_SUFFIX)=.$(OBJ_SUFFIX))
|
2002-08-31 04:03:52 +00:00
|
|
|
OBJS = $(strip $(_OBJS))
|
1998-03-28 02:44:41 +00:00
|
|
|
endif
|
|
|
|
|
2000-03-31 07:18:52 +00:00
|
|
|
ifndef HOST_OBJS
|
2005-06-29 16:28:02 +00:00
|
|
|
HOST_OBJS = $(addprefix host_,$(HOST_CSRCS:.c=.$(OBJ_SUFFIX)))
|
2000-03-31 07:18:52 +00:00
|
|
|
endif
|
|
|
|
|
2003-03-24 14:07:08 +00:00
|
|
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
2000-03-31 01:24:48 +00:00
|
|
|
LIBOBJS := $(OBJS)
|
|
|
|
else
|
1998-03-28 02:44:41 +00:00
|
|
|
LIBOBJS := $(addprefix \", $(OBJS))
|
|
|
|
LIBOBJS := $(addsuffix \", $(LIBOBJS))
|
|
|
|
endif
|
|
|
|
|
2001-05-22 07:52:30 +00:00
|
|
|
ifndef MOZ_AUTO_DEPS
|
2006-01-04 13:43:59 +00:00
|
|
|
ifneq (,$(OBJS)$(XPIDLSRCS)$(SDK_XPIDLSRCS)$(SIMPLE_PROGRAMS))
|
2001-05-22 07:52:30 +00:00
|
|
|
MDDEPFILES = $(addprefix $(MDDEPDIR)/,$(OBJS:.$(OBJ_SUFFIX)=.pp))
|
2006-01-04 13:43:59 +00:00
|
|
|
ifndef NO_GEN_XPT
|
|
|
|
MDDEPFILES += $(addprefix $(MDDEPDIR)/,$(XPIDLSRCS:.idl=.xpt)) \
|
|
|
|
$(addprefix $(MDDEPDIR)/,$(SDK_XPIDLSRCS:.idl=.xpt))
|
|
|
|
endif
|
2001-05-22 07:52:30 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2000-03-14 03:00:52 +00:00
|
|
|
ALL_TRASH = \
|
|
|
|
$(GARBAGE) $(TARGETS) $(OBJS) $(PROGOBJS) LOGS TAGS a.out \
|
2000-07-19 14:03:25 +00:00
|
|
|
$(HOST_PROGOBJS) $(HOST_OBJS) $(IMPORT_LIBRARY) $(DEF_FILE)\
|
2003-09-18 17:24:54 +00:00
|
|
|
$(EXE_DEF_FILE) so_locations _gen _stubs $(wildcard *.res) $(wildcard *.RES) \
|
2002-06-17 17:09:57 +00:00
|
|
|
$(wildcard *.pdb) $(CODFILE) $(MAPFILE) $(IMPORT_LIBRARY) \
|
2003-09-11 11:36:40 +00:00
|
|
|
$(SHARED_LIBRARY:$(DLL_SUFFIX)=.exp) $(wildcard *.ilk) \
|
2001-12-09 08:56:06 +00:00
|
|
|
$(PROGRAM:$(BIN_SUFFIX)=.exp) $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.exp) \
|
|
|
|
$(PROGRAM:$(BIN_SUFFIX)=.lib) $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.lib) \
|
2002-07-01 02:34:57 +00:00
|
|
|
$(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.$(OBJ_SUFFIX)) \
|
2000-03-14 03:00:52 +00:00
|
|
|
$(wildcard gts_tmp_*) $(LIBRARY:%.a=.%.timestamp)
|
2000-08-30 01:15:32 +00:00
|
|
|
ALL_TRASH_DIRS = \
|
2002-01-08 09:29:10 +00:00
|
|
|
$(GARBAGE_DIRS) /no-such-file
|
1998-03-28 02:44:41 +00:00
|
|
|
|
1999-08-09 14:55:56 +00:00
|
|
|
ifdef QTDIR
|
2000-03-14 03:00:52 +00:00
|
|
|
GARBAGE += $(MOCSRCS)
|
1999-08-09 14:55:56 +00:00
|
|
|
endif
|
|
|
|
|
2000-06-12 00:49:01 +00:00
|
|
|
ifdef SIMPLE_PROGRAMS
|
2001-09-22 00:20:31 +00:00
|
|
|
GARBAGE += $(SIMPLE_PROGRAMS:%=%.$(OBJ_SUFFIX))
|
2000-06-12 00:49:01 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef HOST_SIMPLE_PROGRAMS
|
2006-01-24 17:25:42 +00:00
|
|
|
GARBAGE += $(HOST_SIMPLE_PROGRAMS:%=%.$(OBJ_SUFFIX))
|
2000-06-12 00:49:01 +00:00
|
|
|
endif
|
|
|
|
|
2000-01-11 22:11:02 +00:00
|
|
|
#
|
|
|
|
# the Solaris WorkShop template repository cache. it occasionally can get
|
|
|
|
# out of sync, so targets like clobber should kill it.
|
|
|
|
#
|
|
|
|
ifeq ($(OS_ARCH),SunOS)
|
|
|
|
ifeq ($(GNU_CXX),)
|
2000-09-13 07:36:37 +00:00
|
|
|
GARBAGE_DIRS += SunWS_cache
|
2000-01-11 22:11:02 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2002-12-12 00:08:59 +00:00
|
|
|
ifeq ($(OS_ARCH),OpenVMS)
|
2003-05-14 22:01:25 +00:00
|
|
|
GARBAGE += $(wildcard *.*_defines)
|
2002-12-12 00:08:59 +00:00
|
|
|
ifdef SHARED_LIBRARY
|
|
|
|
VMS_SYMVEC_FILE = $(SHARED_LIBRARY:$(DLL_SUFFIX)=_symvec.opt)
|
2003-05-14 22:01:25 +00:00
|
|
|
ifdef MOZ_DEBUG
|
|
|
|
VMS_SYMVEC_FILE_MODULE = $(topsrcdir)/build/unix/vms/$(notdir $(SHARED_LIBRARY:$(DLL_SUFFIX)=_dbg_symvec.opt))
|
|
|
|
else
|
|
|
|
VMS_SYMVEC_FILE_MODULE = $(topsrcdir)/build/unix/vms/$(notdir $(SHARED_LIBRARY:$(DLL_SUFFIX)=_symvec.opt))
|
|
|
|
endif
|
2002-12-12 00:08:59 +00:00
|
|
|
VMS_SYMVEC_FILE_COMP = $(topsrcdir)/build/unix/vms/component_symvec.opt
|
|
|
|
GARBAGE += $(VMS_SYMVEC_FILE)
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
DSO_LDOPTS := $(filter-out -auto_symvec,$(DSO_LDOPTS)) $(VMS_SYMVEC_FILE)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
1999-05-08 02:06:15 +00:00
|
|
|
XPIDL_GEN_DIR = _xpidlgen
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2000-03-02 03:39:19 +00:00
|
|
|
ifdef MOZ_UPDATE_XTERM
|
2000-04-18 01:27:01 +00:00
|
|
|
# Its good not to have a newline at the end of the titlebar string because it
|
|
|
|
# makes the make -s output easier to read. Echo -n does not work on all
|
|
|
|
# platforms, but we can trick sed into doing it.
|
2002-03-06 09:04:02 +00:00
|
|
|
UPDATE_TITLE = sed -e "s!Y!$@ in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$$d!" $(MOZILLA_DIR)/config/xterm.str;
|
1999-02-08 19:59:25 +00:00
|
|
|
endif
|
|
|
|
|
2000-12-11 06:52:25 +00:00
|
|
|
ifdef DIRS
|
2000-03-02 03:39:19 +00:00
|
|
|
LOOP_OVER_DIRS = \
|
2000-03-02 20:45:23 +00:00
|
|
|
@$(EXIT_ON_ERROR) \
|
|
|
|
for d in $(DIRS); do \
|
2000-03-02 03:39:19 +00:00
|
|
|
$(UPDATE_TITLE) \
|
|
|
|
$(MAKE) -C $$d $@; \
|
|
|
|
done
|
2000-11-10 00:55:44 +00:00
|
|
|
|
|
|
|
LOOP_OVER_MOZ_DIRS = \
|
|
|
|
@$(EXIT_ON_ERROR) \
|
|
|
|
for d in $(filter-out $(STATIC_MAKEFILES), $(DIRS)); do \
|
|
|
|
$(UPDATE_TITLE) \
|
|
|
|
$(MAKE) -C $$d $@; \
|
|
|
|
done
|
2000-12-11 06:52:25 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2004-12-08 12:38:22 +00:00
|
|
|
ifdef TOOL_DIRS
|
|
|
|
LOOP_OVER_TOOL_DIRS = \
|
|
|
|
@$(EXIT_ON_ERROR) \
|
|
|
|
for d in $(TOOL_DIRS); do \
|
|
|
|
$(UPDATE_TITLE) \
|
|
|
|
$(MAKE) -C $$d $@; \
|
|
|
|
done
|
|
|
|
endif
|
|
|
|
|
1998-07-08 03:49:31 +00:00
|
|
|
#
|
|
|
|
# Now we can differentiate between objects used to build a library, and
|
|
|
|
# objects used to build an executable in the same directory.
|
|
|
|
#
|
|
|
|
ifndef PROGOBJS
|
|
|
|
PROGOBJS = $(OBJS)
|
|
|
|
endif
|
|
|
|
|
2000-03-31 07:18:52 +00:00
|
|
|
ifndef HOST_PROGOBJS
|
|
|
|
HOST_PROGOBJS = $(HOST_OBJS)
|
|
|
|
endif
|
|
|
|
|
1999-08-24 21:45:06 +00:00
|
|
|
# MAKE_DIRS: List of directories to build while looping over directories.
|
2006-01-04 13:43:59 +00:00
|
|
|
ifneq (,$(OBJS)$(XPIDLSRCS)$(SDK_XPIDLSRCS)$(SIMPLE_PROGRAMS))
|
1999-09-09 09:24:58 +00:00
|
|
|
MAKE_DIRS += $(MDDEPDIR)
|
2000-08-30 01:15:32 +00:00
|
|
|
GARBAGE_DIRS += $(MDDEPDIR)
|
1999-09-09 09:24:58 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(XPIDLSRCS),)
|
2000-08-30 01:15:32 +00:00
|
|
|
GARBAGE_DIRS += $(XPIDL_GEN_DIR)
|
1999-08-24 21:45:06 +00:00
|
|
|
endif
|
|
|
|
|
1999-09-09 09:24:58 +00:00
|
|
|
#
|
|
|
|
# Tags: emacs (etags), vi (ctags)
|
|
|
|
# TAG_PROGRAM := ctags -L -
|
|
|
|
#
|
|
|
|
TAG_PROGRAM = xargs etags -a
|
|
|
|
|
|
|
|
#
|
|
|
|
# Turn on C++ linking if we have any .cpp files
|
|
|
|
# (moved this from config.mk so that config.mk can be included
|
|
|
|
# before the CPPSRCS are defined)
|
|
|
|
#
|
|
|
|
ifdef CPPSRCS
|
|
|
|
CPP_PROG_LINK = 1
|
|
|
|
endif
|
|
|
|
|
2000-04-23 17:48:04 +00:00
|
|
|
#
|
|
|
|
# Make sure to wrap static libs inside linker specific flags to turn on & off
|
|
|
|
# inclusion of all symbols inside the static libs
|
|
|
|
#
|
2000-11-15 03:37:45 +00:00
|
|
|
ifndef NO_LD_ARCHIVE_FLAGS
|
2000-04-23 17:48:04 +00:00
|
|
|
ifdef SHARED_LIBRARY_LIBS
|
|
|
|
EXTRA_DSO_LDOPTS := $(MKSHLIB_FORCE_ALL) $(SHARED_LIBRARY_LIBS) $(MKSHLIB_UNFORCE_ALL) $(EXTRA_DSO_LDOPTS)
|
|
|
|
endif
|
2000-11-15 03:37:45 +00:00
|
|
|
endif
|
2000-04-23 17:48:04 +00:00
|
|
|
|
1999-09-22 09:54:00 +00:00
|
|
|
#
|
|
|
|
# This will strip out symbols that the component shouldnt be
|
|
|
|
# exporting from the .dynsym section.
|
|
|
|
#
|
1999-09-16 13:43:15 +00:00
|
|
|
ifdef IS_COMPONENT
|
1999-09-22 09:54:00 +00:00
|
|
|
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS)
|
1999-09-16 13:43:15 +00:00
|
|
|
endif # IS_COMPONENT
|
|
|
|
|
2003-03-15 22:56:35 +00:00
|
|
|
#
|
|
|
|
# Enforce the requirement that MODULE_NAME must be set
|
|
|
|
# for components in static builds
|
|
|
|
#
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
ifdef EXPORT_LIBRARY
|
|
|
|
ifndef FORCE_SHARED_LIB
|
|
|
|
ifndef MODULE_NAME
|
|
|
|
$(error MODULE_NAME is required for components which may be used in static builds)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2000-03-11 03:08:04 +00:00
|
|
|
#
|
|
|
|
# MacOS X specific stuff
|
|
|
|
#
|
|
|
|
|
2001-04-05 03:36:56 +00:00
|
|
|
ifeq ($(OS_ARCH),Darwin)
|
2003-06-09 22:25:25 +00:00
|
|
|
ifdef SHARED_LIBRARY
|
2000-03-11 03:08:04 +00:00
|
|
|
ifdef IS_COMPONENT
|
|
|
|
EXTRA_DSO_LDOPTS += -bundle
|
|
|
|
else
|
2003-06-09 22:25:25 +00:00
|
|
|
EXTRA_DSO_LDOPTS += -dynamiclib -install_name @executable_path/$(SHARED_LIBRARY) -compatibility_version 1 -current_version 1
|
|
|
|
endif
|
2000-03-11 03:08:04 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2001-03-09 07:55:29 +00:00
|
|
|
#
|
|
|
|
# On NetBSD a.out systems, use -Bsymbolic. This fixes what would otherwise be
|
|
|
|
# fatal symbol name clashes between components.
|
|
|
|
#
|
|
|
|
ifeq ($(OS_ARCH),NetBSD)
|
|
|
|
ifeq ($(DLL_SUFFIX),.so.1.0)
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2003-01-30 07:41:27 +00:00
|
|
|
ifeq ($(OS_ARCH),FreeBSD)
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2001-03-09 07:55:29 +00:00
|
|
|
ifeq ($(OS_ARCH),NetBSD)
|
|
|
|
ifneq (,$(filter arc cobalt hpcmips mipsco newsmips pmax sgimips,$(OS_TEST)))
|
|
|
|
ifeq ($(MODULE),layout)
|
|
|
|
OS_CFLAGS += -Wa,-xgot
|
|
|
|
OS_CXXFLAGS += -Wa,-xgot
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2001-08-16 05:18:04 +00:00
|
|
|
ifeq ($(OS_ARCH),Linux)
|
|
|
|
ifneq (,$(filter mips mipsel,$(OS_TEST)))
|
|
|
|
ifeq ($(MODULE),layout)
|
|
|
|
OS_CFLAGS += -Wa,-xgot
|
|
|
|
OS_CXXFLAGS += -Wa,-xgot
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
1999-11-18 02:49:30 +00:00
|
|
|
#
|
|
|
|
# HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag
|
|
|
|
# which uses internal symbols first
|
|
|
|
#
|
|
|
|
ifeq ($(OS_ARCH),HP-UX)
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
ifeq ($(GNU_CC)$(GNU_CXX),)
|
|
|
|
EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
|
2001-11-02 14:24:34 +00:00
|
|
|
ifneq ($(HAS_EXTRAEXPORTS),1)
|
2002-10-02 10:10:06 +00:00
|
|
|
MKSHLIB += -Wl,+eNSGetModule -Wl,+eerrno
|
2004-02-26 07:34:27 +00:00
|
|
|
MKCSHLIB += +eNSGetModule +eerrno
|
2002-10-02 10:10:06 +00:00
|
|
|
ifneq ($(OS_TEST),ia64)
|
|
|
|
MKSHLIB += -Wl,+e_shlInit
|
2004-02-26 07:34:27 +00:00
|
|
|
MKCSHLIB += +e_shlInit
|
2002-10-02 10:10:06 +00:00
|
|
|
endif # !ia64
|
2001-11-02 14:24:34 +00:00
|
|
|
endif # !HAS_EXTRAEXPORTS
|
1999-11-18 02:49:30 +00:00
|
|
|
endif # non-gnu compilers
|
|
|
|
endif # IS_COMPONENT
|
|
|
|
endif # HP-UX
|
|
|
|
|
2001-11-08 12:15:48 +00:00
|
|
|
ifeq ($(OS_ARCH),AIX)
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
ifneq ($(HAS_EXTRAEXPORTS),1)
|
|
|
|
MKSHLIB += -bE:$(MOZILLA_DIR)/build/unix/aix.exp -bnoexpall
|
|
|
|
MKCSHLIB += -bE:$(MOZILLA_DIR)/build/unix/aix.exp -bnoexpall
|
|
|
|
endif # HAS_EXTRAEXPORTS
|
|
|
|
endif # IS_COMPONENT
|
|
|
|
endif # AIX
|
|
|
|
|
2002-10-11 05:18:39 +00:00
|
|
|
#
|
|
|
|
# OSF1: add -B symbolic flag for components
|
|
|
|
#
|
|
|
|
ifeq ($(OS_ARCH),OSF1)
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
ifeq ($(GNU_CC)$(GNU_CXX),)
|
|
|
|
EXTRA_DSO_LDOPTS += -B symbolic
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2002-02-14 04:32:11 +00:00
|
|
|
#
|
|
|
|
# Linux: add -Bsymbolic flag for components
|
|
|
|
#
|
|
|
|
ifeq ($(OS_ARCH),Linux)
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2003-03-18 22:04:00 +00:00
|
|
|
#
|
|
|
|
# MINGW32
|
|
|
|
#
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
ifdef GNU_CC
|
|
|
|
ifndef IS_COMPONENT
|
2004-03-16 08:07:25 +00:00
|
|
|
DSO_LDOPTS += -Wl,--out-implib -Wl,$(IMPORT_LIBRARY)
|
2003-03-18 22:04:00 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2000-03-31 01:24:48 +00:00
|
|
|
ifeq ($(USE_TVFS),1)
|
|
|
|
IFLAGS1 = -rb
|
|
|
|
IFLAGS2 = -rb
|
|
|
|
else
|
2001-07-24 23:41:43 +00:00
|
|
|
IFLAGS1 = -m 644
|
|
|
|
IFLAGS2 = -m 755
|
2000-03-31 01:24:48 +00:00
|
|
|
endif
|
1999-11-18 02:49:30 +00:00
|
|
|
|
2001-12-04 21:17:48 +00:00
|
|
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
|
|
|
OUTOPTION = -Fo# eol
|
|
|
|
else
|
|
|
|
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
|
|
|
|
OUTOPTION = -Fo# eol
|
|
|
|
else
|
|
|
|
OUTOPTION = -o # eol
|
|
|
|
endif # WINNT && !GNU_CC
|
|
|
|
endif # VACPP
|
2005-04-22 19:06:27 +00:00
|
|
|
ifneq (,$(filter WINCE,$(OS_ARCH)))
|
|
|
|
OUTOPTION = -Fo# eol
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS_TARGET), WINCE)
|
|
|
|
OUTOPTION = -Fo# eol
|
|
|
|
endif
|
2001-12-04 21:17:48 +00:00
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
################################################################################
|
|
|
|
|
2005-03-31 21:40:23 +00:00
|
|
|
# The root makefile doesn't want to do a plain export/libs, because
|
|
|
|
# of the tiers and because of libxul. Suppress the default rules in favor
|
|
|
|
# of something else. Makefiles which use this var *must* provide a sensible
|
|
|
|
# default rule before including rules.mk
|
|
|
|
ifndef SUPPRESS_DEFAULT_RULES
|
|
|
|
|
2001-11-30 22:53:10 +00:00
|
|
|
all::
|
|
|
|
$(MAKE) export
|
|
|
|
$(MAKE) libs
|
2006-03-22 07:24:46 +00:00
|
|
|
$(MAKE) tools
|
1998-03-28 02:44:41 +00:00
|
|
|
|
1999-01-21 07:42:44 +00:00
|
|
|
# Do depend as well
|
2001-11-30 22:53:10 +00:00
|
|
|
alldep::
|
|
|
|
$(MAKE) export
|
|
|
|
$(MAKE) depend
|
|
|
|
$(MAKE) libs
|
2006-03-22 07:24:46 +00:00
|
|
|
$(MAKE) tools
|
1999-01-21 07:42:44 +00:00
|
|
|
|
2005-03-31 21:40:23 +00:00
|
|
|
endif # SUPPRESS_DEFAULT_RULES
|
|
|
|
|
1999-01-21 07:42:44 +00:00
|
|
|
# Do everything from scratch
|
2001-11-30 22:53:10 +00:00
|
|
|
everything::
|
|
|
|
$(MAKE) clean
|
|
|
|
$(MAKE) alldep
|
1999-01-21 07:42:44 +00:00
|
|
|
|
2001-04-05 01:18:34 +00:00
|
|
|
# Add dummy depend target for tinderboxes
|
|
|
|
depend::
|
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
ifdef ALL_PLATFORMS
|
|
|
|
all_platforms:: $(NFSPWD)
|
|
|
|
@d=`$(NFSPWD)`; \
|
1999-08-24 21:45:06 +00:00
|
|
|
if test ! -d LOGS; then rm -rf LOGS; mkdir LOGS; else true; fi; \
|
1998-03-28 02:44:41 +00:00
|
|
|
for h in $(PLATFORM_HOSTS); do \
|
|
|
|
echo "On $$h: $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log";\
|
|
|
|
rsh $$h -n "(chdir $$d; \
|
|
|
|
$(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log; \
|
|
|
|
echo DONE) &" 2>&1 > LOGS/$$h.pid & \
|
|
|
|
sleep 1; \
|
|
|
|
done
|
|
|
|
|
|
|
|
$(NFSPWD):
|
|
|
|
cd $(@D); $(MAKE) $(@F)
|
|
|
|
endif
|
|
|
|
|
1999-09-03 22:18:30 +00:00
|
|
|
# Target to only regenerate makefiles
|
|
|
|
makefiles: $(SUBMAKEFILES)
|
2004-12-08 12:38:22 +00:00
|
|
|
ifneq (,$(DIRS)$(TOOL_DIRS))
|
|
|
|
@for d in $(TOOL_DIRS) $(filter-out $(STATIC_MAKEFILES), $(DIRS)); do\
|
2000-04-21 01:14:45 +00:00
|
|
|
$(UPDATE_TITLE) \
|
2003-06-05 04:59:02 +00:00
|
|
|
$(MAKE) -C $$d $@; \
|
1999-09-03 22:18:30 +00:00
|
|
|
done
|
|
|
|
endif
|
|
|
|
|
2002-04-19 02:42:28 +00:00
|
|
|
export:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
1998-03-28 02:44:41 +00:00
|
|
|
+$(LOOP_OVER_DIRS)
|
2004-12-08 12:38:22 +00:00
|
|
|
+$(LOOP_OVER_TOOL_DIRS)
|
|
|
|
|
|
|
|
tools:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
|
|
|
+$(LOOP_OVER_DIRS)
|
2005-10-10 23:09:50 +00:00
|
|
|
ifdef TOOL_DIRS
|
2005-12-19 15:42:13 +00:00
|
|
|
@$(EXIT_ON_ERROR) \
|
|
|
|
for d in $(TOOL_DIRS); do \
|
2004-12-08 12:38:22 +00:00
|
|
|
$(UPDATE_TITLE) \
|
|
|
|
$(MAKE) -C $$d libs; \
|
|
|
|
done
|
2005-10-10 23:09:50 +00:00
|
|
|
endif
|
2005-01-12 11:23:43 +00:00
|
|
|
|
2001-04-28 18:51:31 +00:00
|
|
|
#
|
|
|
|
# Rule to create list of libraries for final link
|
|
|
|
#
|
|
|
|
export::
|
|
|
|
ifdef LIBRARY_NAME
|
|
|
|
ifdef EXPORT_LIBRARY
|
|
|
|
ifdef IS_COMPONENT
|
2001-06-18 22:10:38 +00:00
|
|
|
ifdef BUILD_STATIC_LIBS
|
2001-08-17 12:06:03 +00:00
|
|
|
@$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMPS) $(LIBRARY_NAME)
|
2001-06-20 20:21:49 +00:00
|
|
|
ifdef MODULE_NAME
|
2001-08-17 12:06:03 +00:00
|
|
|
@$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_COMP_NAMES) $(MODULE_NAME)
|
2001-06-20 20:21:49 +00:00
|
|
|
endif
|
2001-04-28 18:51:31 +00:00
|
|
|
endif
|
|
|
|
else
|
2001-08-17 12:06:03 +00:00
|
|
|
$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl $(FINAL_LINK_LIBS) $(LIBRARY_NAME)
|
2001-04-28 18:51:31 +00:00
|
|
|
endif # IS_COMPONENT
|
|
|
|
endif # EXPORT_LIBRARY
|
|
|
|
endif # LIBRARY_NAME
|
|
|
|
|
2005-11-08 23:08:05 +00:00
|
|
|
# Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries
|
2004-02-07 08:22:28 +00:00
|
|
|
LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(LIBS))
|
|
|
|
HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(HOST_LIBS))
|
2005-11-08 23:08:05 +00:00
|
|
|
DSO_LDOPTS_DEPS = $(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS))
|
2004-01-23 21:21:38 +00:00
|
|
|
|
2000-03-31 01:24:48 +00:00
|
|
|
##############################################
|
2001-11-21 08:55:59 +00:00
|
|
|
libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(HOST_PROGRAM) $(PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS) $(MAPS)
|
2001-12-31 09:04:25 +00:00
|
|
|
ifndef NO_DIST_INSTALL
|
2001-06-18 22:10:38 +00:00
|
|
|
ifneq (,$(BUILD_STATIC_LIBS)$(FORCE_STATIC_LIB))
|
1998-03-28 02:44:41 +00:00
|
|
|
ifdef LIBRARY
|
2002-12-28 03:30:04 +00:00
|
|
|
ifdef IS_COMPONENT
|
2003-02-28 22:02:21 +00:00
|
|
|
$(INSTALL) $(IFLAGS1) $(LIBRARY) $(DIST)/lib/components
|
2002-12-28 03:30:04 +00:00
|
|
|
else
|
2000-06-21 00:54:56 +00:00
|
|
|
$(INSTALL) $(IFLAGS1) $(LIBRARY) $(DIST)/lib
|
1998-03-28 02:44:41 +00:00
|
|
|
endif
|
2001-04-28 18:51:31 +00:00
|
|
|
endif # LIBRARY
|
2001-06-18 22:10:38 +00:00
|
|
|
endif # BUILD_STATIC_LIBS || FORCE_STATIC_LIB
|
1998-03-28 02:44:41 +00:00
|
|
|
ifdef MAPS
|
2005-02-18 22:17:37 +00:00
|
|
|
$(INSTALL) $(IFLAGS1) $(MAPS) $(FINAL_TARGET)
|
1998-03-28 02:44:41 +00:00
|
|
|
endif
|
|
|
|
ifdef SHARED_LIBRARY
|
1999-03-03 01:25:21 +00:00
|
|
|
ifdef IS_COMPONENT
|
2005-02-18 22:17:37 +00:00
|
|
|
$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/components
|
|
|
|
$(ELF_DYNSTR_GC) $(FINAL_TARGET)/components/$(SHARED_LIBRARY)
|
2000-09-17 18:40:42 +00:00
|
|
|
ifdef BEOS_ADDON_WORKAROUND
|
2005-02-18 22:17:37 +00:00
|
|
|
( cd $(FINAL_TARGET)/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
|
2000-09-17 18:40:42 +00:00
|
|
|
endif
|
2000-03-31 01:24:48 +00:00
|
|
|
else # ! IS_COMPONENT
|
2005-04-22 19:06:27 +00:00
|
|
|
ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
|
2000-03-31 01:24:48 +00:00
|
|
|
$(INSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(DIST)/lib
|
1999-03-03 01:25:21 +00:00
|
|
|
else
|
2000-06-21 00:54:56 +00:00
|
|
|
$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/lib
|
|
|
|
endif
|
2005-02-18 22:17:37 +00:00
|
|
|
$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)
|
2000-09-17 05:32:36 +00:00
|
|
|
ifdef BEOS_ADDON_WORKAROUND
|
2005-02-18 22:17:37 +00:00
|
|
|
( cd $(FINAL_TARGET) && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
|
1998-03-28 02:44:41 +00:00
|
|
|
endif
|
2000-09-17 18:40:42 +00:00
|
|
|
endif # IS_COMPONENT
|
2000-09-17 05:32:36 +00:00
|
|
|
endif # SHARED_LIBRARY
|
1998-03-28 02:44:41 +00:00
|
|
|
ifdef PROGRAM
|
2005-02-18 22:17:37 +00:00
|
|
|
$(INSTALL) $(IFLAGS2) $(PROGRAM) $(FINAL_TARGET)
|
1999-01-23 11:41:15 +00:00
|
|
|
endif
|
|
|
|
ifdef SIMPLE_PROGRAMS
|
2005-02-18 22:17:37 +00:00
|
|
|
$(INSTALL) $(IFLAGS2) $(SIMPLE_PROGRAMS) $(FINAL_TARGET)
|
2000-03-31 07:18:52 +00:00
|
|
|
endif
|
|
|
|
ifdef HOST_PROGRAM
|
|
|
|
$(INSTALL) $(IFLAGS2) $(HOST_PROGRAM) $(DIST)/host/bin
|
|
|
|
endif
|
|
|
|
ifdef HOST_SIMPLE_PROGRAMS
|
|
|
|
$(INSTALL) $(IFLAGS2) $(HOST_SIMPLE_PROGRAMS) $(DIST)/host/bin
|
|
|
|
endif
|
|
|
|
ifdef HOST_LIBRARY
|
|
|
|
$(INSTALL) $(IFLAGS1) $(HOST_LIBRARY) $(DIST)/host/lib
|
1998-03-28 02:44:41 +00:00
|
|
|
endif
|
2001-12-31 09:04:25 +00:00
|
|
|
endif # !NO_DIST_INSTALL
|
1998-03-28 02:44:41 +00:00
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
|
2002-04-25 02:52:44 +00:00
|
|
|
##############################################
|
|
|
|
install:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
|
|
|
+$(LOOP_OVER_DIRS)
|
2004-12-08 12:38:22 +00:00
|
|
|
+$(LOOP_OVER_TOOL_DIRS)
|
2002-04-25 02:52:44 +00:00
|
|
|
|
|
|
|
ifndef NO_INSTALL
|
2005-12-13 17:25:26 +00:00
|
|
|
ifneq (,$(EXPORTS))
|
|
|
|
install:: $(EXPORTS)
|
2002-04-25 02:52:44 +00:00
|
|
|
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(includedir)/$(MODULE)
|
|
|
|
endif
|
|
|
|
|
2005-12-13 17:25:26 +00:00
|
|
|
ifneq (,$(SDK_HEADERS))
|
2002-06-13 09:07:40 +00:00
|
|
|
install:: $(SDK_HEADERS)
|
2005-12-13 17:25:26 +00:00
|
|
|
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(includedir)/$(MODULE)
|
2002-06-13 09:07:40 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2002-04-25 02:52:44 +00:00
|
|
|
install:: $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS)
|
|
|
|
ifndef NO_INSTALL
|
|
|
|
#ifdef LIBRARY
|
|
|
|
#ifndef IS_COMPONENT
|
|
|
|
#ifdef MRE_DIST
|
|
|
|
# $(SYSINSTALL) $(IFLAGS1) $(LIBRARY) $(DESTDIR)$(mredir)
|
|
|
|
#else
|
|
|
|
# $(SYSINSTALL) $(IFLAGS1) $(LIBRARY) $(DESTDIR)$(mozappdir)
|
|
|
|
#endif
|
|
|
|
#endif # !IS_COMPONENT
|
|
|
|
#endif # LIBRARY
|
|
|
|
ifdef SHARED_LIBRARY
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
ifdef MRE_DIST
|
2003-02-28 22:02:21 +00:00
|
|
|
$(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(DESTDIR)$(mredir)/components
|
2002-04-25 02:52:44 +00:00
|
|
|
else
|
2003-02-28 22:02:21 +00:00
|
|
|
$(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(DESTDIR)$(mozappdir)/components
|
2002-04-25 02:52:44 +00:00
|
|
|
endif
|
|
|
|
else
|
|
|
|
ifdef MRE_DIST
|
|
|
|
$(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(DESTDIR)$(mredir)
|
|
|
|
else
|
|
|
|
$(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(DESTDIR)$(mozappdir)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif # SHARED_LIBRARY
|
|
|
|
ifdef PROGRAM
|
|
|
|
ifdef MRE_DIST
|
|
|
|
$(SYSINSTALL) $(IFLAGS2) $(PROGRAM) $(DESTDIR)$(mredir)
|
|
|
|
else
|
|
|
|
$(SYSINSTALL) $(IFLAGS2) $(PROGRAM) $(DESTDIR)$(mozappdir)
|
|
|
|
endif
|
|
|
|
endif # PROGRAM
|
|
|
|
ifdef SIMPLE_PROGRAMS
|
|
|
|
ifdef MRE_DIST
|
|
|
|
$(SYSINSTALL) $(IFLAGS2) $(SIMPLE_PROGRAMS) $(DESTDIR)$(mredir)
|
|
|
|
else
|
|
|
|
$(SYSINSTALL) $(IFLAGS2) $(SIMPLE_PROGRAMS) $(DESTDIR)$(mozappdir)
|
|
|
|
endif
|
|
|
|
endif # SIMPLE_PROGRAMS
|
|
|
|
endif # NO_INSTALL
|
|
|
|
|
1999-02-17 17:33:07 +00:00
|
|
|
checkout:
|
2000-03-31 01:24:48 +00:00
|
|
|
$(MAKE) -C $(topsrcdir) -f client.mk checkout
|
1999-02-17 17:33:07 +00:00
|
|
|
|
2005-02-18 22:17:37 +00:00
|
|
|
run_viewer: $(FINAL_TARGET)/viewer
|
|
|
|
cd $(FINAL_TARGET); \
|
1999-03-31 19:07:29 +00:00
|
|
|
MOZILLA_FIVE_HOME=`pwd` \
|
1999-02-18 18:44:48 +00:00
|
|
|
LD_LIBRARY_PATH=".:$(LIBS_PATH):$$LD_LIBRARY_PATH" \
|
|
|
|
viewer
|
|
|
|
|
2000-03-14 03:00:52 +00:00
|
|
|
clean clobber realclean clobber_all:: $(SUBMAKEFILES)
|
2001-06-26 21:21:10 +00:00
|
|
|
-rm -f $(ALL_TRASH)
|
|
|
|
-rm -rf $(ALL_TRASH_DIRS)
|
1998-03-28 02:44:41 +00:00
|
|
|
+$(LOOP_OVER_DIRS)
|
2004-12-08 12:38:22 +00:00
|
|
|
+$(LOOP_OVER_TOOL_DIRS)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
1999-08-24 21:45:06 +00:00
|
|
|
distclean:: $(SUBMAKEFILES)
|
2000-03-14 06:16:27 +00:00
|
|
|
+$(LOOP_OVER_DIRS)
|
2004-12-08 12:38:22 +00:00
|
|
|
+$(LOOP_OVER_TOOL_DIRS)
|
2001-06-16 23:47:49 +00:00
|
|
|
-rm -rf $(ALL_TRASH_DIRS)
|
|
|
|
-rm -f $(ALL_TRASH) \
|
2000-12-12 21:28:24 +00:00
|
|
|
Makefile .HSancillary \
|
2005-06-29 16:28:02 +00:00
|
|
|
$(wildcard *.$(OBJ_SUFFIX)) $(wildcard *.ho) $(wildcard host_*.o*) \
|
2003-04-23 00:54:38 +00:00
|
|
|
$(wildcard *.$(LIB_SUFFIX)) $(wildcard *$(DLL_SUFFIX)) \
|
|
|
|
$(wildcard *.$(IMPORT_LIB_SUFFIX))
|
2001-06-16 23:47:49 +00:00
|
|
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
|
|
|
-rm -f $(PROGRAM:.exe=.map)
|
|
|
|
endif
|
1999-06-03 22:23:06 +00:00
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
alltags:
|
|
|
|
rm -f TAGS
|
1999-06-11 20:21:48 +00:00
|
|
|
find $(topsrcdir) -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' -o -name '*.idl' \) -print | $(TAG_PROGRAM)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
1999-01-23 11:41:15 +00:00
|
|
|
#
|
|
|
|
# PROGRAM = Foo
|
|
|
|
# creates OBJS, links with LIBS to create Foo
|
|
|
|
#
|
2004-02-07 08:22:28 +00:00
|
|
|
$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) $(EXE_DEF_FILE) $(RESFILE) Makefile Makefile.in
|
2005-04-22 19:06:27 +00:00
|
|
|
ifeq (WINCE,$(OS_ARCH))
|
2005-06-01 14:28:35 +00:00
|
|
|
$(LD) -NOLOGO -OUT:$@ $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
2005-04-22 19:06:27 +00:00
|
|
|
else
|
2000-03-31 01:24:48 +00:00
|
|
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
2005-06-01 14:28:35 +00:00
|
|
|
$(LD) -OUT:$@ $(LDFLAGS) $(PROGOBJS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(EXE_DEF_FILE) -ST:0x100000
|
1998-03-28 02:44:41 +00:00
|
|
|
else
|
2005-04-22 19:06:27 +00:00
|
|
|
|
2001-12-09 07:08:58 +00:00
|
|
|
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
|
2005-06-01 14:28:35 +00:00
|
|
|
$(LD) -NOLOGO -OUT:$@ -PDB:$(PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(PROGOBJS) $(RESFILE) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
2006-01-23 17:16:17 +00:00
|
|
|
ifdef MSMANIFEST_TOOL
|
|
|
|
@if test -f $@.manifest; then \
|
2006-03-21 14:49:45 +00:00
|
|
|
if test -f "$(srcdir)/$@.manifest"; then \
|
|
|
|
mt.exe -NOLOGO -MANIFEST "$(win_srcdir)/$@.manifest" $@.manifest -OUTPUTRESOURCE:$@\;1; \
|
|
|
|
else \
|
|
|
|
mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
|
|
|
|
fi; \
|
2006-01-23 17:16:17 +00:00
|
|
|
rm -f $@.manifest; \
|
|
|
|
fi
|
|
|
|
endif # MSVC with manifest tool
|
2001-12-09 07:08:58 +00:00
|
|
|
else
|
1999-02-17 00:32:17 +00:00
|
|
|
ifeq ($(CPP_PROG_LINK),1)
|
2004-06-21 20:56:14 +00:00
|
|
|
$(CCC) -o $@ $(CXXFLAGS) $(WRAP_MALLOC_CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(EXE_DEF_FILE)
|
2000-03-31 10:49:39 +00:00
|
|
|
else # ! CPP_PROG_LINK
|
2004-06-21 20:56:14 +00:00
|
|
|
$(CC) -o $@ $(CFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE)
|
2000-12-05 03:49:03 +00:00
|
|
|
endif # CPP_PROG_LINK
|
2001-12-09 07:08:58 +00:00
|
|
|
endif # WINNT && !GNU_CC
|
2000-12-05 03:49:03 +00:00
|
|
|
endif # OS2
|
2005-04-22 19:06:27 +00:00
|
|
|
endif # WINCE
|
|
|
|
|
2001-10-26 08:36:28 +00:00
|
|
|
ifdef ENABLE_STRIP
|
|
|
|
$(STRIP) $@
|
|
|
|
endif
|
2001-10-26 12:39:30 +00:00
|
|
|
ifdef MOZ_POST_PROGRAM_COMMAND
|
|
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
|
|
|
endif
|
1999-06-26 08:16:01 +00:00
|
|
|
ifeq ($(OS_ARCH),BeOS)
|
|
|
|
ifdef BEOS_PROGRAM_RESOURCE
|
|
|
|
xres -o $@ $(BEOS_PROGRAM_RESOURCE)
|
|
|
|
mimeset $@
|
|
|
|
endif
|
2000-03-31 10:49:39 +00:00
|
|
|
endif # BeOS
|
1999-01-23 09:36:40 +00:00
|
|
|
|
2004-02-20 22:14:14 +00:00
|
|
|
$(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) Makefile Makefile.in
|
2003-01-15 21:36:53 +00:00
|
|
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
2005-06-22 15:55:32 +00:00
|
|
|
$(LD) -OUT:$@ $(LDFLAGS) $(HOST_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS) -ST:0x100000
|
2003-01-15 21:36:53 +00:00
|
|
|
else
|
2005-04-22 19:06:27 +00:00
|
|
|
ifeq (WINCE,$(OS_ARCH))
|
2005-06-22 15:55:32 +00:00
|
|
|
$(HOST_LD) -NOLOGO -OUT:$@ $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
2005-06-29 16:28:02 +00:00
|
|
|
else
|
2006-01-24 17:25:42 +00:00
|
|
|
ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH))
|
2005-06-22 15:55:32 +00:00
|
|
|
$(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
2006-01-23 17:16:17 +00:00
|
|
|
ifdef MSMANIFEST_TOOL
|
|
|
|
@if test -f $@.manifest; then \
|
|
|
|
mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
|
|
|
|
rm -f $@.manifest; \
|
|
|
|
fi
|
|
|
|
endif # MSVC with manifest tool
|
2002-11-15 03:41:17 +00:00
|
|
|
else
|
2004-02-20 22:14:14 +00:00
|
|
|
$(HOST_CC) -o $@ $(HOST_CFLAGS) $(HOST_LDFLAGS) $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
2002-11-15 03:41:17 +00:00
|
|
|
endif
|
2003-01-15 21:36:53 +00:00
|
|
|
endif
|
2005-06-29 16:28:02 +00:00
|
|
|
endif
|
2000-03-31 07:18:52 +00:00
|
|
|
|
1999-01-23 11:41:15 +00:00
|
|
|
#
|
|
|
|
# This is an attempt to support generation of multiple binaries
|
|
|
|
# in one directory, it assumes everything to compile Foo is in
|
|
|
|
# Foo.o (from either Foo.c or Foo.cpp).
|
|
|
|
#
|
|
|
|
# SIMPLE_PROGRAMS = Foo Bar
|
|
|
|
# creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
|
|
|
|
#
|
2004-02-07 08:22:28 +00:00
|
|
|
$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
|
2005-04-22 19:06:27 +00:00
|
|
|
ifeq (WINCE,$(OS_ARCH))
|
2005-06-01 14:28:35 +00:00
|
|
|
$(LD) -nologo -entry:main -out:$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
2005-04-22 19:06:27 +00:00
|
|
|
else
|
2000-03-31 01:24:48 +00:00
|
|
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
2005-06-01 14:28:35 +00:00
|
|
|
$(LD) -Out:$@ $< $(LDFLAGS) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS)
|
2000-03-31 01:24:48 +00:00
|
|
|
else
|
2001-12-09 07:08:58 +00:00
|
|
|
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
|
2005-06-01 14:28:35 +00:00
|
|
|
$(LD) -nologo -out:$@ -pdb:$(PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS) $(EXTRA_LIBS) $(OS_LIBS)
|
2006-01-23 17:16:17 +00:00
|
|
|
ifdef MSMANIFEST_TOOL
|
|
|
|
@if test -f $@.manifest; then \
|
|
|
|
mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
|
|
|
|
rm -f $@.manifest; \
|
|
|
|
fi
|
|
|
|
endif # MSVC with manifest tool
|
2000-03-31 01:24:48 +00:00
|
|
|
else
|
2001-12-09 07:08:58 +00:00
|
|
|
ifeq ($(CPP_PROG_LINK),1)
|
2004-06-21 20:56:14 +00:00
|
|
|
$(CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(BIN_FLAGS)
|
1999-01-23 12:20:00 +00:00
|
|
|
else
|
2004-06-21 20:56:14 +00:00
|
|
|
$(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(BIN_FLAGS)
|
2001-12-09 07:08:58 +00:00
|
|
|
endif # CPP_PROG_LINK
|
|
|
|
endif # WINNT && !GNU_CC
|
|
|
|
endif # OS/2 VACPP
|
2005-04-22 19:06:27 +00:00
|
|
|
endif # WINCE
|
|
|
|
|
2001-10-26 08:36:28 +00:00
|
|
|
ifdef ENABLE_STRIP
|
|
|
|
$(STRIP) $@
|
1999-01-23 12:20:00 +00:00
|
|
|
endif
|
2001-10-26 12:39:30 +00:00
|
|
|
ifdef MOZ_POST_PROGRAM_COMMAND
|
|
|
|
$(MOZ_POST_PROGRAM_COMMAND) $@
|
|
|
|
endif
|
1999-01-23 11:41:15 +00:00
|
|
|
|
2005-06-29 16:28:02 +00:00
|
|
|
$(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): host_%.$(OBJ_SUFFIX) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) Makefile Makefile.in
|
2006-01-24 17:25:42 +00:00
|
|
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
|
|
|
$(HOST_LD) -OUT:$@ $< $(LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS) -ST:0x100000
|
|
|
|
else
|
2005-07-05 17:02:20 +00:00
|
|
|
ifeq (WINCE,$(OS_ARCH))
|
|
|
|
$(HOST_LD) -NOLOGO -OUT:$@ $(WIN32_EXE_LDFLAGS) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
2006-01-24 17:25:42 +00:00
|
|
|
else
|
|
|
|
ifeq (WINNT_,$(HOST_OS_ARCH)_$(GNU_CC))
|
|
|
|
$(HOST_LD) -NOLOGO -OUT:$@ -PDB:$(PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
2005-07-05 17:02:20 +00:00
|
|
|
else
|
2002-11-15 03:41:17 +00:00
|
|
|
$(HOST_CC) $(OUTOPTION)$@ $(HOST_CFLAGS) $(INCLUDES) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
2005-07-05 17:02:20 +00:00
|
|
|
endif
|
2006-01-24 17:25:42 +00:00
|
|
|
endif
|
|
|
|
endif
|
2000-03-31 07:18:52 +00:00
|
|
|
|
1999-01-27 07:17:32 +00:00
|
|
|
#
|
|
|
|
# Purify target. Solaris/sparc only to start.
|
|
|
|
# Purify does not recognize "egcs" or "c++" so we go with
|
|
|
|
# "gcc" and "g++" for now.
|
|
|
|
#
|
|
|
|
pure: $(PROGRAM)
|
1999-02-17 00:32:17 +00:00
|
|
|
ifeq ($(CPP_PROG_LINK),1)
|
1999-12-22 03:40:16 +00:00
|
|
|
$(PURIFY) $(CCC) -o $^.pure $(CXXFLAGS) $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS)
|
1999-01-27 07:17:32 +00:00
|
|
|
else
|
1999-12-22 03:40:16 +00:00
|
|
|
$(PURIFY) $(CC) -o $^.pure $(CFLAGS) $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS)
|
1999-01-27 07:17:32 +00:00
|
|
|
endif
|
2001-12-31 09:04:25 +00:00
|
|
|
ifndef NO_DIST_INSTALL
|
2005-02-18 22:17:37 +00:00
|
|
|
$(INSTALL) $(IFLAGS2) $^.pure $(FINAL_TARGET)
|
2001-12-31 09:04:25 +00:00
|
|
|
endif
|
1999-01-23 11:41:15 +00:00
|
|
|
|
1999-03-10 08:32:42 +00:00
|
|
|
quantify: $(PROGRAM)
|
|
|
|
ifeq ($(CPP_PROG_LINK),1)
|
1999-12-22 03:40:16 +00:00
|
|
|
$(QUANTIFY) $(CCC) -o $^.quantify $(CXXFLAGS) $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS)
|
1999-03-10 08:32:42 +00:00
|
|
|
else
|
1999-12-22 03:40:16 +00:00
|
|
|
$(QUANTIFY) $(CC) -o $^.quantify $(CFLAGS) $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS)
|
1999-03-10 08:32:42 +00:00
|
|
|
endif
|
2001-12-31 09:04:25 +00:00
|
|
|
ifndef NO_DIST_INSTALL
|
2005-02-18 22:17:37 +00:00
|
|
|
$(INSTALL) $(IFLAGS2) $^.quantify $(FINAL_TARGET)
|
2001-12-31 09:04:25 +00:00
|
|
|
endif
|
1999-03-10 08:32:42 +00:00
|
|
|
|
1999-03-25 21:01:59 +00:00
|
|
|
#
|
|
|
|
# This allows us to create static versions of the shared libraries
|
|
|
|
# that are built using other static libraries. Confused...?
|
|
|
|
#
|
|
|
|
ifdef SHARED_LIBRARY_LIBS
|
2005-04-22 19:06:27 +00:00
|
|
|
ifeq (,$(GNU_LD)$(filter-out OS2 WINNT WINCE, $(OS_ARCH)))
|
2002-06-17 17:09:57 +00:00
|
|
|
ifneq (,$(BUILD_STATIC_LIBS)$(FORCE_STATIC_LIB))
|
2002-01-25 03:20:51 +00:00
|
|
|
LOBJS += $(SHARED_LIBRARY_LIBS)
|
2002-06-17 17:09:57 +00:00
|
|
|
endif
|
2002-01-25 03:20:51 +00:00
|
|
|
else
|
|
|
|
ifneq (,$(filter OSF1 BSD_OS FreeBSD NetBSD OpenBSD SunOS Darwin,$(OS_ARCH)))
|
1999-05-20 03:27:20 +00:00
|
|
|
CLEANUP1 := | egrep -v '(________64ELEL_|__.SYMDEF)'
|
|
|
|
CLEANUP2 := rm -f ________64ELEL_ __.SYMDEF
|
1999-04-06 23:26:00 +00:00
|
|
|
else
|
|
|
|
CLEANUP2 := true
|
|
|
|
endif
|
|
|
|
SUB_LOBJS = $(shell for lib in $(SHARED_LIBRARY_LIBS); do $(AR_LIST) $${lib} $(CLEANUP1); done;)
|
1999-03-25 21:01:59 +00:00
|
|
|
endif
|
2001-12-18 09:14:29 +00:00
|
|
|
endif
|
|
|
|
|
2003-01-10 01:14:49 +00:00
|
|
|
$(LIBRARY): $(OBJS) $(LOBJS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) Makefile Makefile.in
|
1998-03-28 02:44:41 +00:00
|
|
|
rm -f $@
|
2005-04-22 19:06:27 +00:00
|
|
|
ifneq (,$(GNU_LD)$(filter-out OS2 WINNT WINCE, $(OS_ARCH)))
|
1999-03-25 21:01:59 +00:00
|
|
|
ifdef SHARED_LIBRARY_LIBS
|
|
|
|
@rm -f $(SUB_LOBJS)
|
1999-04-06 23:26:00 +00:00
|
|
|
@for lib in $(SHARED_LIBRARY_LIBS); do $(AR_EXTRACT) $${lib}; $(CLEANUP2); done
|
2002-01-25 03:20:51 +00:00
|
|
|
endif
|
1999-03-25 21:01:59 +00:00
|
|
|
endif
|
1999-08-29 18:10:23 +00:00
|
|
|
$(AR) $(AR_FLAGS) $(OBJS) $(LOBJS) $(SUB_LOBJS)
|
1998-03-28 02:44:41 +00:00
|
|
|
$(RANLIB) $@
|
1999-03-25 21:01:59 +00:00
|
|
|
@rm -f foodummyfilefoo $(SUB_LOBJS)
|
1999-10-08 05:18:46 +00:00
|
|
|
|
2005-04-22 19:06:27 +00:00
|
|
|
ifeq (,$(filter-out WINNT WINCE, $(OS_ARCH)))
|
2002-04-19 02:42:28 +00:00
|
|
|
$(IMPORT_LIBRARY): $(SHARED_LIBRARY)
|
|
|
|
endif
|
|
|
|
|
2003-03-24 14:07:08 +00:00
|
|
|
ifeq ($(OS_ARCH),OS2)
|
|
|
|
$(DEF_FILE): $(OBJS) $(SHARED_LIBRARY_LIBS)
|
1998-03-28 02:44:41 +00:00
|
|
|
rm -f $@
|
2003-03-24 14:07:08 +00:00
|
|
|
echo LIBRARY $(LIBRARY_NAME) INITINSTANCE TERMINSTANCE > $@
|
|
|
|
echo PROTMODE >> $@
|
|
|
|
echo CODE LOADONCALL MOVEABLE DISCARDABLE >> $@
|
|
|
|
echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@
|
|
|
|
echo EXPORTS >> $@
|
2001-03-12 03:33:50 +00:00
|
|
|
ifeq ($(IS_COMPONENT),1)
|
|
|
|
ifeq ($(HAS_EXTRAEXPORTS),1)
|
2006-03-08 18:47:19 +00:00
|
|
|
ifndef MOZ_OS2_USE_DECLSPEC
|
2003-03-24 14:07:08 +00:00
|
|
|
$(FILTER) $(OBJS) $(SHARED_LIBRARY_LIBS) >> $@
|
2006-03-08 18:47:19 +00:00
|
|
|
endif
|
2000-03-31 01:24:48 +00:00
|
|
|
else
|
2003-09-18 17:24:54 +00:00
|
|
|
echo _NSGetModule >> $@
|
2001-03-12 03:33:50 +00:00
|
|
|
endif
|
|
|
|
else
|
2006-03-08 18:47:19 +00:00
|
|
|
ifndef MOZ_OS2_USE_DECLSPEC
|
2003-03-24 14:07:08 +00:00
|
|
|
$(FILTER) $(OBJS) $(SHARED_LIBRARY_LIBS) >> $@
|
2006-03-08 18:47:19 +00:00
|
|
|
endif
|
2000-03-31 01:24:48 +00:00
|
|
|
endif
|
|
|
|
$(ADD_TO_DEF_FILE)
|
2001-07-01 12:11:13 +00:00
|
|
|
|
2006-03-08 18:47:19 +00:00
|
|
|
ifdef MOZ_OS2_USE_DECLSPEC
|
|
|
|
$(IMPORT_LIBRARY): $(SHARED_LIBRARY)
|
|
|
|
else
|
2003-03-24 14:07:08 +00:00
|
|
|
$(IMPORT_LIBRARY): $(DEF_FILE)
|
2006-03-08 18:47:19 +00:00
|
|
|
endif
|
2000-03-31 01:24:48 +00:00
|
|
|
rm -f $@
|
2006-03-08 18:47:19 +00:00
|
|
|
$(IMPLIB) $@ $^
|
1998-03-28 02:44:41 +00:00
|
|
|
$(RANLIB) $@
|
2001-12-04 21:17:48 +00:00
|
|
|
endif # OS/2
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2000-03-31 07:18:52 +00:00
|
|
|
$(HOST_LIBRARY): $(HOST_OBJS) Makefile
|
|
|
|
rm -f $@
|
2002-09-20 08:57:51 +00:00
|
|
|
$(HOST_AR) $(HOST_AR_FLAGS) $(HOST_OBJS)
|
2000-03-31 07:18:52 +00:00
|
|
|
$(HOST_RANLIB) $@
|
|
|
|
|
2000-04-23 17:48:04 +00:00
|
|
|
ifdef NO_LD_ARCHIVE_FLAGS
|
|
|
|
SUB_SHLOBJS = $(SUB_LOBJS)
|
|
|
|
endif
|
|
|
|
|
2004-01-23 08:15:49 +00:00
|
|
|
$(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) Makefile Makefile.in
|
2003-09-16 22:36:02 +00:00
|
|
|
ifndef INCREMENTAL_LINKER
|
1998-03-28 02:44:41 +00:00
|
|
|
rm -f $@
|
2003-09-16 22:36:02 +00:00
|
|
|
endif
|
2003-03-24 14:07:08 +00:00
|
|
|
ifneq ($(MOZ_OS2_TOOLS),VACPP)
|
2002-12-12 00:08:59 +00:00
|
|
|
ifeq ($(OS_ARCH),OpenVMS)
|
|
|
|
@if test ! -f $(VMS_SYMVEC_FILE); then \
|
|
|
|
if test -f $(VMS_SYMVEC_FILE_MODULE); then \
|
|
|
|
echo Creating specific component options file $(VMS_SYMVEC_FILE); \
|
|
|
|
cp $(VMS_SYMVEC_FILE_MODULE) $(VMS_SYMVEC_FILE); \
|
|
|
|
fi; \
|
|
|
|
fi
|
|
|
|
ifdef IS_COMPONENT
|
|
|
|
@if test ! -f $(VMS_SYMVEC_FILE); then \
|
|
|
|
echo Creating generic component options file $(VMS_SYMVEC_FILE); \
|
|
|
|
cp $(VMS_SYMVEC_FILE_COMP) $(VMS_SYMVEC_FILE); \
|
|
|
|
fi
|
|
|
|
endif
|
|
|
|
endif
|
2000-04-23 17:48:04 +00:00
|
|
|
ifdef NO_LD_ARCHIVE_FLAGS
|
1999-08-03 02:08:12 +00:00
|
|
|
ifdef SHARED_LIBRARY_LIBS
|
2000-04-23 17:48:04 +00:00
|
|
|
@rm -f $(SUB_SHLOBJS)
|
1999-08-03 02:08:12 +00:00
|
|
|
@for lib in $(SHARED_LIBRARY_LIBS); do $(AR_EXTRACT) $${lib}; $(CLEANUP2); done
|
2000-04-23 17:48:04 +00:00
|
|
|
endif # SHARED_LIBRARY_LIBS
|
|
|
|
endif # NO_LD_ARCHIVE_FLAGS
|
2002-01-01 00:03:57 +00:00
|
|
|
$(MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
|
2006-01-23 17:16:17 +00:00
|
|
|
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
|
|
|
|
ifdef MSMANIFEST_TOOL
|
2006-03-03 15:35:34 +00:00
|
|
|
ifdef EMBED_MANIFEST_AT
|
2006-01-23 17:16:17 +00:00
|
|
|
@if test -f $@.manifest; then \
|
2006-03-03 15:35:34 +00:00
|
|
|
mt.exe -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;$(EMBED_MANIFEST_AT); \
|
2006-01-23 17:16:17 +00:00
|
|
|
rm -f $@.manifest; \
|
|
|
|
fi
|
2006-03-03 15:35:34 +00:00
|
|
|
endif # embed manifest
|
2006-01-23 17:16:17 +00:00
|
|
|
endif # MSVC with manifest tool
|
|
|
|
endif # WINNT && !GCC
|
2005-06-17 19:54:21 +00:00
|
|
|
@rm -f foodummyfilefoo $(SUB_SHLOBJS) $(DELETE_AFTER_LINK)
|
2003-03-24 14:07:08 +00:00
|
|
|
else # os2 vacpp
|
2005-06-01 14:28:35 +00:00
|
|
|
$(MKSHLIB) -O:$@ -DLL -INC:_dllentry $(LDFLAGS) $(OBJS) $(LOBJS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE)
|
2003-03-24 14:07:08 +00:00
|
|
|
endif # !os2 vacpp
|
1998-03-28 02:44:41 +00:00
|
|
|
chmod +x $@
|
2003-01-06 07:13:49 +00:00
|
|
|
ifndef NO_COMPONENT_LINK_MAP
|
2003-02-27 22:32:05 +00:00
|
|
|
ifndef MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS
|
|
|
|
ifndef MOZ_DEBUG
|
2003-01-06 07:13:49 +00:00
|
|
|
ifeq ($(OS_ARCH)_$(IS_COMPONENT),Darwin_1)
|
|
|
|
nmedit -s $(BUILD_TOOLS)/gnu-ld-scripts/components-export-list $@
|
|
|
|
endif
|
|
|
|
endif
|
2003-02-27 22:32:05 +00:00
|
|
|
endif
|
|
|
|
endif
|
2001-10-26 08:36:28 +00:00
|
|
|
ifdef ENABLE_STRIP
|
|
|
|
$(STRIP) $@
|
|
|
|
endif
|
2001-10-26 12:39:30 +00:00
|
|
|
ifdef MOZ_POST_DSO_LIB_COMMAND
|
|
|
|
$(MOZ_POST_DSO_LIB_COMMAND) $@
|
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2001-05-22 07:52:30 +00:00
|
|
|
ifdef MOZ_AUTO_DEPS
|
2001-04-05 01:18:34 +00:00
|
|
|
ifndef COMPILER_DEPEND
|
|
|
|
#
|
|
|
|
# Generate dependencies on the fly
|
|
|
|
#
|
2001-10-16 09:26:31 +00:00
|
|
|
_MDDEPFILE = $(MDDEPDIR)/$(@F).pp
|
2001-04-05 01:18:34 +00:00
|
|
|
|
2005-04-22 19:06:27 +00:00
|
|
|
ifeq (,$(CROSS_COMPILE)$(filter-out WINCE WINNT,$(OS_ARCH)))
|
2002-06-21 05:06:47 +00:00
|
|
|
define MAKE_DEPS_AUTO
|
|
|
|
if test -d $(@D); then \
|
2003-08-05 04:43:49 +00:00
|
|
|
echo "Building deps for $<"; \
|
2002-06-21 05:06:47 +00:00
|
|
|
touch $(_MDDEPFILE) && \
|
2003-08-05 04:43:49 +00:00
|
|
|
$(MKDEPEND) -o'.$(OBJ_SUFFIX)' -f$(_MDDEPFILE) $(DEFINES) $(ACDEFINES) $(INCLUDES) $< >/dev/null 2>&1 && \
|
2002-06-21 05:06:47 +00:00
|
|
|
mv $(_MDDEPFILE) $(_MDDEPFILE).old && \
|
2005-06-02 04:00:37 +00:00
|
|
|
cat $(_MDDEPFILE).old | sed -e "s|^$(srcdir)/||" -e "s|^$(win_srcdir)/||" > $(_MDDEPFILE) && rm -f $(_MDDEPFILE).old ; \
|
2002-06-21 05:06:47 +00:00
|
|
|
fi
|
|
|
|
endef
|
|
|
|
else
|
2001-05-22 07:52:30 +00:00
|
|
|
define MAKE_DEPS_AUTO
|
2001-04-05 01:18:34 +00:00
|
|
|
if test -d $(@D); then \
|
2002-11-15 03:41:17 +00:00
|
|
|
echo "Building deps for $<"; \
|
2001-05-22 07:52:30 +00:00
|
|
|
touch $(_MDDEPFILE) && \
|
|
|
|
$(MKDEPEND) -o'.$(OBJ_SUFFIX)' -f$(_MDDEPFILE) $(DEFINES) $(ACDEFINES) $(INCLUDES) $< >/dev/null 2>&1 && \
|
|
|
|
mv $(_MDDEPFILE) $(_MDDEPFILE).old && \
|
|
|
|
cat $(_MDDEPFILE).old | sed -e "s|^$(<D)/||g" > $(_MDDEPFILE) && rm -f $(_MDDEPFILE).old ; \
|
2001-04-05 01:18:34 +00:00
|
|
|
fi
|
|
|
|
endef
|
2002-06-21 05:06:47 +00:00
|
|
|
endif # WINNT
|
2001-04-05 01:18:34 +00:00
|
|
|
endif # !COMPILER_DEPEND
|
|
|
|
|
2001-05-22 07:52:30 +00:00
|
|
|
endif # MOZ_AUTO_DEPS
|
|
|
|
|
2002-11-15 07:24:44 +00:00
|
|
|
# Rules for building native targets must come first because of the host_ prefix
|
2005-06-29 16:28:02 +00:00
|
|
|
host_%.$(OBJ_SUFFIX): %.c Makefile Makefile.in
|
2002-11-15 07:24:44 +00:00
|
|
|
$(REPORT_BUILD)
|
2002-12-13 02:36:06 +00:00
|
|
|
$(ELOG) $(HOST_CC) $(OUTOPTION)$@ -c $(HOST_CFLAGS) $(INCLUDES) $(NSPR_CFLAGS) $(_VPATH_SRCS)
|
2002-11-15 07:24:44 +00:00
|
|
|
|
2003-01-10 01:14:49 +00:00
|
|
|
%: %.c Makefile Makefile.in
|
2000-02-25 03:55:50 +00:00
|
|
|
$(REPORT_BUILD)
|
2001-05-22 07:52:30 +00:00
|
|
|
@$(MAKE_DEPS_AUTO)
|
2002-12-13 02:36:06 +00:00
|
|
|
$(ELOG) $(CC) $(CFLAGS) $(LDFLAGS) $(OUTOPTION)$@ $(_VPATH_SRCS)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2003-01-10 01:14:49 +00:00
|
|
|
%.$(OBJ_SUFFIX): %.c Makefile Makefile.in
|
2000-02-25 03:55:50 +00:00
|
|
|
$(REPORT_BUILD)
|
2001-05-22 07:52:30 +00:00
|
|
|
@$(MAKE_DEPS_AUTO)
|
2002-12-13 02:36:06 +00:00
|
|
|
$(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $(_VPATH_SRCS)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2003-01-10 01:14:49 +00:00
|
|
|
moc_%.cpp: %.h Makefile Makefile.in
|
2001-12-04 21:17:48 +00:00
|
|
|
$(MOC) $< $(OUTOPTION)$@
|
1999-08-09 14:55:56 +00:00
|
|
|
|
1999-03-08 15:01:13 +00:00
|
|
|
# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
|
|
|
|
# a '-c' flag.
|
2003-01-10 01:14:49 +00:00
|
|
|
%.$(OBJ_SUFFIX): %.$(ASM_SUFFIX) Makefile Makefile.in
|
2001-07-02 03:49:50 +00:00
|
|
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
2001-09-22 00:20:31 +00:00
|
|
|
$(AS) -Fdo:./$(OBJDIR) -Feo:.$(OBJ_SUFFIX) $(ASFLAGS) $(AS_DASH_C_FLAG) $<
|
2001-07-02 03:49:50 +00:00
|
|
|
else
|
2002-12-13 02:36:06 +00:00
|
|
|
$(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) $(_VPATH_SRCS)
|
2001-07-02 03:49:50 +00:00
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2003-01-10 01:14:49 +00:00
|
|
|
%.$(OBJ_SUFFIX): %.S Makefile Makefile.in
|
1998-08-19 20:42:14 +00:00
|
|
|
$(AS) -o $@ $(ASFLAGS) -c $<
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2003-01-10 01:14:49 +00:00
|
|
|
%: %.cpp Makefile Makefile.in
|
2001-05-22 07:52:30 +00:00
|
|
|
@$(MAKE_DEPS_AUTO)
|
2002-12-13 02:36:06 +00:00
|
|
|
$(CCC) $(OUTOPTION)$@ $(CXXFLAGS) $(_VPATH_SRCS) $(LDFLAGS)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Please keep the next two rules in sync.
|
|
|
|
#
|
2003-01-10 01:14:49 +00:00
|
|
|
%.$(OBJ_SUFFIX): %.cc Makefile Makefile.in
|
2000-02-25 03:55:50 +00:00
|
|
|
$(REPORT_BUILD)
|
2001-05-22 07:52:30 +00:00
|
|
|
@$(MAKE_DEPS_AUTO)
|
2002-12-13 02:36:06 +00:00
|
|
|
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2003-01-10 01:14:49 +00:00
|
|
|
%.$(OBJ_SUFFIX): %.cpp Makefile Makefile.in
|
2000-02-25 03:55:50 +00:00
|
|
|
$(REPORT_BUILD)
|
2001-05-22 07:52:30 +00:00
|
|
|
@$(MAKE_DEPS_AUTO)
|
1998-03-28 02:44:41 +00:00
|
|
|
ifdef STRICT_CPLUSPLUS_SUFFIX
|
1999-08-20 06:52:59 +00:00
|
|
|
echo "#line 1 \"$*.cpp\"" | cat - $*.cpp > t_$*.cc
|
2000-02-26 04:21:53 +00:00
|
|
|
$(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) t_$*.cc
|
1999-08-20 06:52:59 +00:00
|
|
|
rm -f t_$*.cc
|
1998-03-28 02:44:41 +00:00
|
|
|
else
|
2002-12-13 02:36:06 +00:00
|
|
|
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
|
1998-03-28 02:44:41 +00:00
|
|
|
endif #STRICT_CPLUSPLUS_SUFFIX
|
|
|
|
|
2003-01-10 01:14:49 +00:00
|
|
|
$(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.mm Makefile Makefile.in
|
2001-10-31 01:20:39 +00:00
|
|
|
$(REPORT_BUILD)
|
|
|
|
@$(MAKE_DEPS_AUTO)
|
2003-08-05 04:43:49 +00:00
|
|
|
$(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
|
2001-10-31 01:20:39 +00:00
|
|
|
|
2004-06-18 00:56:48 +00:00
|
|
|
$(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.m Makefile Makefile.in
|
|
|
|
$(REPORT_BUILD)
|
|
|
|
@$(MAKE_DEPS_AUTO)
|
|
|
|
$(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $(_VPATH_SRCS)
|
|
|
|
|
2003-03-08 05:18:43 +00:00
|
|
|
%.s: %.cpp
|
2003-08-05 04:43:49 +00:00
|
|
|
$(CCC) -S $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
|
2003-03-08 05:18:43 +00:00
|
|
|
|
|
|
|
%.s: %.c
|
2003-08-05 04:43:49 +00:00
|
|
|
$(CC) -S $(COMPILE_CFLAGS) $(_VPATH_SRCS)
|
2003-03-08 05:18:43 +00:00
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
%.i: %.cpp
|
2003-08-05 04:43:49 +00:00
|
|
|
$(CCC) -C -E $(COMPILE_CXXFLAGS) $(_VPATH_SRCS) > $*.i
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
%.i: %.c
|
2003-08-05 04:43:49 +00:00
|
|
|
$(CC) -C -E $(COMPILE_CFLAGS) $(_VPATH_SRCS) > $*.i
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2002-01-01 00:03:57 +00:00
|
|
|
%.res: %.rc
|
|
|
|
@echo Creating Resource file: $@
|
2002-03-21 13:45:32 +00:00
|
|
|
ifeq ($(OS_ARCH),OS2)
|
2004-12-02 16:41:01 +00:00
|
|
|
$(RC) $(RCFLAGS:-D%=-d %) -i $(subst /,\,$(srcdir)) -r $< $@
|
2003-03-08 05:18:43 +00:00
|
|
|
else
|
|
|
|
ifdef GNU_CC
|
2003-08-05 04:43:49 +00:00
|
|
|
$(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) $(OUTOPTION)$@ $(_VPATH_SRCS)
|
2002-03-21 13:45:32 +00:00
|
|
|
else
|
2003-08-05 04:43:49 +00:00
|
|
|
$(RC) $(RCFLAGS) -r $(DEFINES) $(INCLUDES) $(OUTOPTION)$@ $(_VPATH_SRCS)
|
2002-03-21 13:45:32 +00:00
|
|
|
endif
|
2003-03-08 05:18:43 +00:00
|
|
|
endif
|
2002-01-01 00:03:57 +00:00
|
|
|
|
2000-05-16 04:41:54 +00:00
|
|
|
# need 3 separate lines for OS/2
|
1998-03-28 02:44:41 +00:00
|
|
|
%: %.pl
|
2000-05-16 04:41:54 +00:00
|
|
|
rm -f $@
|
|
|
|
cp $< $@
|
|
|
|
chmod +x $@
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
%: %.sh
|
1998-08-19 20:42:14 +00:00
|
|
|
rm -f $@; cp $< $@; chmod +x $@
|
1998-03-28 02:44:41 +00:00
|
|
|
|
1999-03-22 20:43:05 +00:00
|
|
|
# Cancel these implicit rules
|
|
|
|
#
|
|
|
|
%: %,v
|
|
|
|
|
|
|
|
%: RCS/%,v
|
|
|
|
|
|
|
|
%: s.%
|
|
|
|
|
|
|
|
%: SCCS/s.%
|
|
|
|
|
1999-01-29 20:00:50 +00:00
|
|
|
###############################################################################
|
|
|
|
# Update Makefiles
|
|
|
|
###############################################################################
|
2005-02-07 14:55:07 +00:00
|
|
|
|
|
|
|
# In GNU make 3.80, makefiles must use the /cygdrive syntax, even if we're
|
|
|
|
# processing them with AS perl. See bug 232003
|
|
|
|
ifdef AS_PERL
|
|
|
|
CYGWIN_TOPSRCDIR = -nowrap -p $(topsrcdir) -wrap
|
|
|
|
endif
|
|
|
|
|
1999-08-25 22:09:50 +00:00
|
|
|
# Note: Passing depth to make-makefile is optional.
|
|
|
|
# It saves the script some work, though.
|
2002-08-31 04:03:52 +00:00
|
|
|
Makefile: Makefile.in
|
2005-02-07 14:55:07 +00:00
|
|
|
@$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH) $(CYGWIN_TOPSRCDIR)
|
1999-08-24 21:45:06 +00:00
|
|
|
|
1999-09-14 23:09:37 +00:00
|
|
|
ifdef SUBMAKEFILES
|
1999-09-03 22:18:30 +00:00
|
|
|
# VPATH does not work on some machines in this case, so add $(srcdir)
|
|
|
|
$(SUBMAKEFILES): % : $(srcdir)/%.in
|
2005-02-07 14:55:07 +00:00
|
|
|
$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH) $(CYGWIN_TOPSRCDIR) $@
|
1999-09-14 23:09:37 +00:00
|
|
|
endif
|
1999-01-29 20:00:50 +00:00
|
|
|
|
2000-04-03 00:56:31 +00:00
|
|
|
ifdef AUTOUPDATE_CONFIGURE
|
|
|
|
$(topsrcdir)/configure: $(topsrcdir)/configure.in
|
|
|
|
(cd $(topsrcdir) && $(AUTOCONF)) && (cd $(DEPTH) && ./config.status --recheck)
|
|
|
|
endif
|
|
|
|
|
1999-01-29 20:00:50 +00:00
|
|
|
###############################################################################
|
1998-03-28 02:44:41 +00:00
|
|
|
# Bunch of things that extend the 'export' rule (in order):
|
1999-01-29 20:00:50 +00:00
|
|
|
###############################################################################
|
1998-03-28 02:44:41 +00:00
|
|
|
|
1999-03-22 20:43:05 +00:00
|
|
|
################################################################################
|
1999-06-23 20:38:09 +00:00
|
|
|
# Copy each element of EXPORTS to $(PUBLIC)
|
1999-03-22 20:43:05 +00:00
|
|
|
|
2002-02-25 23:20:01 +00:00
|
|
|
ifneq ($(EXPORTS)$(XPIDLSRCS)$(SDK_HEADERS)$(SDK_XPIDLSRCS),)
|
|
|
|
$(SDK_PUBLIC) $(PUBLIC)::
|
1999-03-30 22:21:54 +00:00
|
|
|
@if test ! -d $@; then echo Creating $@; rm -rf $@; $(NSINSTALL) -D $@; else true; fi
|
2000-12-04 01:34:02 +00:00
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2005-02-18 22:17:37 +00:00
|
|
|
ifneq ($(XPI_NAME),)
|
|
|
|
export::
|
|
|
|
@if test ! -d $(FINAL_TARGET); then echo Creating $(FINAL_TARGET); rm -fr $(FINAL_TARGET); $(NSINSTALL) -D $(FINAL_TARGET); else true; fi
|
|
|
|
endif
|
|
|
|
|
2001-12-31 09:04:25 +00:00
|
|
|
ifndef NO_DIST_INSTALL
|
2005-12-13 17:25:26 +00:00
|
|
|
ifneq ($(EXPORTS),)
|
2003-02-27 02:53:46 +00:00
|
|
|
export:: $(EXPORTS) $(PUBLIC)
|
2000-03-31 01:24:48 +00:00
|
|
|
$(INSTALL) $(IFLAGS1) $^
|
1999-06-03 00:41:11 +00:00
|
|
|
endif
|
|
|
|
|
2002-02-25 23:20:01 +00:00
|
|
|
ifneq ($(SDK_HEADERS),)
|
2005-12-13 17:25:26 +00:00
|
|
|
export:: $(SDK_HEADERS) $(SDK_PUBLIC)
|
|
|
|
$(INSTALL) $(IFLAGS1) $^
|
2002-02-25 23:20:01 +00:00
|
|
|
|
2005-12-13 17:25:26 +00:00
|
|
|
export:: $(SDK_HEADERS) $(PUBLIC)
|
|
|
|
$(INSTALL) $(IFLAGS1) $^
|
2002-02-25 23:20:01 +00:00
|
|
|
endif
|
2005-12-13 17:25:26 +00:00
|
|
|
endif # NO_DIST_INSTALL
|
2002-02-25 23:20:01 +00:00
|
|
|
|
1999-06-03 00:41:11 +00:00
|
|
|
################################################################################
|
2004-01-16 19:22:43 +00:00
|
|
|
# Copy each element of PREF_JS_EXPORTS
|
1999-06-03 00:41:11 +00:00
|
|
|
|
|
|
|
ifneq ($(PREF_JS_EXPORTS),)
|
2004-01-16 19:22:43 +00:00
|
|
|
ifdef GRE_MODULE
|
|
|
|
PREF_DIR = greprefs
|
|
|
|
else
|
2006-01-28 17:32:37 +00:00
|
|
|
ifneq (,$(XPI_NAME)$(LIBXUL_SDK))
|
2005-03-28 19:36:24 +00:00
|
|
|
PREF_DIR = defaults/preferences
|
|
|
|
else
|
2004-01-16 19:22:43 +00:00
|
|
|
PREF_DIR = defaults/pref
|
|
|
|
endif
|
2005-03-28 19:36:24 +00:00
|
|
|
endif
|
2004-01-16 19:22:43 +00:00
|
|
|
|
2004-03-10 00:22:46 +00:00
|
|
|
# on win32, pref files need CRLF line endings... see bug 206029
|
|
|
|
ifeq (WINNT,$(OS_ARCH))
|
|
|
|
PREF_PPFLAGS = --line-endings=crlf
|
|
|
|
endif
|
|
|
|
|
2001-12-31 09:04:25 +00:00
|
|
|
ifndef NO_DIST_INSTALL
|
2006-01-28 17:32:37 +00:00
|
|
|
libs:: $(PREF_JS_EXPORTS)
|
2006-01-29 04:40:22 +00:00
|
|
|
if test ! -d $(FINAL_TARGET)/$(PREF_DIR); then $(NSINSTALL) -D $(FINAL_TARGET)/$(PREF_DIR); fi
|
2004-01-16 23:59:09 +00:00
|
|
|
$(EXIT_ON_ERROR) \
|
2004-01-16 19:22:43 +00:00
|
|
|
for i in $(PREF_JS_EXPORTS); \
|
2005-02-18 22:17:37 +00:00
|
|
|
do $(PERL) $(topsrcdir)/config/preprocessor.pl $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $$i > $(FINAL_TARGET)/$(PREF_DIR)/`basename $$i`; \
|
2004-01-16 19:22:43 +00:00
|
|
|
done
|
|
|
|
endif
|
2002-04-25 02:52:44 +00:00
|
|
|
|
|
|
|
ifndef NO_INSTALL
|
2006-01-28 17:32:37 +00:00
|
|
|
install:: $(PREF_JS_EXPORTS)
|
2006-01-29 04:40:22 +00:00
|
|
|
if test ! -d $(DESTDIR)$(mozappdir)/$(PREF_DIR); then $(NSINSTALL) -D $(DESTDIR)$(mozappdir)/$(PREF_DIR); fi
|
2004-01-16 23:59:09 +00:00
|
|
|
$(EXIT_ON_ERROR) \
|
2004-01-16 19:22:43 +00:00
|
|
|
for i in $(PREF_JS_EXPORTS); \
|
2004-01-16 23:59:09 +00:00
|
|
|
do $(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $$i > $(DESTDIR)$(mozappdir)/$(PREF_DIR)/`basename $$i`; \
|
2004-01-16 19:22:43 +00:00
|
|
|
done
|
2002-04-25 02:52:44 +00:00
|
|
|
endif
|
2004-01-16 19:22:43 +00:00
|
|
|
endif
|
|
|
|
|
2001-12-21 22:29:31 +00:00
|
|
|
################################################################################
|
2005-02-18 22:17:37 +00:00
|
|
|
# Copy each element of AUTOCFG_JS_EXPORTS to $(FINAL_TARGET)/defaults/autoconfig
|
2001-12-21 22:29:31 +00:00
|
|
|
|
|
|
|
ifneq ($(AUTOCFG_JS_EXPORTS),)
|
2005-02-18 22:17:37 +00:00
|
|
|
$(FINAL_TARGET)/defaults/autoconfig::
|
2001-12-21 22:29:31 +00:00
|
|
|
@if test ! -d $@; then echo Creating $@; rm -rf $@; $(NSINSTALL) -D $@; else true; fi
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2001-12-31 09:04:25 +00:00
|
|
|
ifndef NO_DIST_INSTALL
|
2005-02-18 22:17:37 +00:00
|
|
|
export:: $(AUTOCFG_JS_EXPORTS) $(FINAL_TARGET)/defaults/autoconfig
|
2001-12-21 22:29:31 +00:00
|
|
|
$(INSTALL) $(IFLAGS1) $^
|
2001-12-31 09:04:25 +00:00
|
|
|
endif
|
2002-04-25 02:52:44 +00:00
|
|
|
|
|
|
|
install:: $(AUTOCFG_JS_EXPORTS)
|
|
|
|
ifndef NO_INSTALL
|
|
|
|
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/autoconfig
|
|
|
|
endif
|
2001-12-21 22:29:31 +00:00
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
################################################################################
|
2002-02-25 23:20:01 +00:00
|
|
|
# Export the elements of $(XPIDLSRCS) & $(SDK_XPIDLSRCS),
|
|
|
|
# generating .h and .xpt files and moving them to the appropriate places.
|
1999-05-08 02:06:15 +00:00
|
|
|
|
2002-02-25 23:20:01 +00:00
|
|
|
ifneq ($(XPIDLSRCS)$(SDK_XPIDLSRCS),)
|
1999-06-20 08:59:31 +00:00
|
|
|
|
2005-12-13 23:15:14 +00:00
|
|
|
export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS))
|
|
|
|
|
1999-05-26 01:38:36 +00:00
|
|
|
ifndef XPIDL_MODULE
|
1999-09-09 09:24:58 +00:00
|
|
|
XPIDL_MODULE = $(MODULE)
|
1999-05-26 01:38:36 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(XPIDL_MODULE),) # we need $(XPIDL_MODULE) to make $(XPIDL_MODULE).xpt
|
1999-05-08 22:28:49 +00:00
|
|
|
export:: FORCE
|
|
|
|
@echo
|
1999-05-09 08:16:07 +00:00
|
|
|
@echo "*** Error processing XPIDLSRCS:"
|
1999-05-26 01:38:36 +00:00
|
|
|
@echo "Please define MODULE or XPIDL_MODULE when defining XPIDLSRCS,"
|
1999-05-08 22:28:49 +00:00
|
|
|
@echo "so we have a module name to use when creating MODULE.xpt."
|
|
|
|
@echo; sleep 2; false
|
1999-11-30 04:25:19 +00:00
|
|
|
endif
|
1999-01-22 01:28:13 +00:00
|
|
|
|
2002-02-25 23:20:01 +00:00
|
|
|
$(SDK_IDL_DIR) $(IDL_DIR)::
|
1999-03-30 22:21:54 +00:00
|
|
|
@if test ! -d $@; then echo Creating $@; rm -rf $@; $(NSINSTALL) -D $@; else true; fi
|
1999-01-22 01:28:13 +00:00
|
|
|
|
1999-06-23 20:38:09 +00:00
|
|
|
# generate .h files from into $(XPIDL_GEN_DIR), then export to $(PUBLIC);
|
2000-10-24 21:10:31 +00:00
|
|
|
# warn against overriding existing .h file.
|
|
|
|
$(XPIDL_GEN_DIR)/.done:
|
2000-10-25 23:06:55 +00:00
|
|
|
@if test ! -d $(XPIDL_GEN_DIR); then echo Creating $(XPIDL_GEN_DIR)/.done; rm -rf $(XPIDL_GEN_DIR); mkdir $(XPIDL_GEN_DIR); fi
|
|
|
|
@touch $@
|
1999-05-08 02:06:15 +00:00
|
|
|
|
1999-06-20 00:02:37 +00:00
|
|
|
# don't depend on $(XPIDL_GEN_DIR), because the modification date changes
|
|
|
|
# with any addition to the directory, regenerating all .h files -> everything.
|
1999-06-20 08:59:31 +00:00
|
|
|
|
2000-10-24 21:10:31 +00:00
|
|
|
$(XPIDL_GEN_DIR)/%.h: %.idl $(XPIDL_COMPILE) $(XPIDL_GEN_DIR)/.done
|
2000-02-25 03:55:50 +00:00
|
|
|
$(REPORT_BUILD)
|
2006-01-28 17:32:37 +00:00
|
|
|
$(ELOG) $(XPIDL_COMPILE) -m header -w $(XPIDL_FLAGS) -o $(XPIDL_GEN_DIR)/$* $(_VPATH_SRCS)
|
2002-02-25 23:20:01 +00:00
|
|
|
@if test -n "$(findstring $*.h, $(EXPORTS) $(SDK_HEADERS))"; \
|
1999-06-03 20:28:34 +00:00
|
|
|
then echo "*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true; fi
|
1999-05-08 02:06:15 +00:00
|
|
|
|
1999-05-11 23:43:36 +00:00
|
|
|
ifndef NO_GEN_XPT
|
1999-05-08 02:06:15 +00:00
|
|
|
# generate intermediate .xpt files into $(XPIDL_GEN_DIR), then link
|
2005-02-18 22:17:37 +00:00
|
|
|
# into $(XPIDL_MODULE).xpt and export it to $(FINAL_TARGET)/components.
|
2003-02-27 02:53:46 +00:00
|
|
|
$(XPIDL_GEN_DIR)/%.xpt: %.idl $(XPIDL_COMPILE) $(XPIDL_GEN_DIR)/.done
|
2000-02-25 03:55:50 +00:00
|
|
|
$(REPORT_BUILD)
|
2006-01-28 17:32:37 +00:00
|
|
|
$(ELOG) $(XPIDL_COMPILE) -m typelib -w $(XPIDL_FLAGS) -e $@ -d $(MDDEPDIR)/$*.pp $(_VPATH_SRCS)
|
1999-05-08 02:06:15 +00:00
|
|
|
|
2003-02-22 07:40:51 +00:00
|
|
|
# no need to link together if XPIDLSRCS contains only XPIDL_MODULE
|
|
|
|
ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))
|
2003-08-05 04:43:49 +00:00
|
|
|
$(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS) $(SDK_XPIDLSRCS)) Makefile.in Makefile $(XPIDL_LINK)
|
2002-03-30 01:32:01 +00:00
|
|
|
$(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS) $(SDK_XPIDLSRCS))
|
2003-02-22 07:40:51 +00:00
|
|
|
endif # XPIDL_MODULE.xpt != XPIDLSRCS
|
1999-05-08 02:06:15 +00:00
|
|
|
|
2001-11-21 08:55:59 +00:00
|
|
|
libs:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
|
2001-12-31 09:04:25 +00:00
|
|
|
ifndef NO_DIST_INSTALL
|
2005-02-18 22:17:37 +00:00
|
|
|
$(INSTALL) $(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(FINAL_TARGET)/components
|
2001-12-31 09:04:25 +00:00
|
|
|
endif
|
2002-04-25 02:52:44 +00:00
|
|
|
|
|
|
|
install:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
|
|
|
|
ifndef NO_INSTALL
|
|
|
|
ifdef MRE_DIST
|
2003-02-28 22:02:21 +00:00
|
|
|
$(SYSINSTALL) $(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(DESTDIR)$(mredir)/components
|
2002-04-25 02:52:44 +00:00
|
|
|
else
|
2003-02-28 22:02:21 +00:00
|
|
|
$(SYSINSTALL) $(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(DESTDIR)$(mozappdir)/components
|
2002-04-25 02:52:44 +00:00
|
|
|
endif
|
|
|
|
endif # NO_INSTALL
|
2002-02-25 23:20:01 +00:00
|
|
|
endif # NO_GEN_XPT
|
|
|
|
|
|
|
|
GARBAGE_DIRS += $(XPIDL_GEN_DIR)
|
|
|
|
|
|
|
|
endif # XPIDLSRCS || SDK_XPIDLSRCS
|
|
|
|
|
|
|
|
ifneq ($(XPIDLSRCS),)
|
|
|
|
# export .idl files to $(IDL_DIR)
|
2005-12-13 17:25:26 +00:00
|
|
|
ifndef NO_DIST_INSTALL
|
2002-02-25 23:20:01 +00:00
|
|
|
export:: $(XPIDLSRCS) $(IDL_DIR)
|
|
|
|
$(INSTALL) $(IFLAGS1) $^
|
2003-02-27 02:53:46 +00:00
|
|
|
|
2005-12-13 17:25:26 +00:00
|
|
|
export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS)) $(PUBLIC)
|
|
|
|
$(INSTALL) $(IFLAGS1) $^
|
2003-02-27 02:53:46 +00:00
|
|
|
endif # NO_DIST_INSTALL
|
|
|
|
|
1999-05-11 23:43:36 +00:00
|
|
|
|
2002-06-13 09:07:40 +00:00
|
|
|
ifndef NO_INSTALL
|
2005-12-13 17:25:26 +00:00
|
|
|
install:: $(XPIDLSRCS)
|
2002-06-13 09:07:40 +00:00
|
|
|
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(idldir)
|
|
|
|
|
|
|
|
install:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS))
|
|
|
|
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(includedir)/$(MODULE)
|
|
|
|
endif
|
|
|
|
|
2002-02-25 23:20:01 +00:00
|
|
|
endif # XPIDLSRCS
|
|
|
|
|
2002-06-11 22:26:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# General rules for exporting idl files.
|
|
|
|
#
|
|
|
|
# WORK-AROUND ONLY, for mozilla/tools/module-deps/bootstrap.pl build.
|
|
|
|
# Bug to fix idl dependecy problems w/o this extra build pass is
|
|
|
|
# http://bugzilla.mozilla.org/show_bug.cgi?id=145777
|
|
|
|
#
|
|
|
|
$(IDL_DIR)::
|
|
|
|
@if test ! -d $@; then echo Creating $@; rm -rf $@; $(NSINSTALL) -D $@; else true; fi
|
|
|
|
|
2002-10-25 05:59:52 +00:00
|
|
|
export-idl:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
|
|
|
|
2003-02-27 02:53:46 +00:00
|
|
|
ifneq ($(XPIDLSRCS)$(SDK_XPIDLSRCS),)
|
2002-06-11 22:26:27 +00:00
|
|
|
ifndef NO_DIST_INSTALL
|
2003-02-27 02:53:46 +00:00
|
|
|
export-idl:: $(XPIDLSRCS) $(SDK_XPIDLSRCS) $(IDL_DIR)
|
2002-06-11 22:26:27 +00:00
|
|
|
$(INSTALL) $(IFLAGS1) $^
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
+$(LOOP_OVER_DIRS)
|
2004-12-08 12:38:22 +00:00
|
|
|
+$(LOOP_OVER_TOOL_DIRS)
|
2002-06-11 22:26:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-02-25 23:20:01 +00:00
|
|
|
ifneq ($(SDK_XPIDLSRCS),)
|
|
|
|
# export .idl files to $(IDL_DIR) & $(SDK_IDL_DIR)
|
2003-02-27 02:53:46 +00:00
|
|
|
ifndef NO_DIST_INSTALL
|
2005-12-13 17:25:26 +00:00
|
|
|
export:: $(SDK_XPIDLSRCS) $(IDL_DIR)
|
|
|
|
$(INSTALL) $(IFLAGS1) $^
|
2002-02-25 23:20:01 +00:00
|
|
|
|
2005-12-13 17:25:26 +00:00
|
|
|
export:: $(SDK_XPIDLSRCS) $(SDK_IDL_DIR)
|
|
|
|
$(INSTALL) $(IFLAGS1) $^
|
1999-01-22 01:28:13 +00:00
|
|
|
|
2005-12-13 17:25:26 +00:00
|
|
|
export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(SDK_XPIDLSRCS)) $(PUBLIC)
|
|
|
|
$(INSTALL) $(IFLAGS1) $^
|
|
|
|
|
|
|
|
export:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(SDK_XPIDLSRCS)) $(SDK_PUBLIC)
|
|
|
|
$(INSTALL) $(IFLAGS1) $^
|
2002-02-25 23:20:01 +00:00
|
|
|
endif
|
|
|
|
|
2002-06-13 09:07:40 +00:00
|
|
|
ifndef NO_INSTALL
|
2005-12-13 17:25:26 +00:00
|
|
|
install:: $(SDK_XPIDLSRCS)
|
2002-06-13 09:07:40 +00:00
|
|
|
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(idldir)
|
|
|
|
|
|
|
|
install:: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(SDK_XPIDLSRCS))
|
2005-12-13 17:25:26 +00:00
|
|
|
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(includedir)/$(MODULE)
|
2002-06-13 09:07:40 +00:00
|
|
|
endif
|
|
|
|
|
2002-02-25 23:20:01 +00:00
|
|
|
endif # SDK_XPIDLSRCS
|
|
|
|
|
2002-04-25 02:52:44 +00:00
|
|
|
################################################################################
|
2005-02-18 22:17:37 +00:00
|
|
|
# Copy each element of EXTRA_COMPONENTS to $(FINAL_TARGET)/components
|
2002-04-25 02:52:44 +00:00
|
|
|
ifdef EXTRA_COMPONENTS
|
|
|
|
libs:: $(EXTRA_COMPONENTS)
|
|
|
|
ifndef NO_DIST_INSTALL
|
2006-03-30 13:47:00 +00:00
|
|
|
$(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/components
|
2002-04-25 02:52:44 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
install:: $(EXTRA_COMPONENTS)
|
|
|
|
ifndef NO_INSTALL
|
2006-03-30 13:47:00 +00:00
|
|
|
$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/components
|
2002-04-25 02:52:44 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2005-01-12 11:23:43 +00:00
|
|
|
ifdef EXTRA_PP_COMPONENTS
|
|
|
|
libs:: $(EXTRA_PP_COMPONENTS)
|
|
|
|
ifndef NO_DIST_INSTALL
|
|
|
|
$(EXIT_ON_ERROR) \
|
|
|
|
for i in $^; \
|
2005-02-18 22:17:37 +00:00
|
|
|
do $(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $$i > $(FINAL_TARGET)/components/`basename $$i`; \
|
2005-01-12 11:23:43 +00:00
|
|
|
done
|
|
|
|
endif
|
|
|
|
|
|
|
|
install:: $(EXTRA_PP_COMPONENTS)
|
|
|
|
ifndef NO_INSTALL
|
|
|
|
$(EXIT_ON_ERROR) \
|
|
|
|
for i in $^; \
|
|
|
|
do $(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $$i > $(DESTDIR)$(mozappdir)/components/`basename $$i`; \
|
|
|
|
done
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2002-02-25 23:20:01 +00:00
|
|
|
################################################################################
|
|
|
|
# SDK
|
|
|
|
|
2004-03-23 20:58:21 +00:00
|
|
|
ifneq (,$(SDK_LIBRARY))
|
|
|
|
$(SDK_LIB_DIR)::
|
|
|
|
@if test ! -d $@; then echo Creating $@; rm -rf $@; $(NSINSTALL) -D $@; else true; fi
|
|
|
|
|
|
|
|
ifndef NO_DIST_INSTALL
|
|
|
|
libs:: $(SDK_LIBRARY) $(SDK_LIB_DIR)
|
|
|
|
$(INSTALL) $(IFLAGS2) $^
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif # SDK_LIBRARY
|
|
|
|
|
2002-02-25 23:20:01 +00:00
|
|
|
ifneq (,$(SDK_BINARY))
|
|
|
|
$(SDK_BIN_DIR)::
|
|
|
|
@if test ! -d $@; then echo Creating $@; rm -rf $@; $(NSINSTALL) -D $@; else true; fi
|
|
|
|
|
|
|
|
ifndef NO_DIST_INSTALL
|
2003-02-27 02:53:46 +00:00
|
|
|
libs:: $(SDK_BINARY) $(SDK_BIN_DIR)
|
2002-02-25 23:20:01 +00:00
|
|
|
$(INSTALL) $(IFLAGS2) $^
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif # SDK_BINARY
|
|
|
|
|
1999-07-27 14:30:34 +00:00
|
|
|
################################################################################
|
2000-09-20 19:35:24 +00:00
|
|
|
# CHROME PACKAGING
|
2000-09-09 05:54:35 +00:00
|
|
|
|
2000-09-20 21:28:30 +00:00
|
|
|
JAR_MANIFEST := $(srcdir)/jar.mn
|
2000-09-09 05:54:35 +00:00
|
|
|
|
2003-10-15 20:30:59 +00:00
|
|
|
chrome::
|
|
|
|
$(MAKE) realchrome
|
|
|
|
+$(LOOP_OVER_MOZ_DIRS)
|
2004-12-08 12:38:22 +00:00
|
|
|
+$(LOOP_OVER_TOOL_DIRS)
|
2003-10-15 20:30:59 +00:00
|
|
|
|
|
|
|
libs realchrome:: $(CHROME_DEPS)
|
2002-04-25 02:52:44 +00:00
|
|
|
ifndef NO_DIST_INSTALL
|
2004-07-08 15:06:19 +00:00
|
|
|
@$(EXIT_ON_ERROR) \
|
|
|
|
if test -f $(JAR_MANIFEST); then \
|
2005-04-20 23:10:56 +00:00
|
|
|
if test ! -d $(FINAL_TARGET)/chrome; then $(NSINSTALL) -D $(FINAL_TARGET)/chrome; fi; \
|
2005-07-28 16:17:15 +00:00
|
|
|
if test ! -d $(MAKE_JARS_TARGET)/chrome; then $(NSINSTALL) -D $(MAKE_JARS_TARGET)/chrome; fi; \
|
2004-11-24 16:01:03 +00:00
|
|
|
$(PERL) $(MOZILLA_DIR)/config/preprocessor.pl $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
|
2004-07-08 15:06:19 +00:00
|
|
|
$(JAR_MANIFEST) | \
|
|
|
|
$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/make-jars.pl \
|
2005-07-28 16:17:15 +00:00
|
|
|
-d $(MAKE_JARS_TARGET)/chrome -j $(FINAL_TARGET)/chrome \
|
2005-06-01 11:59:09 +00:00
|
|
|
$(MAKE_JARS_FLAGS) -- "$(XULPPFLAGS) $(DEFINES) $(ACDEFINES)"; \
|
2004-07-08 15:06:19 +00:00
|
|
|
fi
|
2002-04-25 02:52:44 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
install:: $(CHROME_DEPS)
|
|
|
|
ifndef NO_INSTALL
|
2004-07-08 15:06:19 +00:00
|
|
|
@$(EXIT_ON_ERROR) \
|
|
|
|
if test -f $(JAR_MANIFEST); then \
|
2005-04-11 18:36:01 +00:00
|
|
|
if test ! -d $(DESTDIR)$(mozappdir)/chrome; then $(NSINSTALL) -D $(DESTDIR)$(mozappdir)/chrome; fi; \
|
2005-07-28 16:17:15 +00:00
|
|
|
if test ! -d $(MAKE_JARS_TARGET)/chrome; then $(NSINSTALL) -D $(MAKE_JARS_TARGET)/chrome; fi; \
|
2004-11-24 16:01:03 +00:00
|
|
|
$(PERL) $(MOZILLA_DIR)/config/preprocessor.pl $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
|
2004-07-08 15:06:19 +00:00
|
|
|
$(JAR_MANIFEST) | \
|
|
|
|
$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/make-jars.pl \
|
2005-07-28 16:17:15 +00:00
|
|
|
-d $(MAKE_JARS_TARGET) -j $(DESTDIR)$(mozappdir)/chrome \
|
2005-06-01 11:59:09 +00:00
|
|
|
$(MAKE_JARS_FLAGS) -- "$(XULPPFLAGS) $(DEFINES) $(ACDEFINES)"; \
|
2004-07-08 15:06:19 +00:00
|
|
|
fi
|
2002-04-25 02:52:44 +00:00
|
|
|
endif
|
2000-09-09 05:54:35 +00:00
|
|
|
|
2005-03-28 19:36:24 +00:00
|
|
|
ifneq ($(DIST_FILES),)
|
|
|
|
libs:: $(DIST_FILES)
|
|
|
|
@$(EXIT_ON_ERROR) \
|
|
|
|
for f in $(DIST_FILES); do \
|
|
|
|
$(PERL) $(MOZILLA_DIR)/config/preprocessor.pl \
|
|
|
|
$(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) \
|
|
|
|
$(srcdir)/$$f > $(FINAL_TARGET)/`basename $$f`; \
|
|
|
|
done
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(DIST_CHROME_FILES),)
|
|
|
|
libs:: $(DIST_CHROME_FILES)
|
|
|
|
@$(EXIT_ON_ERROR) \
|
|
|
|
for f in $(DIST_CHROME_FILES); do \
|
|
|
|
$(PERL) $(MOZILLA_DIR)/config/preprocessor.pl \
|
|
|
|
$(XULAPP_DEFINES) $(DEFINES) $(ACDEFINES) \
|
|
|
|
$(srcdir)/$$f > $(FINAL_TARGET)/chrome/`basename $$f`; \
|
|
|
|
done
|
|
|
|
endif
|
|
|
|
|
2005-06-01 11:59:09 +00:00
|
|
|
ifneq ($(XPI_PKGNAME),)
|
|
|
|
libs realchrome::
|
2006-02-06 19:07:40 +00:00
|
|
|
ifdef STRIP_XPI
|
2006-03-28 21:44:14 +00:00
|
|
|
ifndef MOZ_DEBUG
|
2006-01-03 19:08:27 +00:00
|
|
|
@echo "Stripping $(XPI_PKGNAME) package directory..."
|
|
|
|
@echo $(FINAL_TARGET)
|
|
|
|
@cd $(FINAL_TARGET) && find . ! -type d \
|
|
|
|
! -name "*.js" \
|
|
|
|
! -name "*.xpt" \
|
|
|
|
! -name "*.gif" \
|
|
|
|
! -name "*.jpg" \
|
|
|
|
! -name "*.png" \
|
|
|
|
! -name "*.xpm" \
|
|
|
|
! -name "*.txt" \
|
|
|
|
! -name "*.rdf" \
|
|
|
|
! -name "*.sh" \
|
|
|
|
! -name "*.properties" \
|
|
|
|
! -name "*.dtd" \
|
|
|
|
! -name "*.html" \
|
|
|
|
! -name "*.xul" \
|
|
|
|
! -name "*.css" \
|
|
|
|
! -name "*.xml" \
|
|
|
|
! -name "*.jar" \
|
|
|
|
! -name "*.dat" \
|
|
|
|
! -name "*.tbl" \
|
|
|
|
! -name "*.src" \
|
|
|
|
! -name "*.reg" \
|
|
|
|
$(PLATFORM_EXCLUDE_LIST) \
|
|
|
|
-exec $(STRIP) $(STRIP_FLAGS) {} >/dev/null 2>&1 \;
|
2006-03-28 21:44:14 +00:00
|
|
|
endif
|
2006-01-03 19:08:27 +00:00
|
|
|
endif
|
2005-06-01 11:59:09 +00:00
|
|
|
@echo "Packaging $(XPI_PKGNAME).xpi..."
|
|
|
|
cd $(FINAL_TARGET) && $(ZIP) -qr ../$(XPI_PKGNAME).xpi *
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef INSTALL_EXTENSION_ID
|
|
|
|
ifndef XPI_NAME
|
|
|
|
$(error XPI_NAME must be set for INSTALL_EXTENSION_ID)
|
|
|
|
endif
|
|
|
|
|
|
|
|
libs::
|
|
|
|
$(RM) -rf "$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
|
|
|
|
$(NSINSTALL) -D "$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
|
|
|
|
cd $(FINAL_TARGET) && tar $(TAR_CREATE_FLAGS) - * | (cd "../../bin/extensions/$(INSTALL_EXTENSION_ID)" && tar -xf -)
|
|
|
|
|
|
|
|
install::
|
2005-06-05 18:50:21 +00:00
|
|
|
$(NSINSTALL) -D "$(DESTDIR)$(mozappdir)/extensions/$(INSTALL_EXTENSION_ID)"
|
|
|
|
cd $(FINAL_TARGET) && tar $(TAR_CREATE_FLAGS) - * | (cd "$(DESTDIR)$(mozappdir)/extensions/$(INSTALL_EXTENSION_ID)" && tar -xf -)
|
2005-06-01 11:59:09 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter flat symlink,$(MOZ_CHROME_FILE_FORMAT)))
|
|
|
|
_JAR_REGCHROME_DISABLE_JAR=1
|
|
|
|
else
|
|
|
|
_JAR_REGCHROME_DISABLE_JAR=0
|
|
|
|
endif
|
|
|
|
|
2004-07-08 15:06:19 +00:00
|
|
|
REGCHROME = $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/add-chrome.pl \
|
|
|
|
$(if $(filter gtk gtk2 xlib,$(MOZ_WIDGET_TOOLKIT)),-x) \
|
2005-02-18 22:17:37 +00:00
|
|
|
$(if $(CROSS_COMPILE),-o $(OS_ARCH)) $(FINAL_TARGET)/chrome/installed-chrome.txt \
|
2004-07-08 15:06:19 +00:00
|
|
|
$(_JAR_REGCHROME_DISABLE_JAR)
|
|
|
|
|
|
|
|
REGCHROME_INSTALL = $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/add-chrome.pl \
|
|
|
|
$(if $(filter gtk gtk2 xlib,$(MOZ_WIDGET_TOOLKIT)),-x) \
|
|
|
|
$(if $(CROSS_COMPILE),-o $(OS_ARCH)) $(DESTDIR)$(mozappdir)/chrome/installed-chrome.txt \
|
|
|
|
$(_JAR_REGCHROME_DISABLE_JAR)
|
2000-09-09 05:54:35 +00:00
|
|
|
|
1998-03-28 02:44:41 +00:00
|
|
|
#############################################################################
|
2001-05-22 07:52:30 +00:00
|
|
|
# Dependency system
|
1998-03-28 02:44:41 +00:00
|
|
|
#############################################################################
|
1999-03-22 20:43:05 +00:00
|
|
|
ifdef COMPILER_DEPEND
|
|
|
|
depend::
|
1999-03-31 19:07:29 +00:00
|
|
|
@echo "$(MAKE): No need to run depend target.\
|
|
|
|
Using compiler-based depend." 1>&2
|
|
|
|
ifeq ($(GNU_CC)$(GNU_CXX),)
|
|
|
|
# Non-GNU compilers
|
|
|
|
@echo "`echo '$(MAKE):'|sed 's/./ /g'`"\
|
2001-05-22 07:52:30 +00:00
|
|
|
'(Compiler-based depend was turned on by "--enable-md".)' 1>&2
|
1999-03-31 19:07:29 +00:00
|
|
|
else
|
|
|
|
# GNU compilers
|
|
|
|
@space="`echo '$(MAKE): '|sed 's/./ /g'`";\
|
|
|
|
echo "$$space"'Since you are using a GNU compiler,\
|
|
|
|
it is on by default.' 1>&2; \
|
|
|
|
echo "$$space"'To turn it off, pass --disable-md to configure.' 1>&2
|
|
|
|
endif
|
2001-05-22 07:52:30 +00:00
|
|
|
|
|
|
|
else # ! COMPILER_DEPEND
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2001-05-22 07:52:30 +00:00
|
|
|
ifndef MOZ_AUTO_DEPS
|
|
|
|
|
2002-06-21 05:06:47 +00:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
define MAKE_DEPS_NOAUTO
|
|
|
|
set -e ; \
|
|
|
|
touch $@ && \
|
|
|
|
$(MKDEPEND) -w1024 -o'.$(OBJ_SUFFIX)' -f$@ $(DEFINES) $(ACDEFINES) $(INCLUDES) $(srcdir)/$(<F) >/dev/null 2>&1 && \
|
|
|
|
mv $@ $@.old && cat $@.old | sed "s|^$(srcdir)/||g" > $@ && rm -f $@.old
|
|
|
|
endef
|
|
|
|
else
|
2001-05-22 07:52:30 +00:00
|
|
|
define MAKE_DEPS_NOAUTO
|
|
|
|
set -e ; \
|
|
|
|
touch $@ && \
|
2002-02-21 00:15:10 +00:00
|
|
|
$(MKDEPEND) -w1024 -o'.$(OBJ_SUFFIX)' -f$@ $(DEFINES) $(ACDEFINES) $(INCLUDES) $< >/dev/null 2>&1 && \
|
2001-05-22 07:52:30 +00:00
|
|
|
mv $@ $@.old && cat $@.old | sed "s|^$(<D)/||g" > $@ && rm -f $@.old
|
|
|
|
endef
|
2002-06-21 05:06:47 +00:00
|
|
|
endif # WINNT
|
2001-05-22 07:52:30 +00:00
|
|
|
|
|
|
|
$(MDDEPDIR)/%.pp: %.c
|
2001-12-18 09:14:29 +00:00
|
|
|
$(REPORT_BUILD)
|
|
|
|
@$(MAKE_DEPS_NOAUTO)
|
2001-05-22 07:52:30 +00:00
|
|
|
|
|
|
|
$(MDDEPDIR)/%.pp: %.cpp
|
2001-12-18 09:14:29 +00:00
|
|
|
$(REPORT_BUILD)
|
|
|
|
@$(MAKE_DEPS_NOAUTO)
|
2001-05-22 07:52:30 +00:00
|
|
|
|
2001-08-08 04:27:32 +00:00
|
|
|
$(MDDEPDIR)/%.pp: %.s
|
2001-12-18 09:14:29 +00:00
|
|
|
$(REPORT_BUILD)
|
|
|
|
@$(MAKE_DEPS_NOAUTO)
|
2001-08-08 04:27:32 +00:00
|
|
|
|
2006-01-04 13:43:59 +00:00
|
|
|
ifneq (,$(OBJS)$(XPIDLSRCS)$(SDK_XPIDLSRCS)$(SIMPLE_PROGRAMS))
|
2002-04-19 02:42:28 +00:00
|
|
|
depend:: $(SUBMAKEFILES) $(MAKE_DIRS) $(MDDEPFILES)
|
2001-05-22 07:52:30 +00:00
|
|
|
else
|
|
|
|
depend:: $(SUBMAKEFILES)
|
|
|
|
endif
|
|
|
|
+$(LOOP_OVER_DIRS)
|
2004-12-08 12:38:22 +00:00
|
|
|
+$(LOOP_OVER_TOOL_DIRS)
|
2001-05-22 07:52:30 +00:00
|
|
|
|
|
|
|
dependclean:: $(SUBMAKEFILES)
|
|
|
|
rm -f $(MDDEPFILES)
|
|
|
|
+$(LOOP_OVER_DIRS)
|
2004-12-08 12:38:22 +00:00
|
|
|
+$(LOOP_OVER_TOOL_DIRS)
|
2001-05-22 07:52:30 +00:00
|
|
|
|
|
|
|
endif # MOZ_AUTO_DEPS
|
|
|
|
|
|
|
|
endif # COMPILER_DEPEND
|
|
|
|
|
1999-03-22 20:43:05 +00:00
|
|
|
|
1999-02-17 17:33:07 +00:00
|
|
|
#############################################################################
|
1999-08-24 21:45:06 +00:00
|
|
|
# MDDEPDIR is the subdirectory where all the dependency files are placed.
|
|
|
|
# This uses a make rule (instead of a macro) to support parallel
|
|
|
|
# builds (-jN). If this were done in the LOOP_OVER_DIRS macro, two
|
|
|
|
# processes could simultaneously try to create the same directory.
|
|
|
|
#
|
|
|
|
$(MDDEPDIR):
|
1999-09-09 09:24:58 +00:00
|
|
|
@if test ! -d $@; then echo Creating $@; rm -rf $@; mkdir $@; else true; fi
|
|
|
|
|
2006-01-04 13:43:59 +00:00
|
|
|
ifneq (,$(OBJS)$(XPIDLSRCS)$(SDK_XPIDLSRCS)$(SIMPLE_PROGRAMS))
|
2001-04-05 01:18:34 +00:00
|
|
|
MDDEPEND_FILES := $(strip $(wildcard $(MDDEPDIR)/*.pp))
|
1999-09-09 09:24:58 +00:00
|
|
|
|
2001-04-05 01:18:34 +00:00
|
|
|
ifneq (,$(MDDEPEND_FILES))
|
1999-10-12 12:36:07 +00:00
|
|
|
ifdef PERL
|
1999-03-11 01:35:33 +00:00
|
|
|
# The script mddepend.pl checks the dependencies and writes to stdout
|
|
|
|
# one rule to force out-of-date objects. For example,
|
|
|
|
# foo.o boo.o: FORCE
|
|
|
|
# The script has an advantage over including the *.pp files directly
|
1999-05-18 00:26:10 +00:00
|
|
|
# because it handles the case when header files are removed from the build.
|
|
|
|
# 'make' would complain that there is no way to build missing headers.
|
1999-03-29 23:19:57 +00:00
|
|
|
$(MDDEPDIR)/.all.pp: FORCE
|
2005-03-23 17:59:49 +00:00
|
|
|
@$(PERL) $(BUILD_TOOLS)/mddepend.pl $@ $(MDDEPEND_FILES)
|
1999-03-22 20:43:05 +00:00
|
|
|
-include $(MDDEPDIR)/.all.pp
|
1999-03-11 01:35:33 +00:00
|
|
|
else
|
|
|
|
include $(MDDEPEND_FILES)
|
|
|
|
endif
|
1999-03-09 01:31:26 +00:00
|
|
|
endif
|
2001-04-05 01:18:34 +00:00
|
|
|
|
1999-03-10 00:03:12 +00:00
|
|
|
endif
|
1998-03-28 02:44:41 +00:00
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
-include $(MY_RULES)
|
|
|
|
|
|
|
|
#
|
|
|
|
# This speeds up gmake's processing if these files don't exist.
|
|
|
|
#
|
|
|
|
$(MY_CONFIG) $(MY_RULES):
|
|
|
|
@touch $@
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generate Emacs tags in a file named TAGS if ETAGS was set in $(MY_CONFIG)
|
|
|
|
# or in $(MY_RULES)
|
|
|
|
#
|
|
|
|
ifdef ETAGS
|
1998-04-15 23:56:45 +00:00
|
|
|
ifneq ($(CSRCS)$(CPPSRCS)$(HEADERS),)
|
1998-03-28 02:44:41 +00:00
|
|
|
all:: TAGS
|
|
|
|
TAGS:: $(CSRCS) $(CPPSRCS) $(HEADERS)
|
|
|
|
$(ETAGS) $(CSRCS) $(CPPSRCS) $(HEADERS)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Special gmake rules.
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
#
|
|
|
|
# Re-define the list of default suffixes, so gmake won't have to churn through
|
|
|
|
# hundreds of built-in suffix rules for stuff we don't need.
|
|
|
|
#
|
|
|
|
.SUFFIXES:
|
2004-06-18 00:56:48 +00:00
|
|
|
.SUFFIXES: .out .a .ln .o .c .cc .C .cpp .y .l .s .S .h .sh .i .pl .class .java .html .pp .mk .in .$(OBJ_SUFFIX) .m .mm .idl $(BIN_SUFFIX)
|
1998-03-28 02:44:41 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Fake targets. Always run these rules, even if a file/directory with that
|
|
|
|
# name already exists.
|
|
|
|
#
|
2005-08-11 16:41:54 +00:00
|
|
|
.PHONY: all all_platforms alltags boot checkout chrome realchrome clean clobber clobber_all export install libs makefiles realclean run_viewer run_apprunner tools $(DIRS) $(TOOL_DIRS) FORCE check
|
1999-03-09 21:56:44 +00:00
|
|
|
|
|
|
|
# Used as a dependency to force targets to rebuild
|
|
|
|
FORCE:
|
1998-03-28 02:44:41 +00:00
|
|
|
|
2000-09-28 04:02:15 +00:00
|
|
|
# Delete target if error occurs when building target
|
|
|
|
.DELETE_ON_ERROR:
|
|
|
|
|
2002-04-19 02:42:28 +00:00
|
|
|
# pdbfiles are written to by every file when debugging in enabled,
|
|
|
|
# so the files must be built serially
|
|
|
|
# This requires a recent version of gmake
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2002-08-10 14:04:58 +00:00
|
|
|
ifneq (,$(MOZ_DEBUG)$(MOZ_PROFILE)$(MOZ_COVERAGE))
|
2002-04-19 02:42:28 +00:00
|
|
|
.NOTPARALLEL::
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2005-11-08 23:08:05 +00:00
|
|
|
# Properly set LIBPATTERNS for the platform
|
|
|
|
.LIBPATTERNS = $(if $(IMPORT_LIB_SUFFIX),$(LIB_PREFIX)%.$(IMPORT_LIB_SUFFIX)) $(LIB_PREFIX)%.$(LIB_SUFFIX) $(DLL_PREFIX)%$(DLL_SUFFIX)
|
|
|
|
|
1999-05-11 23:43:36 +00:00
|
|
|
tags: TAGS
|
|
|
|
|
1999-08-24 21:45:06 +00:00
|
|
|
TAGS: $(SUBMAKEFILES) $(CSRCS) $(CPPSRCS) $(wildcard *.h)
|
1999-05-11 23:43:36 +00:00
|
|
|
-etags $(CSRCS) $(CPPSRCS) $(wildcard *.h)
|
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
|
1999-10-21 14:57:38 +00:00
|
|
|
echo-dirs:
|
|
|
|
@echo $(DIRS)
|
|
|
|
|
2001-10-16 20:52:33 +00:00
|
|
|
echo-module:
|
|
|
|
@echo $(MODULE)
|
|
|
|
|
|
|
|
echo-requires:
|
|
|
|
@echo $(REQUIRES)
|
|
|
|
|
2003-06-06 19:21:57 +00:00
|
|
|
echo-requires-recursive::
|
2003-08-15 22:37:25 +00:00
|
|
|
ifdef _REPORT_ALL_DIRS
|
|
|
|
@echo $(subst $(topsrcdir)/,,$(srcdir)): $(MODULE): $(REQUIRES)
|
|
|
|
else
|
2003-06-06 19:21:57 +00:00
|
|
|
@$(if $(REQUIRES),echo $(subst $(topsrcdir)/,,$(srcdir)): $(MODULE): $(REQUIRES))
|
2003-08-15 22:37:25 +00:00
|
|
|
endif
|
2003-06-06 19:21:57 +00:00
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
|
1999-10-21 14:57:38 +00:00
|
|
|
echo-depth-path:
|
2000-09-05 21:42:52 +00:00
|
|
|
@$(topsrcdir)/build/unix/print-depth-path.sh
|
1999-10-21 14:57:38 +00:00
|
|
|
|
|
|
|
echo-module-name:
|
|
|
|
@$(topsrcdir)/build/package/rpm/print-module-name.sh
|
|
|
|
|
|
|
|
echo-module-filelist:
|
|
|
|
@$(topsrcdir)/build/package/rpm/print-module-filelist.sh
|
2000-03-31 01:24:48 +00:00
|
|
|
|
|
|
|
showtargs:
|
2000-03-31 07:18:52 +00:00
|
|
|
ifneq (,$(filter $(PROGRAM) $(HOST_PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY),$(TARGETS)))
|
2000-03-31 01:24:48 +00:00
|
|
|
@echo --------------------------------------------------------------------------------
|
|
|
|
@echo "PROGRAM = $(PROGRAM)"
|
|
|
|
@echo "SIMPLE_PROGRAMS = $(SIMPLE_PROGRAMS)"
|
|
|
|
@echo "LIBRARY = $(LIBRARY)"
|
|
|
|
@echo "SHARED_LIBRARY = $(SHARED_LIBRARY)"
|
|
|
|
@echo "SHARED_LIBRARY_LIBS = $(SHARED_LIBRARY_LIBS)"
|
|
|
|
@echo "LIBS = $(LIBS)"
|
|
|
|
@echo "DEF_FILE = $(DEF_FILE)"
|
|
|
|
@echo "IMPORT_LIBRARY = $(IMPORT_LIBRARY)"
|
|
|
|
@echo "STATIC_LIBS = $(STATIC_LIBS)"
|
|
|
|
@echo "SHARED_LIBS = $(SHARED_LIBS)"
|
|
|
|
@echo "EXTRA_DSO_LIBS = $(EXTRA_DSO_LIBS)"
|
|
|
|
@echo "EXTRA_DSO_LDOPTS = $(EXTRA_DSO_LDOPTS)"
|
2003-05-04 21:31:57 +00:00
|
|
|
@echo "DEPENDENT_LIBS = $(DEPENDENT_LIBS)"
|
2000-03-31 01:24:48 +00:00
|
|
|
@echo --------------------------------------------------------------------------------
|
|
|
|
endif
|
2000-11-10 00:55:44 +00:00
|
|
|
+$(LOOP_OVER_MOZ_DIRS)
|
2000-03-31 01:24:48 +00:00
|
|
|
|
|
|
|
showbuild:
|
|
|
|
@echo "MOZ_BUILD_ROOT = $(MOZ_BUILD_ROOT)"
|
|
|
|
@echo "MOZ_WIDGET_TOOLKIT = $(MOZ_WIDGET_TOOLKIT)"
|
|
|
|
@echo "CC = $(CC)"
|
|
|
|
@echo "CXX = $(CXX)"
|
|
|
|
@echo "CPP = $(CPP)"
|
|
|
|
@echo "LD = $(LD)"
|
|
|
|
@echo "AR = $(AR)"
|
|
|
|
@echo "IMPLIB = $(IMPLIB)"
|
|
|
|
@echo "FILTER = $(FILTER)"
|
|
|
|
@echo "MKSHLIB = $(MKSHLIB)"
|
|
|
|
@echo "MKCSHLIB = $(MKCSHLIB)"
|
|
|
|
@echo "RC = $(RC)"
|
|
|
|
@echo "CFLAGS = $(CFLAGS)"
|
|
|
|
@echo "OS_CFLAGS = $(OS_CFLAGS)"
|
|
|
|
@echo "COMPILE_CFLAGS = $(COMPILE_CFLAGS)"
|
|
|
|
@echo "CXXFLAGS = $(CXXFLAGS)"
|
2001-03-09 07:55:29 +00:00
|
|
|
@echo "OS_CXXFLAGS = $(OS_CXXFLAGS)"
|
2000-03-31 01:24:48 +00:00
|
|
|
@echo "COMPILE_CXXFLAGS = $(COMPILE_CXXFLAGS)"
|
|
|
|
@echo "LDFLAGS = $(LDFLAGS)"
|
|
|
|
@echo "OS_LDFLAGS = $(OS_LDFLAGS)"
|
|
|
|
@echo "DSO_LDOPTS = $(DSO_LDOPTS)"
|
|
|
|
@echo "OS_INCLUDES = $(OS_INCLUDES)"
|
|
|
|
@echo "OS_LIBS = $(OS_LIBS)"
|
|
|
|
@echo "EXTRA_LIBS = $(EXTRA_LIBS)"
|
|
|
|
@echo "BIN_FLAGS = $(BIN_FLAGS)"
|
|
|
|
@echo "INCLUDES = $(INCLUDES)"
|
|
|
|
@echo "DEFINES = $(DEFINES)"
|
|
|
|
@echo "ACDEFINES = $(ACDEFINES)"
|
|
|
|
@echo "BIN_SUFFIX = $(BIN_SUFFIX)"
|
|
|
|
@echo "LIB_SUFFIX = $(LIB_SUFFIX)"
|
|
|
|
@echo "DLL_SUFFIX = $(DLL_SUFFIX)"
|
2003-04-23 00:54:38 +00:00
|
|
|
@echo "IMPORT_LIB_SUFFIX = $(IMPORT_LIB_SUFFIX)"
|
2000-03-31 01:24:48 +00:00
|
|
|
@echo "INSTALL = $(INSTALL)"
|
|
|
|
|
2000-04-02 16:15:42 +00:00
|
|
|
showhost:
|
|
|
|
@echo "HOST_CC = $(HOST_CC)"
|
|
|
|
@echo "HOST_CFLAGS = $(HOST_CFLAGS)"
|
2002-12-12 00:08:59 +00:00
|
|
|
@echo "HOST_LDFLAGS = $(HOST_LDFLAGS)"
|
2000-04-02 16:15:42 +00:00
|
|
|
@echo "HOST_LIBS = $(HOST_LIBS)"
|
|
|
|
@echo "HOST_EXTRA_LIBS = $(HOST_EXTRA_LIBS)"
|
|
|
|
@echo "HOST_EXTRA_DEPS = $(HOST_EXTRA_DEPS)"
|
|
|
|
@echo "HOST_PROGRAM = $(HOST_PROGRAM)"
|
|
|
|
@echo "HOST_PROGOBJS = $(HOST_PROGOBJS)"
|
|
|
|
|
2000-04-21 01:14:45 +00:00
|
|
|
showbuildmods::
|
|
|
|
@echo "Build Modules = $(BUILD_MODULES)"
|
|
|
|
@echo "Module dirs = $(BUILD_MODULE_DIRS)"
|
|
|
|
|
2000-03-31 01:24:48 +00:00
|
|
|
zipmakes:
|
|
|
|
ifneq (,$(filter $(PROGRAM) $(SIMPLE_PROGRAMS) $(LIBRARY) $(SHARED_LIBRARY),$(TARGETS)))
|
|
|
|
zip $(DEPTH)/makefiles $(subst $(topsrcdir),$(MOZ_SRC)/mozilla,$(srcdir)/Makefile.in)
|
|
|
|
endif
|
2000-11-10 00:55:44 +00:00
|
|
|
+$(LOOP_OVER_MOZ_DIRS)
|
2002-02-22 11:11:24 +00:00
|
|
|
|
|
|
|
documentation:
|
|
|
|
@cd $(DEPTH)
|
2002-11-11 04:04:49 +00:00
|
|
|
$(DOXYGEN) $(DEPTH)/config/doxygen.cfg
|
2005-08-11 16:41:54 +00:00
|
|
|
|
|
|
|
check:: $(SUBMAKEFILES) $(MAKE_DIRS)
|
|
|
|
+$(LOOP_OVER_DIRS)
|
|
|
|
+$(LOOP_OVER_TOOL_DIRS)
|