1 # vim:set ts=8 sw=8 sts=8 noet:
3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
16 # The Original Code is mozilla.org code.
18 # The Initial Developer of the Original Code is
19 # Netscape Communications Corporation.
20 # Portions created by the Initial Developer are Copyright (C) 1998
21 # the Initial Developer. All Rights Reserved.
24 # Chase Phillips <chase@mozilla.org>
25 # Benjamin Smedberg <benjamin@smedbergs.us>
26 # Jeff Walden <jwalden+code@mit.edu>
28 # Alternatively, the contents of this file may be used under the terms of
29 # either of the GNU General Public License Version 2 or later (the "GPL"),
30 # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31 # in which case the provisions of the GPL or the LGPL are applicable instead
32 # of those above. If you wish to allow use of your version of this file only
33 # under the terms of either the GPL or the LGPL, and not to allow others to
34 # use your version of this file under the terms of the MPL, indicate your
35 # decision by deleting the provisions above and replace them with the notice
36 # and other provisions required by the GPL or the LGPL. If you do not delete
37 # the provisions above, a recipient may use your version of this file under
38 # the terms of any one of the MPL, the GPL or the LGPL.
40 # ***** END LICENSE BLOCK *****
46 MOZILLA_DIR
= $(topsrcdir
)
49 ifndef INCLUDED_CONFIG_MK
50 include $(topsrcdir
)/config
/config.mk
53 ifndef INCLUDED_VERSION_MK
54 include $(topsrcdir
)/config
/version.mk
57 REPORT_BUILD
= @echo
$(notdir $<)
65 # ELOG prints out failed command when building silently (gmake -s).
66 ifneq (,$(findstring -s
,$(MAKEFLAGS
)))
67 ELOG
:= $(EXEC
) sh
$(BUILD_TOOLS
)/print-failed-commands.sh
72 ifeq (,$(filter-out WINNT WINCE
,$(OS_ARCH
)))
74 _LIBNAME_RELATIVE_PATHS
=1
78 ifeq (,$(filter-out WINNT WINCE
,$(OS_ARCH
)))
80 _VPATH_SRCS
= $(if
$(filter /%,$<),$<,$(PWD
)/$<)
85 # Add $(DIST)/lib to VPATH so that -lfoo dependencies are followed
88 VPATH
+= $(LIBXUL_SDK
)/lib
91 # EXPAND_LIBNAME - $(call EXPAND_LIBNAME,foo)
92 # expands to foo.lib on platforms with import libs and -lfoo otherwise
94 # EXPAND_LIBNAME_PATH - $(call EXPAND_LIBNAME_PATH,foo,dir)
95 # expands to dir/foo.lib on platforms with import libs and
96 # -Ldir -lfoo otherwise
98 # EXPAND_MOZLIBNAME - $(call EXPAND_MOZLIBNAME,foo)
99 # expands to $(DIST)/lib/foo.lib on platforms with import libs and
102 ifdef _LIBNAME_RELATIVE_PATHS
103 EXPAND_LIBNAME
= $(foreach lib
,$(1),$(LIB_PREFIX
)$(lib
).
$(LIB_SUFFIX
))
104 EXPAND_LIBNAME_PATH
= $(foreach lib
,$(1),$(2)/$(LIB_PREFIX
)$(lib
).
$(LIB_SUFFIX
))
105 EXPAND_MOZLIBNAME
= $(foreach lib
,$(1),$(DIST
)/lib
/$(LIB_PREFIX
)$(lib
).
$(LIB_SUFFIX
))
107 EXPAND_LIBNAME
= $(addprefix -l
,$(1))
108 EXPAND_LIBNAME_PATH
= -L
$(2) $(addprefix -l
,$(1))
109 EXPAND_MOZLIBNAME
= $(addprefix -l
,$(1))
113 EXTRA_DSO_LIBS
:= $(call EXPAND_MOZLIBNAME
,$(EXTRA_DSO_LIBS
))
116 ################################################################################
117 # Testing frameworks support
118 ################################################################################
124 $(error Must
define MODULE when defining XPCSHELL_TESTS.
)
127 # Test file installation
130 for testdir in
$(XPCSHELL_TESTS
); do \
132 $(srcdir)/$$testdir/*.js \
133 $(DEPTH
)/_tests
/xpcshell-simple
/$(MODULE
)/$$testdir; \
136 # Path formats on Windows are hard. We require a topsrcdir formatted so that
137 # it may be passed to nsILocalFile.initWithPath (in other words, an absolute
138 # path of the form X:\path\to\topsrcdir), which we store in NATIVE_TOPSRCDIR.
139 # We require a forward-slashed path to topsrcdir so that it may be combined
140 # with a relative forward-slashed path for loading scripts, both dynamically
141 # and statically for head/test/tail JS files. Of course, on non-Windows none
142 # of this matters, and things will work correctly because everything's
143 # forward-slashed, everywhere, always.
145 NATIVE_TOPSRCDIR
:= `cygpath -wa $(topsrcdir)`
146 FWDSLASH_TOPSRCDIR
:= `cygpath -ma $(topsrcdir)`
148 FWDSLASH_TOPSRCDIR
:= $(topsrcdir
)
149 ifeq ($(HOST_OS_ARCH
),WINNT
)
150 NATIVE_TOPSRCDIR
:= $(subst /,\\,$(WIN_TOP_SRC
))
152 NATIVE_TOPSRCDIR
:= $(topsrcdir
)
154 endif # CYGWIN_WRAPPER
159 for testdir in
$(XPCSHELL_TESTS
); do \
160 $(RUN_TEST_PROGRAM
) \
161 $(topsrcdir
)/tools
/test-harness
/xpcshell-simple
/test_all.sh \
162 $(DIST
)/bin
/xpcshell \
163 $(FWDSLASH_TOPSRCDIR
) \
164 $(NATIVE_TOPSRCDIR
) \
165 $(DEPTH
)/_tests
/xpcshell-simple
/$(MODULE
)/$$testdir; \
171 $(RUN_TEST_PROGRAM
) \
172 $(topsrcdir
)/tools
/test-harness
/xpcshell-simple
/test_one.sh \
173 $(DIST
)/bin
/xpcshell \
174 $(FWDSLASH_TOPSRCDIR
) \
175 $(NATIVE_TOPSRCDIR
) \
176 $(DEPTH
)/_tests
/xpcshell-simple
/$(MODULE
)/$$testdir \
182 $(RUN_TEST_PROGRAM
) \
183 $(topsrcdir
)/tools
/test-harness
/xpcshell-simple
/test_one.sh \
184 $(DIST
)/bin
/xpcshell \
185 $(FWDSLASH_TOPSRCDIR
) \
186 $(NATIVE_TOPSRCDIR
) \
187 $(DEPTH
)/_tests
/xpcshell-simple
/$(MODULE
)/$$testdir \
190 endif # XPCSHELL_TESTS
194 # Compile the tests to $(DIST)/bin. Make lots of niceties available by default
195 # through TestHarness.h, by modifying the list of includes and the libs against
197 CPPSRCS
+= $(CPP_UNIT_TESTS
)
198 SIMPLE_PROGRAMS
+= $(CPP_UNIT_TESTS
:.
cpp=$(BIN_SUFFIX
))
199 REQUIRES
+= testing xpcom
200 LIBS
+= $(XPCOM_GLUE_LDOPTS
) $(NSPR_LIBS
)
202 # ...and run them the usual way
205 for f in
$(subst .
cpp,,$(CPP_UNIT_TESTS
)); do \
206 XPCOM_DEBUG_BREAK
=stack-and-abort
$(RUN_TEST_PROGRAM
) $(DIST
)/bin
/$$f; \
209 endif # CPP_UNIT_TESTS
217 # If BUILD_STATIC_LIBS or FORCE_STATIC_LIB is set, build a static library.
218 # Otherwise, build a shared library.
223 ifneq (,$(filter OS2 WINNT WINCE
,$(OS_ARCH
)))
225 LIBRARY_NAME
:= $(SHORT_LIBNAME
)
228 LIBRARY
:= $(LIB_PREFIX
)$(LIBRARY_NAME
).
$(LIB_SUFFIX
)
233 ifdef HOST_LIBRARY_NAME
234 HOST_LIBRARY
:= $(LIB_PREFIX
)$(HOST_LIBRARY_NAME
).
$(LIB_SUFFIX
)
239 ifneq (_1
,$(FORCE_SHARED_LIB
)_
$(BUILD_STATIC_LIBS
))
243 MKSHLIB
= $(MKCSHLIB
)
247 SHARED_LIBRARY
:= $(LIBRARY_NAME
)
249 SHARED_LIBRARY
:= $(DLL_PREFIX
)$(LIBRARY_NAME
)$(DLL_SUFFIX
)
252 ifeq ($(OS_ARCH
),OS2
)
253 DEF_FILE
:= $(SHARED_LIBRARY
:.dll
=.def
)
256 ifneq (,$(filter OS2 WINNT WINCE
,$(OS_ARCH
)))
257 IMPORT_LIBRARY
:= $(LIB_PREFIX
)$(LIBRARY_NAME
).
$(IMPORT_LIB_SUFFIX
)
260 ifdef MOZ_ENABLE_LIBXUL
265 endif # FORCE_SHARED_LIB && !BUILD_STATIC_LIBS
268 ifeq (,$(BUILD_STATIC_LIBS
)$(FORCE_STATIC_LIB
))
272 ifeq (_1
,$(FORCE_SHARED_LIB
)_
$(BUILD_STATIC_LIBS
))
273 SHARED_LIBRARY
:= $(NULL
)
275 IMPORT_LIBRARY
:= $(NULL
)
278 ifdef FORCE_STATIC_LIB
279 ifndef FORCE_SHARED_LIB
280 SHARED_LIBRARY
:= $(NULL
)
282 IMPORT_LIBRARY
:= $(NULL
)
286 ifdef FORCE_SHARED_LIB
287 ifndef FORCE_STATIC_LIB
292 ifdef JAVA_LIBRARY_NAME
293 JAVA_LIBRARY
:= $(JAVA_LIBRARY_NAME
).jar
296 ifeq (,$(filter-out WINNT WINCE
,$(OS_ARCH
)))
300 # Unless we're building SIMPLE_PROGRAMS, all C++ files share a PDB file per
301 # directory. For parallel builds, this PDB file is shared and locked by
302 # MSPDBSRV.EXE, starting with MSVC8 SP1. If you're using MSVC 7.1 or MSVC8
303 # without SP1, don't do parallel builds.
305 # The final PDB for libraries and programs is created by the linker and uses
306 # a different name from the single PDB file created by the compiler. See
310 ifdef SIMPLE_PROGRAMS
311 COMPILE_PDBFILE
= $(basename $(@F
)).pdb
313 COMPILE_PDBFILE
= generated.pdb
316 LINK_PDBFILE
= $(basename $(@F
)).pdb
318 CODFILE
=$(basename $(@F
)).cod
323 MAPFILE
=$(LIBRARY_NAME
).map
325 MAPFILE
=$(basename $(@F
)).map
330 OS_LDFLAGS
+= -DEF
:$(DEFFILE
)
331 EXTRA_DEPS
+= $(DEFFILE
)
335 OS_LDFLAGS
+= -MAP
:$(MAPFILE
)
336 #CFLAGS += -Fm$(MAPFILE)
337 #CXXFLAGS += -Fm$(MAPFILE)
341 #CFLAGS += -Fa$(CODFILE) -FAsc
342 #CFLAGS += -Fa$(CODFILE) -FAsc
347 ifdef ENABLE_CXX_EXCEPTIONS
349 CXXFLAGS
+= -fexceptions
351 ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER
)))
357 endif # ENABLE_CXX_EXCEPTIONS
360 ifeq (,$(filter-out WINNT WINCE
,$(HOST_OS_ARCH
)))
361 HOST_PDBFILE
=$(basename $(@F
)).pdb
365 TARGETS
= $(LIBRARY
) $(SHARED_LIBRARY
) $(PROGRAM
) $(SIMPLE_PROGRAMS
) $(HOST_LIBRARY
) $(HOST_PROGRAM
) $(HOST_SIMPLE_PROGRAMS
) $(JAVA_LIBRARY
)
371 $(addsuffix .
$(OBJ_SUFFIX
), $(JMC_GEN
)) \
372 $(CSRCS
:.c
=.
$(OBJ_SUFFIX
)) \
373 $(patsubst %.
cc,%.
$(OBJ_SUFFIX
),$(CPPSRCS
:.
cpp=.
$(OBJ_SUFFIX
))) \
374 $(CMSRCS
:.m
=.
$(OBJ_SUFFIX
)) \
375 $(CMMSRCS
:.mm
=.
$(OBJ_SUFFIX
)) \
376 $(ASFILES
:.
$(ASM_SUFFIX
)=.
$(OBJ_SUFFIX
))
377 OBJS
= $(strip $(_OBJS
))
382 $(addprefix host_
,$(HOST_CSRCS
:.c
=.
$(OBJ_SUFFIX
))) \
383 $(addprefix host_
,$(patsubst %.
cc,%.
$(OBJ_SUFFIX
),$(HOST_CPPSRCS
:.
cpp=.
$(OBJ_SUFFIX
)))) \
384 $(addprefix host_
,$(HOST_CMSRCS
:.m
=.
$(OBJ_SUFFIX
))) \
385 $(addprefix host_
,$(HOST_CMMSRCS
:.mm
=.
$(OBJ_SUFFIX
)))
386 HOST_OBJS
= $(strip $(_HOST_OBJS
))
389 LIBOBJS
:= $(addprefix \", $(OBJS
))
390 LIBOBJS
:= $(addsuffix \", $(LIBOBJS
))
393 ifneq (,$(OBJS
)$(XPIDLSRCS
)$(SDK_XPIDLSRCS
)$(SIMPLE_PROGRAMS
))
394 MDDEPFILES
= $(addprefix $(MDDEPDIR
)/,$(OBJS
:.
$(OBJ_SUFFIX
)=.pp
))
396 MDDEPFILES
+= $(addprefix $(MDDEPDIR
)/,$(XPIDLSRCS
:.idl
=.xpt
)) \
397 $(addprefix $(MDDEPDIR
)/,$(SDK_XPIDLSRCS
:.idl
=.xpt
))
403 $(GARBAGE
) $(TARGETS
) $(OBJS
) $(PROGOBJS
) LOGS TAGS a.out \
404 $(filter-out $(ASFILES
),$(OBJS
:.
$(OBJ_SUFFIX
)=.s
)) $(OBJS
:.
$(OBJ_SUFFIX
)=.ii
) \
405 $(OBJS
:.
$(OBJ_SUFFIX
)=.i
) \
406 $(HOST_PROGOBJS
) $(HOST_OBJS
) $(IMPORT_LIBRARY
) $(DEF_FILE
)\
407 $(EXE_DEF_FILE
) so_locations _gen _stubs
$(wildcard *.res
) $(wildcard *.RES
) \
408 $(wildcard *.pdb
) $(CODFILE
) $(MAPFILE
) $(IMPORT_LIBRARY
) \
409 $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=.exp
) $(wildcard *.ilk
) \
410 $(PROGRAM
:$(BIN_SUFFIX
)=.exp
) $(SIMPLE_PROGRAMS
:$(BIN_SUFFIX
)=.exp
) \
411 $(PROGRAM
:$(BIN_SUFFIX
)=.lib
) $(SIMPLE_PROGRAMS
:$(BIN_SUFFIX
)=.lib
) \
412 $(SIMPLE_PROGRAMS
:$(BIN_SUFFIX
)=.
$(OBJ_SUFFIX
)) \
413 $(wildcard gts_tmp_
*) $(LIBRARY
:%.a
=.
%.timestamp
)
415 $(GARBAGE_DIRS
) /no-such-file
418 GARBAGE
+= $(MOCSRCS
)
421 ifdef SIMPLE_PROGRAMS
422 GARBAGE
+= $(SIMPLE_PROGRAMS
:%=%.
$(OBJ_SUFFIX
))
425 ifdef HOST_SIMPLE_PROGRAMS
426 GARBAGE
+= $(HOST_SIMPLE_PROGRAMS
:%=%.
$(OBJ_SUFFIX
))
430 # the Solaris WorkShop template repository cache. it occasionally can get
431 # out of sync, so targets like clobber should kill it.
433 ifeq ($(OS_ARCH
),SunOS
)
435 GARBAGE_DIRS
+= SunWS_cache
439 ifeq ($(OS_ARCH
),OpenVMS
)
440 GARBAGE
+= $(wildcard *.
*_defines
)
442 VMS_SYMVEC_FILE
= $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=_symvec.opt
)
444 VMS_SYMVEC_FILE_MODULE
= $(topsrcdir
)/build
/unix
/vms
/$(notdir $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=_dbg_symvec.opt
))
446 VMS_SYMVEC_FILE_MODULE
= $(topsrcdir
)/build
/unix
/vms
/$(notdir $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=_symvec.opt
))
448 VMS_SYMVEC_FILE_COMP
= $(topsrcdir
)/build
/unix
/vms
/component_symvec.opt
449 GARBAGE
+= $(VMS_SYMVEC_FILE
)
451 DSO_LDOPTS
:= $(filter-out -auto_symvec
,$(DSO_LDOPTS
)) $(VMS_SYMVEC_FILE
)
456 XPIDL_GEN_DIR
= _xpidlgen
458 ifdef MOZ_UPDATE_XTERM
459 # Its good not to have a newline at the end of the titlebar string because it
460 # makes the make -s output easier to read. Echo -n does not work on all
461 # platforms, but we can trick sed into doing it.
462 UPDATE_TITLE
= sed
-e
"s!Y!$@ in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(dir)!" $(MOZILLA_DIR
)/config
/xterm.str
;
463 UPDATE_TITLE_export
= sed
-e
"s!Y!export in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR
)/config
/xterm.str
;
464 UPDATE_TITLE_libs
= sed
-e
"s!Y!libs in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR
)/config
/xterm.str
;
465 UPDATE_TITLE_tools
= sed
-e
"s!Y!tools in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR
)/config
/xterm.str
;
470 $(foreach dir,$(DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) $@
; ) true
472 # we only use this for the makefiles target and other stuff that doesn't matter
473 LOOP_OVER_PARALLEL_DIRS
= \
475 $(foreach dir,$(PARALLEL_DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) $@
; ) true
477 LOOP_OVER_STATIC_DIRS
= \
479 $(foreach dir,$(STATIC_DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) $@
; ) true
481 LOOP_OVER_TOOL_DIRS
= \
483 $(foreach dir,$(TOOL_DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) $@
; ) true
486 # create a bunch of fake targets for order-only processing
487 PARALLEL_DIRS_export
= $(addsuffix _export
,$(PARALLEL_DIRS
))
488 PARALLEL_DIRS_libs
= $(addsuffix _libs
,$(PARALLEL_DIRS
))
489 PARALLEL_DIRS_tools
= $(addsuffix _tools
,$(PARALLEL_DIRS
))
491 .PHONY
: $(PARALLEL_DIRS_export
) $(PARALLEL_DIRS_libs
) $(PARALLEL_DIRS_tools
)
495 # Now we can differentiate between objects used to build a library, and
496 # objects used to build an executable in the same directory.
503 HOST_PROGOBJS
= $(HOST_OBJS
)
506 # MAKE_DIRS: List of directories to build while looping over directories.
507 # A Makefile that needs $(MDDEPDIR) created but doesn't set any of these
508 # variables we know to check can just set NEED_MDDEPDIR explicitly.
509 ifneq (,$(OBJS
)$(XPIDLSRCS
)$(SDK_XPIDLSRCS
)$(SIMPLE_PROGRAMS
)$(NEED_MDDEPDIR
))
510 MAKE_DIRS
+= $(CURDIR
)/$(MDDEPDIR
)
511 GARBAGE_DIRS
+= $(MDDEPDIR
)
515 # Tags: emacs (etags), vi (ctags)
516 # TAG_PROGRAM := ctags -L -
518 TAG_PROGRAM
= xargs etags
-a
521 # Turn on C++ linking if we have any .cpp or .mm files
522 # (moved this from config.mk so that config.mk can be included
523 # before the CPPSRCS are defined)
525 ifneq ($(CPPSRCS
)$(CMMSRCS
),)
530 # Make sure to wrap static libs inside linker specific flags to turn on & off
531 # inclusion of all symbols inside the static libs
533 ifndef NO_LD_ARCHIVE_FLAGS
534 ifdef SHARED_LIBRARY_LIBS
535 EXTRA_DSO_LDOPTS
:= $(MKSHLIB_FORCE_ALL
) $(SHARED_LIBRARY_LIBS
) $(MKSHLIB_UNFORCE_ALL
) $(EXTRA_DSO_LDOPTS
)
540 # This will strip out symbols that the component should not be
541 # exporting from the .dynsym section.
544 EXTRA_DSO_LDOPTS
+= $(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS
)
548 # Enforce the requirement that MODULE_NAME must be set
549 # for components in static builds
553 ifndef FORCE_SHARED_LIB
555 $(error MODULE_NAME is required for components which may be used in static builds
)
562 # MacOS X specific stuff
565 ifeq ($(OS_ARCH
),Darwin
)
568 EXTRA_DSO_LDOPTS
+= -bundle
570 EXTRA_DSO_LDOPTS
+= -dynamiclib
-install_name @executable_path
/$(SHARED_LIBRARY
) -compatibility_version
1 -current_version
1 -single_module
576 # On NetBSD a.out systems, use -Bsymbolic. This fixes what would otherwise be
577 # fatal symbol name clashes between components.
579 ifeq ($(OS_ARCH
),NetBSD
)
580 ifeq ($(DLL_SUFFIX
),.so
.1.0)
582 EXTRA_DSO_LDOPTS
+= -Wl
,-Bsymbolic
587 ifeq ($(OS_ARCH
),FreeBSD
)
589 EXTRA_DSO_LDOPTS
+= -Wl
,-Bsymbolic
593 ifeq ($(OS_ARCH
),NetBSD
)
594 ifneq (,$(filter arc cobalt hpcmips mipsco newsmips pmax sgimips
,$(OS_TEST
)))
595 ifeq ($(MODULE
),layout
)
596 OS_CFLAGS
+= -Wa
,-xgot
597 OS_CXXFLAGS
+= -Wa
,-xgot
602 ifeq ($(OS_ARCH
),Linux
)
603 ifneq (,$(filter mips mipsel
,$(OS_TEST
)))
604 ifeq ($(MODULE
),layout
)
605 OS_CFLAGS
+= -Wa
,-xgot
606 OS_CXXFLAGS
+= -Wa
,-xgot
612 # HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag
613 # which uses internal symbols first
615 ifeq ($(OS_ARCH
),HP-UX
)
617 ifeq ($(GNU_CC
)$(GNU_CXX
),)
618 EXTRA_DSO_LDOPTS
+= -Wl
,-Bsymbolic
619 ifneq ($(HAS_EXTRAEXPORTS
),1)
620 MKSHLIB
+= -Wl
,+eNSGetModule
-Wl
,+eerrno
621 MKCSHLIB
+= +eNSGetModule
+eerrno
622 ifneq ($(OS_TEST
),ia64
)
623 MKSHLIB
+= -Wl
,+e_shlInit
624 MKCSHLIB
+= +e_shlInit
626 endif # !HAS_EXTRAEXPORTS
627 endif # non-gnu compilers
631 ifeq ($(OS_ARCH
),AIX
)
633 ifneq ($(HAS_EXTRAEXPORTS
),1)
634 MKSHLIB
+= -bE
:$(MOZILLA_DIR
)/build
/unix
/aix.exp
-bnoexpall
635 MKCSHLIB
+= -bE
:$(MOZILLA_DIR
)/build
/unix
/aix.exp
-bnoexpall
636 endif # HAS_EXTRAEXPORTS
641 # OSF1: add -B symbolic flag for components
643 ifeq ($(OS_ARCH
),OSF1
)
645 ifeq ($(GNU_CC
)$(GNU_CXX
),)
646 EXTRA_DSO_LDOPTS
+= -B symbolic
652 # Linux: add -Bsymbolic flag for components
654 ifeq ($(OS_ARCH
),Linux
)
656 EXTRA_DSO_LDOPTS
+= -Wl
,-Bsymbolic
663 ifeq ($(OS_ARCH
),WINNT
)
666 DSO_LDOPTS
+= -Wl
,--out-implib
-Wl
,$(IMPORT_LIBRARY
)
679 ifeq (_WINNT
,$(GNU_CC
)_
$(OS_ARCH
))
683 endif # WINNT && !GNU_CC
684 ifneq (,$(filter WINCE
,$(OS_ARCH
)))
688 ifeq ($(OS_TARGET
), WINCE
)
690 HOST_OUTOPTION
= -Fo
# eol
693 ifeq (,$(CROSS_COMPILE
))
694 HOST_OUTOPTION
= $(OUTOPTION
)
696 HOST_OUTOPTION
= -o
# eol
700 ################################################################################
702 # SUBMAKEFILES: List of Makefiles for next level down.
703 # This is used to update or create the Makefiles before invoking them.
704 SUBMAKEFILES
+= $(addsuffix /Makefile
, $(DIRS
) $(TOOL_DIRS
) $(PARALLEL_DIRS
))
706 # The root makefile doesn't want to do a plain export/libs, because
707 # of the tiers and because of libxul. Suppress the default rules in favor
708 # of something else. Makefiles which use this var *must* provide a sensible
709 # default rule before including rules.mk
710 ifndef SUPPRESS_DEFAULT_RULES
713 DIRS
+= $(foreach tier
,$(TIERS
),$(tier_
$(tier
)_dirs
))
714 STATIC_DIRS
+= $(foreach tier
,$(TIERS
),$(tier_
$(tier
)_staticdirs
))
718 $(foreach tier
,$(TIERS
),$(MAKE
) tier_
$(tier
); ) true
724 $(foreach dir,$(STATIC_DIRS
),$(MAKE
) -C
$(dir); ) true
737 endif # SUPPRESS_DEFAULT_RULES
739 ifeq ($(filter s
,$(MAKEFLAGS
)),)
747 MAKE_TIER_SUBMAKEFILES
= +$(if
$(tier_
$*_dirs
),$(MAKE
) $(addsuffix /Makefile
,$(tier_
$*_dirs
)))
751 @
$(MAKE_TIER_SUBMAKEFILES
)
753 $(foreach dir,$(tier_
$*_dirs
),$(MAKE
) -C
$(dir) export; ) true
757 @
$(MAKE_TIER_SUBMAKEFILES
)
759 $(foreach dir,$(tier_
$*_dirs
),$(MAKE
) -C
$(dir) libs
; ) true
763 @
$(MAKE_TIER_SUBMAKEFILES
)
765 $(foreach dir,$(tier_
$*_dirs
),$(MAKE
) -C
$(dir) tools
; ) true
767 $(foreach tier
,$(TIERS
),tier_
$(tier
))::
768 @
$(ECHO
) "$@: $($@_staticdirs) $($@_dirs)"
770 $(foreach dir,$($@_staticdirs
),$(MAKE
) -C
$(dir); ) true
774 # Do everything from scratch
779 # Add dummy depend target for tinderboxes
783 all_platforms
:: $(NFSPWD
)
785 if
test ! -d LOGS
; then
rm -rf LOGS
; mkdir LOGS
; else true
; fi
; \
786 for h in
$(PLATFORM_HOSTS
); do \
787 echo
"On $$h: $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log";\
788 rsh
$$h -n
"(chdir $$d; \
789 $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log; \
790 echo DONE) &" 2>&1 > LOGS
/$$h.pid
& \
795 cd
$(@D
); $(MAKE
) $(@F
)
798 # Target to only regenerate makefiles
799 makefiles
: $(SUBMAKEFILES
)
800 ifneq (,$(DIRS
)$(TOOL_DIRS
)$(PARALLEL_DIRS
))
801 +$(LOOP_OVER_PARALLEL_DIRS
)
803 +$(LOOP_OVER_TOOL_DIRS
)
807 export:: $(PARALLEL_DIRS_export
)
809 $(PARALLEL_DIRS_export
): %_export
: %/Makefile
810 +@
$(UPDATE_TITLE_export
) $(MAKE
) -C
$* export
813 export:: $(SUBMAKEFILES
) $(MAKE_DIRS
) $(if
$(EXPORTS
)$(XPIDLSRCS
)$(SDK_HEADERS
)$(SDK_XPIDLSRCS
),$(PUBLIC
)) $(if
$(SDK_HEADERS
)$(SDK_XPIDLSRCS
),$(SDK_PUBLIC
)) $(if
$(XPIDLSRCS
),$(IDL_DIR
)) $(if
$(SDK_XPIDLSRCS
),$(SDK_IDL_DIR
))
815 +$(LOOP_OVER_TOOL_DIRS
)
818 tools
:: $(PARALLEL_DIRS_tools
)
820 $(PARALLEL_DIRS_tools
): %_tools
: %/Makefile
821 +@
$(UPDATE_TITLE_tools
) $(MAKE
) -C
$* tools
824 tools
:: $(SUBMAKEFILES
) $(MAKE_DIRS
)
828 $(foreach dir,$(TOOL_DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) libs
; ) true
832 # Rule to create list of libraries for final link
838 ifdef BUILD_STATIC_LIBS
839 @
$(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/build-list.pl
$(FINAL_LINK_COMPS
) $(LIBRARY_NAME
)
841 @
$(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/build-list.pl
$(FINAL_LINK_COMP_NAMES
) $(MODULE_NAME
)
845 $(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/build-list.pl
$(FINAL_LINK_LIBS
) $(LIBRARY_NAME
)
847 endif # EXPORT_LIBRARY
850 # Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries
851 LIBS_DEPS
= $(filter %.
$(LIB_SUFFIX
), $(LIBS
))
852 HOST_LIBS_DEPS
= $(filter %.
$(LIB_SUFFIX
), $(HOST_LIBS
))
853 DSO_LDOPTS_DEPS
= $(EXTRA_DSO_LIBS
) $(filter %.
$(LIB_SUFFIX
), $(EXTRA_DSO_LDOPTS
))
855 # Dependancies which, if modified, should cause everything to rebuild
856 GLOBAL_DEPS
+= Makefile Makefile.in
$(DEPTH
)/config
/autoconf.mk
$(DEPTH
)/config
/config.mk
858 ##############################################
860 libs
:: $(PARALLEL_DIRS_libs
)
862 $(PARALLEL_DIRS_libs
): %_libs
: %/Makefile
863 +@
$(UPDATE_TITLE_libs
) $(MAKE
) -C
$* libs
866 libs
:: $(SUBMAKEFILES
) $(MAKE_DIRS
) $(HOST_LIBRARY
) $(LIBRARY
) $(SHARED_LIBRARY
) $(IMPORT_LIBRARY
) $(HOST_PROGRAM
) $(PROGRAM
) $(HOST_SIMPLE_PROGRAMS
) $(SIMPLE_PROGRAMS
) $(JAVA_LIBRARY
)
867 ifndef NO_DIST_INSTALL
869 ifdef EXPORT_LIBRARY
# Stage libs that will be linked into a static build
871 $(INSTALL
) $(IFLAGS1
) $(LIBRARY
) $(DEPTH
)/staticlib
/components
873 $(INSTALL
) $(IFLAGS1
) $(LIBRARY
) $(DEPTH
)/staticlib
875 endif # EXPORT_LIBRARY
878 $(error Shipping static component libs makes no sense.
)
880 $(INSTALL
) $(IFLAGS1
) $(LIBRARY
) $(DIST
)/lib
886 $(INSTALL
) $(IFLAGS2
) $(SHARED_LIBRARY
) $(FINAL_TARGET
)/components
887 $(ELF_DYNSTR_GC
) $(FINAL_TARGET
)/components
/$(SHARED_LIBRARY
)
888 ifdef BEOS_ADDON_WORKAROUND
889 ( cd
$(FINAL_TARGET
)/components
&& $(CC
) -nostart
-o
$(SHARED_LIBRARY
).stub
$(SHARED_LIBRARY
) )
891 else # ! IS_COMPONENT
892 ifneq (,$(filter OS2 WINNT WINCE
,$(OS_ARCH
)))
893 $(INSTALL
) $(IFLAGS2
) $(IMPORT_LIBRARY
) $(DIST
)/lib
895 $(INSTALL
) $(IFLAGS2
) $(SHARED_LIBRARY
) $(DIST
)/lib
897 $(INSTALL
) $(IFLAGS2
) $(SHARED_LIBRARY
) $(FINAL_TARGET
)
898 ifdef BEOS_ADDON_WORKAROUND
899 ( cd
$(FINAL_TARGET
) && $(CC
) -nostart
-o
$(SHARED_LIBRARY
).stub
$(SHARED_LIBRARY
) )
902 endif # SHARED_LIBRARY
904 $(INSTALL
) $(IFLAGS2
) $(PROGRAM
) $(FINAL_TARGET
)
906 ifdef SIMPLE_PROGRAMS
907 $(INSTALL
) $(IFLAGS2
) $(SIMPLE_PROGRAMS
) $(FINAL_TARGET
)
910 $(INSTALL
) $(IFLAGS2
) $(HOST_PROGRAM
) $(DIST
)/host
/bin
912 ifdef HOST_SIMPLE_PROGRAMS
913 $(INSTALL
) $(IFLAGS2
) $(HOST_SIMPLE_PROGRAMS
) $(DIST
)/host
/bin
916 $(INSTALL
) $(IFLAGS1
) $(HOST_LIBRARY
) $(DIST
)/host
/lib
920 $(INSTALL
) $(IFLAGS1
) $(JAVA_LIBRARY
) $(FINAL_TARGET
)/components
922 $(INSTALL
) $(IFLAGS1
) $(JAVA_LIBRARY
) $(FINAL_TARGET
)
925 endif # !NO_DIST_INSTALL
928 ##############################################
930 ifndef NO_PROFILE_GUIDED_OPTIMIZE
931 ifneq (,$(MOZ_PROFILE_GENERATE
)$(MOZ_PROFILE_USE
))
932 ifeq ($(OS_ARCH
)_
$(GNU_CC
)$(INTERNAL_TOOLS
), WINNT_
)
933 # Force re-linking when building with PGO, since
934 # the MSVC linker does all the work. We force re-link
935 # in both stages so you can do depend builds with PGO.
937 $(SHARED_LIBRARY
): FORCE
938 BINARY_BASENAME
= $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=)
942 BINARY_BASENAME
= $(PROGRAM
:$(BIN_SUFFIX
)=)
945 ifdef MOZ_PROFILE_USE
946 # In the second pass, we need to merge the pgc files into the pgd file.
947 # The compiler would do this for us automatically if they were in the right
948 # place, but they're in dist/bin.
949 ifdef BINARY_BASENAME
951 $(PYTHON
) $(topsrcdir
)/build
/win32
/pgomerge.py \
952 $(BINARY_BASENAME
) $(DIST
)/bin
954 endif # MOZ_PROFILE_USE
956 endif # MOZ_PROFILE_GENERATE || MOZ_PROFILE_USE
957 endif # NO_PROFILE_GUIDED_OPTIMIZE
959 ##############################################
962 $(MAKE
) -C
$(topsrcdir
) -f client.mk checkout
964 run_viewer
: $(FINAL_TARGET
)/viewer
965 cd
$(FINAL_TARGET
); \
966 MOZILLA_FIVE_HOME
=`pwd` \
967 LD_LIBRARY_PATH
=".:$(LIBS_PATH):$$LD_LIBRARY_PATH" \
970 clean clobber realclean clobber_all
:: $(SUBMAKEFILES
)
972 -rm -rf
$(ALL_TRASH_DIRS
)
973 +-$(LOOP_OVER_PARALLEL_DIRS
)
975 +-$(LOOP_OVER_STATIC_DIRS
)
976 +-$(LOOP_OVER_TOOL_DIRS
)
978 distclean:: $(SUBMAKEFILES
)
979 +-$(LOOP_OVER_PARALLEL_DIRS
)
981 +-$(LOOP_OVER_STATIC_DIRS
)
982 +-$(LOOP_OVER_TOOL_DIRS
)
983 -rm -rf
$(ALL_TRASH_DIRS
)
984 -rm -f
$(ALL_TRASH
) \
985 Makefile .HSancillary \
986 $(wildcard *.
$(OBJ_SUFFIX
)) $(wildcard *.ho
) $(wildcard host_
*.o
*) \
987 $(wildcard *.
$(LIB_SUFFIX
)) $(wildcard *$(DLL_SUFFIX
)) \
988 $(wildcard *.
$(IMPORT_LIB_SUFFIX
))
989 ifeq ($(OS_ARCH
),OS2
)
990 -rm -f
$(PROGRAM
:.exe
=.map
)
995 find
$(topsrcdir
) -name
dist -prune
-o \
( -name
'*.[hc]' -o
-name
'*.cp' -o
-name
'*.cpp' -o
-name
'*.idl' \
) -print |
$(TAG_PROGRAM
)
999 # creates OBJS, links with LIBS to create Foo
1001 $(PROGRAM
): $(PROGOBJS
) $(LIBS_DEPS
) $(EXTRA_DEPS
) $(EXE_DEF_FILE
) $(RESFILE
) $(GLOBAL_DEPS
)
1002 ifeq (WINCE
,$(OS_ARCH
))
1003 $(LD
) -NOLOGO
-OUT
:$@
$(WIN32_EXE_LDFLAGS
) $(LDFLAGS
) $(PROGOBJS
) $(RESFILE
) $(LIBS
) $(EXTRA_LIBS
) $(OS_LIBS
)
1005 ifeq (_WINNT
,$(GNU_CC
)_
$(OS_ARCH
))
1006 $(LD
) -NOLOGO
-OUT
:$@
-PDB
:$(LINK_PDBFILE
) $(WIN32_EXE_LDFLAGS
) $(LDFLAGS
) $(PROGOBJS
) $(RESFILE
) $(LIBS
) $(EXTRA_LIBS
) $(OS_LIBS
)
1007 ifdef MSMANIFEST_TOOL
1008 @if
test -f
$@.manifest
; then \
1009 if
test -f
"$(srcdir)/$@.manifest"; then \
1010 mt.exe
-NOLOGO
-MANIFEST
"$(win_srcdir)/$@.manifest" $@.manifest
-OUTPUTRESOURCE
:$@\
;1; \
1012 mt.exe
-NOLOGO
-MANIFEST
$@.manifest
-OUTPUTRESOURCE
:$@\
;1; \
1014 rm -f
$@.manifest
; \
1016 endif # MSVC with manifest tool
1018 ifeq ($(CPP_PROG_LINK
),1)
1019 $(CCC
) -o
$@
$(CXXFLAGS
) $(WRAP_MALLOC_CFLAGS
) $(PROGOBJS
) $(RESFILE
) $(WIN32_EXE_LDFLAGS
) $(SOLARIS_JEMALLOC_LDFLAGS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(BIN_FLAGS
) $(WRAP_MALLOC_LIB
) $(PROFILER_LIBS
) $(EXE_DEF_FILE
)
1020 else # ! CPP_PROG_LINK
1021 $(CC
) -o
$@
$(CFLAGS
) $(PROGOBJS
) $(RESFILE
) $(WIN32_EXE_LDFLAGS
) $(SOLARIS_JEMALLOC_LDFLAGS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(BIN_FLAGS
) $(EXE_DEF_FILE
)
1022 endif # CPP_PROG_LINK
1023 endif # WINNT && !GNU_CC
1029 ifdef MOZ_POST_PROGRAM_COMMAND
1030 $(MOZ_POST_PROGRAM_COMMAND
) $@
1032 ifeq ($(OS_ARCH
),BeOS
)
1033 ifdef BEOS_PROGRAM_RESOURCE
1034 xres
-o
$@
$(BEOS_PROGRAM_RESOURCE
)
1039 $(HOST_PROGRAM
): $(HOST_PROGOBJS
) $(HOST_LIBS_DEPS
) $(HOST_EXTRA_DEPS
) $(GLOBAL_DEPS
)
1040 ifeq (WINCE
,$(OS_ARCH
))
1041 $(HOST_LD
) -NOLOGO
-OUT
:$@
$(HOST_OBJS
) $(WIN32_EXE_LDFLAGS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1043 ifeq (_WINNT
,$(GNU_CC
)_
$(HOST_OS_ARCH
))
1044 $(HOST_LD
) -NOLOGO
-OUT
:$@
-PDB
:$(HOST_PDBFILE
) $(HOST_OBJS
) $(WIN32_EXE_LDFLAGS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1045 ifdef MSMANIFEST_TOOL
1046 @if
test -f
$@.manifest
; then \
1047 mt.exe
-NOLOGO
-MANIFEST
$@.manifest
-OUTPUTRESOURCE
:$@\
;1; \
1048 rm -f
$@.manifest
; \
1050 endif # MSVC with manifest tool
1052 ifeq ($(CPP_PROG_LINK
),1)
1053 $(HOST_CXX
) -o
$@
$(HOST_CXXFLAGS
) $(HOST_LDFLAGS
) $(HOST_PROGOBJS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1055 $(HOST_CC
) -o
$@
$(HOST_CFLAGS
) $(HOST_LDFLAGS
) $(HOST_PROGOBJS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1056 endif # CPP_PROG_LINK
1061 # This is an attempt to support generation of multiple binaries
1062 # in one directory, it assumes everything to compile Foo is in
1063 # Foo.o (from either Foo.c or Foo.cpp).
1065 # SIMPLE_PROGRAMS = Foo Bar
1066 # creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
1068 $(SIMPLE_PROGRAMS
): %$(BIN_SUFFIX
): %.
$(OBJ_SUFFIX
) $(LIBS_DEPS
) $(EXTRA_DEPS
) $(GLOBAL_DEPS
)
1069 ifeq (WINCE
,$(OS_ARCH
))
1070 $(LD
) -nologo
-entry
:main
-out
:$@
$< $(WIN32_EXE_LDFLAGS
) $(LDFLAGS
) $(LIBS
) $(EXTRA_LIBS
) $(OS_LIBS
)
1072 ifeq (_WINNT
,$(GNU_CC
)_
$(OS_ARCH
))
1073 $(LD
) -nologo
-out
:$@
-pdb
:$(LINK_PDBFILE
) $< $(WIN32_EXE_LDFLAGS
) $(LDFLAGS
) $(LIBS
) $(EXTRA_LIBS
) $(OS_LIBS
)
1074 ifdef MSMANIFEST_TOOL
1075 @if
test -f
$@.manifest
; then \
1076 mt.exe
-NOLOGO
-MANIFEST
$@.manifest
-OUTPUTRESOURCE
:$@\
;1; \
1077 rm -f
$@.manifest
; \
1079 endif # MSVC with manifest tool
1081 ifeq ($(CPP_PROG_LINK
),1)
1082 $(CCC
) $(WRAP_MALLOC_CFLAGS
) $(CXXFLAGS
) -o
$@
$< $(WIN32_EXE_LDFLAGS
) $(SOLARIS_JEMALLOC_LDFLAGS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(WRAP_MALLOC_LIB
) $(PROFILER_LIBS
) $(BIN_FLAGS
)
1084 $(CC
) $(WRAP_MALLOC_CFLAGS
) $(CFLAGS
) $(OUTOPTION
)$@
$< $(WIN32_EXE_LDFLAGS
) $(SOLARIS_JEMALLOC_LDFLAGS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(WRAP_MALLOC_LIB
) $(PROFILER_LIBS
) $(BIN_FLAGS
)
1085 endif # CPP_PROG_LINK
1086 endif # WINNT && !GNU_CC
1092 ifdef MOZ_POST_PROGRAM_COMMAND
1093 $(MOZ_POST_PROGRAM_COMMAND
) $@
1096 $(HOST_SIMPLE_PROGRAMS
): host_
%$(HOST_BIN_SUFFIX
): host_
%.
$(OBJ_SUFFIX
) $(HOST_LIBS_DEPS
) $(HOST_EXTRA_DEPS
) $(GLOBAL_DEPS
)
1097 ifeq (WINCE
,$(OS_ARCH
))
1098 $(HOST_LD
) -NOLOGO
-OUT
:$@
$(WIN32_EXE_LDFLAGS
) $< $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1100 ifeq (WINNT_
,$(HOST_OS_ARCH
)_
$(GNU_CC
))
1101 $(HOST_LD
) -NOLOGO
-OUT
:$@
-PDB
:$(HOST_PDBFILE
) $< $(WIN32_EXE_LDFLAGS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1103 ifneq (,$(HOST_CPPSRCS
)$(USE_HOST_CXX
))
1104 $(HOST_CXX
) $(HOST_OUTOPTION
)$@
$(HOST_CXXFLAGS
) $(INCLUDES
) $< $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1106 $(HOST_CC
) $(HOST_OUTOPTION
)$@
$(HOST_CFLAGS
) $(INCLUDES
) $< $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1112 # Purify target. Solaris/sparc only to start.
1113 # Purify does not recognize "egcs" or "c++" so we go with
1114 # "gcc" and "g++" for now.
1117 ifeq ($(CPP_PROG_LINK
),1)
1118 $(PURIFY
) $(CCC
) -o
$^.pure
$(CXXFLAGS
) $(PROGOBJS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
)
1120 $(PURIFY
) $(CC
) -o
$^.pure
$(CFLAGS
) $(PROGOBJS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
)
1122 ifndef NO_DIST_INSTALL
1123 $(INSTALL
) $(IFLAGS2
) $^.pure
$(FINAL_TARGET
)
1126 quantify
: $(PROGRAM
)
1127 ifeq ($(CPP_PROG_LINK
),1)
1128 $(QUANTIFY
) $(CCC
) -o
$^.quantify
$(CXXFLAGS
) $(PROGOBJS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
)
1130 $(QUANTIFY
) $(CC
) -o
$^.quantify
$(CFLAGS
) $(PROGOBJS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
)
1132 ifndef NO_DIST_INSTALL
1133 $(INSTALL
) $(IFLAGS2
) $^.quantify
$(FINAL_TARGET
)
1137 # This allows us to create static versions of the shared libraries
1138 # that are built using other static libraries. Confused...?
1140 ifdef SHARED_LIBRARY_LIBS
1141 ifeq (,$(GNU_LD
)$(filter-out OS2 WINNT WINCE
, $(OS_ARCH
)))
1142 ifneq (,$(BUILD_STATIC_LIBS
)$(FORCE_STATIC_LIB
))
1143 LOBJS
+= $(SHARED_LIBRARY_LIBS
)
1146 ifneq (,$(filter OSF1 BSD_OS FreeBSD NetBSD OpenBSD SunOS Darwin
,$(OS_ARCH
)))
1147 CLEANUP1
:= | egrep
-v
'(________64ELEL_|__.SYMDEF)'
1148 CLEANUP2
:= rm -f ________64ELEL_ __.SYMDEF
1152 SUB_LOBJS
= $(shell for lib in
$(SHARED_LIBRARY_LIBS
); do
$(AR_LIST
) $${lib} $(CLEANUP1
); done
;)
1155 ifdef MOZILLA_PROBE_LIBS
1156 PROBE_LOBJS
= $(shell for lib in
$(MOZILLA_PROBE_LIBS
); do
$(AR_LIST
) $${lib} $(CLEANUP1
); done
;)
1158 ifdef DTRACE_PROBE_OBJ
1159 EXTRA_DEPS
+= $(DTRACE_PROBE_OBJ
)
1162 $(LIBRARY
): $(OBJS
) $(LOBJS
) $(SHARED_LIBRARY_LIBS
) $(EXTRA_DEPS
) $(GLOBAL_DEPS
)
1164 ifneq (,$(GNU_LD
)$(filter-out OS2 WINNT WINCE
, $(OS_ARCH
)))
1165 ifdef SHARED_LIBRARY_LIBS
1167 @for lib in
$(SHARED_LIBRARY_LIBS
); do
$(AR_EXTRACT
) $${lib}; $(CLEANUP2
); done
1170 $(AR
) $(AR_FLAGS
) $(OBJS
) $(LOBJS
) $(SUB_LOBJS
)
1172 @
rm -f foodummyfilefoo
$(SUB_LOBJS
)
1174 ifeq (,$(filter-out WINNT WINCE
, $(OS_ARCH
)))
1175 $(IMPORT_LIBRARY
): $(SHARED_LIBRARY
)
1178 ifeq ($(OS_ARCH
),OS2
)
1179 $(DEF_FILE
): $(OBJS
) $(SHARED_LIBRARY_LIBS
)
1181 echo LIBRARY
$(LIBRARY_NAME
) INITINSTANCE TERMINSTANCE
> $@
1183 echo CODE LOADONCALL MOVEABLE DISCARDABLE
>> $@
1184 echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED
>> $@
1186 ifeq ($(IS_COMPONENT
),1)
1187 ifeq ($(HAS_EXTRAEXPORTS
),1)
1188 ifndef MOZ_OS2_USE_DECLSPEC
1189 $(FILTER
) $(OBJS
) $(SHARED_LIBRARY_LIBS
) >> $@
1192 echo _NSGetModule
>> $@
1195 ifndef MOZ_OS2_USE_DECLSPEC
1196 $(FILTER
) $(OBJS
) $(SHARED_LIBRARY_LIBS
) >> $@
1201 ifdef MOZ_OS2_USE_DECLSPEC
1202 $(IMPORT_LIBRARY
): $(SHARED_LIBRARY
)
1204 $(IMPORT_LIBRARY
): $(DEF_FILE
)
1211 $(HOST_LIBRARY
): $(HOST_OBJS
) Makefile
1213 $(HOST_AR
) $(HOST_AR_FLAGS
) $(HOST_OBJS
)
1216 ifdef NO_LD_ARCHIVE_FLAGS
1217 SUB_SHLOBJS
= $(SUB_LOBJS
)
1222 ifdef DTRACE_PROBE_OBJ
1223 ifndef DTRACE_LIB_DEPENDENT
1224 $(DTRACE_PROBE_OBJ
): $(OBJS
)
1225 dtrace
-G
-C
-32 -s
$(MOZILLA_DTRACE_SRC
) -o
$(DTRACE_PROBE_OBJ
) $(OBJS
)
1231 # On Darwin (Mac OS X), dwarf2 debugging uses debug info left in .o files,
1232 # so instead of deleting .o files after repacking them into a dylib, we make
1233 # symlinks back to the originals. The symlinks are a no-op for stabs debugging,
1234 # so no need to conditionalize on OS version or debugging format.
1236 $(SHARED_LIBRARY
): $(OBJS
) $(LOBJS
) $(DEF_FILE
) $(RESFILE
) $(SHARED_LIBRARY_LIBS
) $(EXTRA_DEPS
) $(DSO_LDOPTS_DEPS
) $(GLOBAL_DEPS
)
1237 ifndef INCREMENTAL_LINKER
1240 ifeq ($(OS_ARCH
),OpenVMS
)
1241 @if
test ! -f
$(VMS_SYMVEC_FILE
); then \
1242 if
test -f
$(VMS_SYMVEC_FILE_MODULE
); then \
1243 echo Creating specific component options file
$(VMS_SYMVEC_FILE
); \
1244 cp
$(VMS_SYMVEC_FILE_MODULE
) $(VMS_SYMVEC_FILE
); \
1248 @if
test ! -f
$(VMS_SYMVEC_FILE
); then \
1249 echo Creating generic component options file
$(VMS_SYMVEC_FILE
); \
1250 cp
$(VMS_SYMVEC_FILE_COMP
) $(VMS_SYMVEC_FILE
); \
1254 ifdef NO_LD_ARCHIVE_FLAGS
1255 ifdef SHARED_LIBRARY_LIBS
1256 @
rm -f
$(SUB_SHLOBJS
)
1257 @for lib in
$(SHARED_LIBRARY_LIBS
); do
$(AR_EXTRACT
) $${lib}; $(CLEANUP2
); done
1258 ifeq ($(OS_ARCH
),Darwin
)
1259 @echo Making symlinks to the original object files in the archive libraries
$(SHARED_LIBRARY_LIBS
)
1260 @for lib in
$(SHARED_LIBRARY_LIBS
); do \
1261 libdir=`echo $$lib|sed -e 's,/[^/]*\.a,,'`; \
1262 ofiles
=`$(AR_LIST) $${lib}`; \
1263 for ofile in
$$ofiles; do \
1264 if
[ -f
$$libdir/$$ofile ]; then \
1266 ln
-s
$$libdir/$$ofile $$ofile; \
1271 endif # SHARED_LIBRARY_LIBS
1272 endif # NO_LD_ARCHIVE_FLAGS
1273 ifdef DTRACE_LIB_DEPENDENT
1274 @
rm -f
$(PROBE_LOBJS
)
1275 @for lib in
$(MOZILLA_PROBE_LIBS
); do
$(AR_EXTRACT
) $${lib}; $(CLEANUP2
); done
1277 dtrace
-G
-C
-32 -s
$(MOZILLA_DTRACE_SRC
) -o
$(DTRACE_PROBE_OBJ
) $(PROBE_LOBJS
)
1279 @for lib in
$(MOZILLA_PROBE_LIBS
); do \
1280 ofiles
=`$(AR_LIST) $${lib}`; \
1281 $(AR_DELETE
) $${lib} $$ofiles; \
1283 $(MKSHLIB
) $(SHLIB_LDSTARTFILE
) $(OBJS
) $(LOBJS
) $(SUB_SHLOBJS
) $(DTRACE_PROBE_OBJ
) $(PROBE_LOBJS
) $(RESFILE
) $(LDFLAGS
) $(EXTRA_DSO_LDOPTS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(DEF_FILE
) $(SHLIB_LDENDFILE
)
1284 @
rm -f
$(PROBE_LOBJS
)
1285 @
rm -f
$(DTRACE_PROBE_OBJ
)
1286 @for lib in
$(MOZILLA_PROBE_LIBS
); do \
1287 if
[ -L
$${lib} ]; then
rm -f
`readlink $${lib}`; fi
; \
1289 @
rm -f
$(MOZILLA_PROBE_LIBS
)
1291 else # ! DTRACE_LIB_DEPENDENT
1292 $(MKSHLIB
) $(SHLIB_LDSTARTFILE
) $(OBJS
) $(DTRACE_PROBE_OBJ
) $(LOBJS
) $(SUB_SHLOBJS
) $(RESFILE
) $(LDFLAGS
) $(EXTRA_DSO_LDOPTS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(DEF_FILE
) $(SHLIB_LDENDFILE
)
1293 endif # DTRACE_LIB_DEPENDENT
1295 ifeq (_WINNT
,$(GNU_CC
)_
$(OS_ARCH
))
1296 ifdef MSMANIFEST_TOOL
1297 ifdef EMBED_MANIFEST_AT
1298 @if
test -f
$@.manifest
; then \
1299 mt.exe
-NOLOGO
-MANIFEST
$@.manifest
-OUTPUTRESOURCE
:$@\
;$(EMBED_MANIFEST_AT
); \
1300 rm -f
$@.manifest
; \
1302 endif # EMBED_MANIFEST_AT
1303 endif # MSVC with manifest tool
1304 endif # WINNT && !GCC
1305 ifeq ($(OS_ARCH
),Darwin
)
1307 @
rm -f
$(SUB_SHLOBJS
)
1309 @
rm -f foodummyfilefoo
$(DELETE_AFTER_LINK
)
1314 ifdef MOZ_POST_DSO_LIB_COMMAND
1315 $(MOZ_POST_DSO_LIB_COMMAND
) $@
1319 ifdef COMPILER_DEPEND
1320 ifeq (__SunOS
,$(GNU_CC
)_
$(GNU_CXX
)_
$(OS_ARCH
))
1321 _MDDEPFILE
= $(MDDEPDIR
)/$(@F
).pp
1323 define MAKE_DEPS_AUTO_CC
1324 if
test -d
$(@D
); then \
1325 echo
"Building deps for $< using Sun Studio cc"; \
1326 $(CC
) $(COMPILE_CFLAGS
) -xM
$< >$(_MDDEPFILE
) ; \
1329 define MAKE_DEPS_AUTO_CXX
1330 if
test -d
$(@D
); then \
1331 echo
"Building deps for $< using Sun Studio CC"; \
1332 $(CXX
) $(COMPILE_CXXFLAGS
) -xM
$< >$(_MDDEPFILE
) ; \
1335 endif # Sun Studio on Solaris
1336 else # COMPILER_DEPEND
1338 # Generate dependencies on the fly
1340 _MDDEPFILE
= $(MDDEPDIR
)/$(@F
).pp
1342 define MAKE_DEPS_AUTO
1343 if
test -d
$(@D
); then \
1344 echo
"Building deps for $<"; \
1345 $(MKDEPEND
) -o
'.$(OBJ_SUFFIX)' -f-
$(DEFINES
) $(ACDEFINES
) $(INCLUDES
) $< 2>/dev
/null | sed
-e
"s|^[^ ]*/||" > $(_MDDEPFILE
) ; \
1349 MAKE_DEPS_AUTO_CC
= $(MAKE_DEPS_AUTO
)
1350 MAKE_DEPS_AUTO_CXX
= $(MAKE_DEPS_AUTO
)
1352 endif # COMPILER_DEPEND
1354 endif # MOZ_AUTO_DEPS
1357 ifeq ($(OS_ARCH
),SunOS
)
1358 SOLARIS_JEMALLOC_LDFLAGS
= $(call EXPAND_LIBNAME_PATH
,jemalloc
,$(DIST
)/lib
)
1362 # Rules for building native targets must come first because of the host_ prefix
1363 host_
%.
$(OBJ_SUFFIX
): %.c
$(GLOBAL_DEPS
)
1365 $(ELOG
) $(HOST_CC
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1367 host_
%.
$(OBJ_SUFFIX
): %.
cpp $(GLOBAL_DEPS
)
1369 $(ELOG
) $(HOST_CXX
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CXXFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1371 host_
%.
$(OBJ_SUFFIX
): %.
cc $(GLOBAL_DEPS
)
1373 $(ELOG
) $(HOST_CXX
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CXXFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1375 host_
%.
$(OBJ_SUFFIX
): %.m
$(GLOBAL_DEPS
)
1377 $(ELOG
) $(HOST_CC
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CFLAGS
) $(HOST_CMFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1379 host_
%.
$(OBJ_SUFFIX
): %.mm
$(GLOBAL_DEPS
)
1381 $(ELOG
) $(HOST_CXX
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CXXFLAGS
) $(HOST_CMMFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1383 %: %.c
$(GLOBAL_DEPS
)
1385 @
$(MAKE_DEPS_AUTO_CC
)
1386 $(ELOG
) $(CC
) $(CFLAGS
) $(LDFLAGS
) $(OUTOPTION
)$@
$(_VPATH_SRCS
)
1388 %.
$(OBJ_SUFFIX
): %.c
$(GLOBAL_DEPS
)
1390 @
$(MAKE_DEPS_AUTO_CC
)
1391 $(ELOG
) $(CC
) $(OUTOPTION
)$@
-c
$(COMPILE_CFLAGS
) $(_VPATH_SRCS
)
1393 moc_
%.
cpp: %.h
$(GLOBAL_DEPS
)
1394 $(MOC
) $< $(OUTOPTION
)$@
1397 # The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
1399 %.
$(OBJ_SUFFIX
): %.
$(ASM_SUFFIX
) $(GLOBAL_DEPS
)
1400 $(AS
) -o
$@
$(ASFLAGS
) $(AS_DASH_C_FLAG
) $(_VPATH_SRCS
)
1403 %.
$(OBJ_SUFFIX
): %.S
$(GLOBAL_DEPS
)
1404 $(AS
) -o
$@
$(ASFLAGS
) -c
$<
1406 %: %.
cpp $(GLOBAL_DEPS
)
1407 @
$(MAKE_DEPS_AUTO_CXX
)
1408 $(CCC
) $(OUTOPTION
)$@
$(CXXFLAGS
) $(_VPATH_SRCS
) $(LDFLAGS
)
1411 # Please keep the next two rules in sync.
1413 %.
$(OBJ_SUFFIX
): %.
cc $(GLOBAL_DEPS
)
1415 @
$(MAKE_DEPS_AUTO_CXX
)
1416 $(ELOG
) $(CCC
) $(OUTOPTION
)$@
-c
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
)
1418 %.
$(OBJ_SUFFIX
): %.
cpp $(GLOBAL_DEPS
)
1420 @
$(MAKE_DEPS_AUTO_CXX
)
1421 ifdef STRICT_CPLUSPLUS_SUFFIX
1422 echo
"#line 1 \"$*.cpp\"" | cat
- $*.
cpp > t_
$*.
cc
1423 $(ELOG
) $(CCC
) -o
$@
-c
$(COMPILE_CXXFLAGS
) t_
$*.
cc
1426 $(ELOG
) $(CCC
) $(OUTOPTION
)$@
-c
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
)
1427 endif #STRICT_CPLUSPLUS_SUFFIX
1429 $(OBJ_PREFIX
)%.
$(OBJ_SUFFIX
): %.mm
$(GLOBAL_DEPS
)
1431 @
$(MAKE_DEPS_AUTO_CXX
)
1432 $(ELOG
) $(CCC
) -o
$@
-c
$(COMPILE_CXXFLAGS
) $(COMPILE_CMMFLAGS
) $(_VPATH_SRCS
)
1434 $(OBJ_PREFIX
)%.
$(OBJ_SUFFIX
): %.m
$(GLOBAL_DEPS
)
1436 @
$(MAKE_DEPS_AUTO_CC
)
1437 $(ELOG
) $(CC
) -o
$@
-c
$(COMPILE_CFLAGS
) $(COMPILE_CMFLAGS
) $(_VPATH_SRCS
)
1440 $(CCC
) -S
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
)
1443 $(CCC
) -S
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
)
1446 $(CC
) -S
$(COMPILE_CFLAGS
) $(_VPATH_SRCS
)
1449 $(CCC
) -C
-E
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
) > $*.i
1452 $(CCC
) -C
-E
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
) > $*.i
1455 $(CC
) -C
-E
$(COMPILE_CFLAGS
) $(_VPATH_SRCS
) > $*.i
1458 $(CCC
) -C
-E
$(COMPILE_CXXFLAGS
) $(COMPILE_CMMFLAGS
) $(_VPATH_SRCS
) > $*.i
1461 @echo Creating Resource file
: $@
1462 ifeq ($(OS_ARCH
),OS2
)
1463 $(RC
) $(RCFLAGS
:-D
%=-d
%) -i
$(subst /,\
,$(srcdir)) -r
$< $@
1466 $(RC
) $(RCFLAGS
) $(filter-out -U
%,$(DEFINES
)) $(INCLUDES
:-I
%=--include-dir
%) $(OUTOPTION
)$@
$(_VPATH_SRCS
)
1468 $(RC
) $(RCFLAGS
) -r
$(DEFINES
) $(INCLUDES
) $(OUTOPTION
)$@
$(_VPATH_SRCS
)
1472 # need 3 separate lines for OS/2
1479 rm -f
$@
; cp
$< $@
; chmod
+x
$@
1481 # Cancel these implicit rules
1491 ###############################################################################
1493 ###############################################################################
1494 ifneq (,$(filter OS2 WINNT WINCE
,$(OS_ARCH
)))
1501 SPACE
:= $(EMPTY
) $(EMPTY
)
1503 # Cygwin and MSYS have their own special path form, but javac expects the source
1504 # and class paths to be in the DOS form (i.e. e:/builds/...). This function
1505 # does the appropriate conversion on Windows, but is a noop on other systems.
1506 ifeq (,$(filter-out WINNT WINCE
, $(HOST_OS_ARCH
)))
1507 ifdef CYGWIN_WRAPPER
1508 normalizepath
= $(foreach p
,$(1),$(shell cygpath
-m
$(p
)))
1511 # We use 'pwd -W' to get DOS form of the path. However, since the given path
1512 # could be a file or a non-existent path, we cannot call 'pwd -W' directly
1513 # on the path. Instead, we extract the root path (i.e. "c:/"), call 'pwd -W'
1514 # on it, then merge with the rest of the path.
1515 root-path
= $(shell echo
$(1) | sed
-e
"s|\(/[^/]*\)/\?\(.*\)|\1|")
1516 non-root-path
= $(shell echo
$(1) | sed
-e
"s|\(/[^/]*\)/\?\(.*\)|\2|")
1517 normalizepath
= $(foreach p
,$(1),$(if
$(filter /%,$(1)),$(shell cd
$(call root-path
,$(1)) && pwd
-W
)$(call non-root-path
,$(1)),$(1)))
1520 normalizepath
= $(1)
1523 _srcdir
= $(call normalizepath
,$(srcdir))
1524 ifdef JAVA_SOURCEPATH
1525 SP
= $(subst $(SPACE
),$(SEP
),$(call normalizepath
,$(strip $(JAVA_SOURCEPATH
))))
1526 _JAVA_SOURCEPATH
= ".$(SEP)$(_srcdir)$(SEP)$(SP)"
1528 _JAVA_SOURCEPATH
= ".$(SEP)$(_srcdir)"
1531 ifdef JAVA_CLASSPATH
1532 CP
= $(subst $(SPACE
),$(SEP
),$(call normalizepath
,$(strip $(JAVA_CLASSPATH
))))
1533 _JAVA_CLASSPATH
= ".$(SEP)$(CP)"
1542 $(_JAVA_DIR
)/%.class
: %.java
$(GLOBAL_DEPS
) $(_JAVA_DIR
)
1543 $(CYGWIN_WRAPPER
) $(JAVAC
) $(JAVAC_FLAGS
) -classpath
$(_JAVA_CLASSPATH
) \
1544 -sourcepath
$(_JAVA_SOURCEPATH
) -d
$(_JAVA_DIR
) $(_VPATH_SRCS
)
1546 $(JAVA_LIBRARY
): $(addprefix $(_JAVA_DIR
)/,$(JAVA_SRCS
:.java
=.class
)) $(GLOBAL_DEPS
)
1547 $(JAR
) cf
$@
-C
$(_JAVA_DIR
) .
1549 GARBAGE_DIRS
+= $(_JAVA_DIR
)
1551 ###############################################################################
1553 ###############################################################################
1555 # In GNU make 3.80, makefiles must use the /cygdrive syntax, even if we're
1556 # processing them with AS perl. See bug 232003
1558 CYGWIN_TOPSRCDIR
= -nowrap
-p
$(topsrcdir
) -wrap
1561 # Note: Passing depth to make-makefile is optional.
1562 # It saves the script some work, though.
1563 Makefile
: Makefile.in
1564 @
$(PERL
) $(AUTOCONF_TOOLS
)/make-makefile
-t
$(topsrcdir
) -d
$(DEPTH
) $(CYGWIN_TOPSRCDIR
)
1567 # VPATH does not work on some machines in this case, so add $(srcdir)
1568 $(SUBMAKEFILES
): % : $(srcdir)/%.in
1569 $(PERL
) $(AUTOCONF_TOOLS
)/make-makefile
-t
$(topsrcdir
) -d
$(DEPTH
) $(CYGWIN_TOPSRCDIR
) $@
1572 ifdef AUTOUPDATE_CONFIGURE
1573 $(topsrcdir
)/configure
: $(topsrcdir
)/configure.in
1574 (cd
$(topsrcdir
) && $(AUTOCONF
)) && (cd
$(DEPTH
) && .
/config.status
--recheck
)
1577 ###############################################################################
1578 # Bunch of things that extend the 'export' rule (in order):
1579 ###############################################################################
1581 ################################################################################
1582 # Copy each element of EXPORTS to $(PUBLIC)
1584 ifneq ($(EXPORTS
)$(XPIDLSRCS
)$(SDK_HEADERS
)$(SDK_XPIDLSRCS
),)
1585 $(SDK_PUBLIC
) $(PUBLIC
)::
1590 ifneq ($(XPIDLSRCS
)$(SDK_XPIDLSRCS
),)
1596 ifneq ($(XPI_NAME
),)
1600 export:: $(FINAL_TARGET
)
1603 ifndef NO_DIST_INSTALL
1605 export:: $(EXPORTS
) $(PUBLIC
)
1606 $(INSTALL
) $(IFLAGS1
) $^
1609 ifneq ($(SDK_HEADERS
),)
1610 export:: $(SDK_HEADERS
) $(SDK_PUBLIC
)
1611 $(INSTALL
) $(IFLAGS1
) $^
1613 export:: $(SDK_HEADERS
) $(PUBLIC
)
1614 $(INSTALL
) $(IFLAGS1
) $^
1616 endif # NO_DIST_INSTALL
1618 ################################################################################
1619 # Copy each element of PREF_JS_EXPORTS
1624 ifneq (,$(XPI_NAME
)$(LIBXUL_SDK
))
1625 PREF_DIR
= defaults
/preferences
1627 PREF_DIR
= defaults
/pref
1631 ifneq ($(PREF_JS_EXPORTS
),)
1632 # on win32, pref files need CRLF line endings... see bug 206029
1633 ifeq (WINNT
,$(OS_ARCH
))
1634 PREF_PPFLAGS
= --line-endings
=crlf
1637 ifndef NO_DIST_INSTALL
1638 $(FINAL_TARGET
)/$(PREF_DIR
):
1641 libs
:: $(FINAL_TARGET
)/$(PREF_DIR
) $(PREF_JS_EXPORTS
)
1643 for i in
$(PREF_JS_EXPORTS
); do \
1644 dest
=$(FINAL_TARGET
)/$(PREF_DIR
)/`basename $$i`; \
1646 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py
$(PREF_PPFLAGS
) $(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) $$i > $$dest; \
1651 ################################################################################
1652 # Copy each element of AUTOCFG_JS_EXPORTS to $(FINAL_TARGET)/defaults/autoconfig
1654 ifneq ($(AUTOCFG_JS_EXPORTS
),)
1655 $(FINAL_TARGET
)/defaults
/autoconfig
::
1658 ifndef NO_DIST_INSTALL
1659 export:: $(AUTOCFG_JS_EXPORTS
) $(FINAL_TARGET
)/defaults
/autoconfig
1660 $(INSTALL
) $(IFLAGS1
) $^
1664 ################################################################################
1665 # Export the elements of $(XPIDLSRCS) & $(SDK_XPIDLSRCS),
1666 # generating .h and .xpt files and moving them to the appropriate places.
1668 ifneq ($(XPIDLSRCS
)$(SDK_XPIDLSRCS
),)
1670 export:: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.h
, $(XPIDLSRCS
))
1673 XPIDL_MODULE
= $(MODULE
)
1676 ifeq ($(XPIDL_MODULE
),) # we need $(XPIDL_MODULE) to make $(XPIDL_MODULE).xpt
1679 @echo
"*** Error processing XPIDLSRCS:"
1680 @echo
"Please define MODULE or XPIDL_MODULE when defining XPIDLSRCS,"
1681 @echo
"so we have a module name to use when creating MODULE.xpt."
1682 @echo
; sleep
2; false
1685 $(SDK_IDL_DIR
) $(IDL_DIR
)::
1688 # generate .h files from into $(XPIDL_GEN_DIR), then export to $(PUBLIC);
1689 # warn against overriding existing .h file.
1690 $(XPIDL_GEN_DIR
)/.done
:
1691 @if
test ! -d
$(XPIDL_GEN_DIR
); then echo Creating
$(XPIDL_GEN_DIR
)/.done
; rm -rf
$(XPIDL_GEN_DIR
); mkdir
$(XPIDL_GEN_DIR
); fi
1694 # don't depend on $(XPIDL_GEN_DIR), because the modification date changes
1695 # with any addition to the directory, regenerating all .h files -> everything.
1697 $(XPIDL_GEN_DIR
)/%.h
: %.idl
$(XPIDL_COMPILE
) $(XPIDL_GEN_DIR
)/.done
1699 $(ELOG
) $(XPIDL_COMPILE
) -m header
-w
$(XPIDL_FLAGS
) -o
$(XPIDL_GEN_DIR
)/$* $(_VPATH_SRCS
)
1700 @if
test -n
"$(findstring $*.h, $(EXPORTS) $(SDK_HEADERS))"; \
1701 then echo
"*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true
; fi
1704 # generate intermediate .xpt files into $(XPIDL_GEN_DIR), then link
1705 # into $(XPIDL_MODULE).xpt and export it to $(FINAL_TARGET)/components.
1706 $(XPIDL_GEN_DIR
)/%.xpt
: %.idl
$(XPIDL_COMPILE
) $(XPIDL_GEN_DIR
)/.done
1708 $(ELOG
) $(XPIDL_COMPILE
) -m typelib
-w
$(XPIDL_FLAGS
) -e
$@
-d
$(MDDEPDIR
)/$*.pp
$(_VPATH_SRCS
)
1710 # no need to link together if XPIDLSRCS contains only XPIDL_MODULE
1711 ifneq ($(XPIDL_MODULE
).idl
,$(strip $(XPIDLSRCS
)))
1712 $(XPIDL_GEN_DIR
)/$(XPIDL_MODULE
).xpt
: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.xpt
,$(XPIDLSRCS
) $(SDK_XPIDLSRCS
)) $(GLOBAL_DEPS
) $(XPIDL_LINK
)
1713 $(XPIDL_LINK
) $(XPIDL_GEN_DIR
)/$(XPIDL_MODULE
).xpt
$(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.xpt
,$(XPIDLSRCS
) $(SDK_XPIDLSRCS
))
1714 endif # XPIDL_MODULE.xpt != XPIDLSRCS
1716 libs
:: $(XPIDL_GEN_DIR
)/$(XPIDL_MODULE
).xpt
1717 ifndef NO_DIST_INSTALL
1718 $(INSTALL
) $(IFLAGS1
) $(XPIDL_GEN_DIR
)/$(XPIDL_MODULE
).xpt
$(FINAL_TARGET
)/components
1723 GARBAGE_DIRS
+= $(XPIDL_GEN_DIR
)
1725 endif # XPIDLSRCS || SDK_XPIDLSRCS
1727 ifneq ($(XPIDLSRCS
),)
1728 # export .idl files to $(IDL_DIR)
1729 ifndef NO_DIST_INSTALL
1730 export:: $(XPIDLSRCS
) $(IDL_DIR
)
1731 $(INSTALL
) $(IFLAGS1
) $^
1733 export:: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.h
, $(XPIDLSRCS
)) $(PUBLIC
)
1734 $(INSTALL
) $(IFLAGS1
) $^
1735 endif # NO_DIST_INSTALL
1742 # General rules for exporting idl files.
1744 # WORK-AROUND ONLY, for mozilla/tools/module-deps/bootstrap.pl build.
1745 # Bug to fix idl dependency problems w/o this extra build pass is
1746 # http://bugzilla.mozilla.org/show_bug.cgi?id=145777
1751 export-idl
:: $(SUBMAKEFILES
) $(MAKE_DIRS
)
1753 ifneq ($(XPIDLSRCS
)$(SDK_XPIDLSRCS
),)
1754 ifndef NO_DIST_INSTALL
1755 export-idl
:: $(XPIDLSRCS
) $(SDK_XPIDLSRCS
) $(IDL_DIR
)
1756 $(INSTALL
) $(IFLAGS1
) $^
1759 +$(LOOP_OVER_PARALLEL_DIRS
)
1761 +$(LOOP_OVER_TOOL_DIRS
)
1766 ifneq ($(SDK_XPIDLSRCS
),)
1767 # export .idl files to $(IDL_DIR) & $(SDK_IDL_DIR)
1768 ifndef NO_DIST_INSTALL
1769 export:: $(SDK_XPIDLSRCS
) $(IDL_DIR
)
1770 $(INSTALL
) $(IFLAGS1
) $^
1772 export:: $(SDK_XPIDLSRCS
) $(SDK_IDL_DIR
)
1773 $(INSTALL
) $(IFLAGS1
) $^
1775 export:: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.h
, $(SDK_XPIDLSRCS
)) $(PUBLIC
)
1776 $(INSTALL
) $(IFLAGS1
) $^
1778 export:: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.h
, $(SDK_XPIDLSRCS
)) $(SDK_PUBLIC
)
1779 $(INSTALL
) $(IFLAGS1
) $^
1782 endif # SDK_XPIDLSRCS
1787 ifneq ($(XPIDLSRCS
)$(SDK_XPIDLSRCS
),)
1789 JAVA_XPIDLSRCS
= $(XPIDLSRCS
) $(SDK_XPIDLSRCS
)
1791 # A single IDL file can contain multiple interfaces, which result in multiple
1792 # Java interface files. So use hidden dependency files.
1793 JAVADEPFILES
= $(addprefix $(JAVA_GEN_DIR
)/.
,$(JAVA_XPIDLSRCS
:.idl
=.java.pp
))
1797 GARBAGE_DIRS
+= $(JAVA_GEN_DIR
)
1799 # generate .java files into _javagen/[package name dirs]
1800 _JAVA_GEN_DIR
= $(JAVA_GEN_DIR
)/$(JAVA_IFACES_PKG_NAME
)
1804 $(JAVA_GEN_DIR
)/.
%.java.pp
: %.idl
$(XPIDL_COMPILE
) $(_JAVA_GEN_DIR
)
1806 $(ELOG
) $(XPIDL_COMPILE
) -m java
-w
-I
$(srcdir) -I
$(IDL_DIR
) -o
$(_JAVA_GEN_DIR
)/$* $(_VPATH_SRCS
)
1809 # "Install" generated Java interfaces. We segregate them based on the XPI_NAME.
1810 # If XPI_NAME is not set, install into the "default" directory.
1811 ifneq ($(XPI_NAME
),)
1812 JAVA_INSTALL_DIR
= $(JAVA_DIST_DIR
)/$(XPI_NAME
)
1814 JAVA_INSTALL_DIR
= $(JAVA_DIST_DIR
)/default
1817 $(JAVA_INSTALL_DIR
):
1820 export:: $(JAVA_DIST_DIR
) $(JAVADEPFILES
) $(JAVA_INSTALL_DIR
)
1821 (cd
$(JAVA_GEN_DIR
) && tar $(TAR_CREATE_FLAGS
) - .
) |
(cd
$(JAVA_INSTALL_DIR
) && tar -xf
-)
1823 endif # XPIDLSRCS || SDK_XPIDLSRCS
1824 endif # MOZ_JAVAXPCOM
1826 ################################################################################
1827 # Copy each element of EXTRA_COMPONENTS to $(FINAL_TARGET)/components
1828 ifdef EXTRA_COMPONENTS
1829 libs
:: $(EXTRA_COMPONENTS
)
1830 ifndef NO_DIST_INSTALL
1831 $(INSTALL
) $(IFLAGS1
) $^
$(FINAL_TARGET
)/components
1836 ifdef EXTRA_PP_COMPONENTS
1837 libs
:: $(EXTRA_PP_COMPONENTS
)
1838 ifndef NO_DIST_INSTALL
1840 $(NSINSTALL
) -D
$(FINAL_TARGET
)/components
; \
1842 dest
=$(FINAL_TARGET
)/components
/`basename $$i`; \
1844 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py
$(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) $$i > $$dest; \
1850 ################################################################################
1851 # Copy each element of EXTRA_JS_MODULES to $(FINAL_TARGET)/modules
1852 ifdef EXTRA_JS_MODULES
1853 libs
:: $(EXTRA_JS_MODULES
)
1854 ifndef NO_DIST_INSTALL
1855 $(INSTALL
) $(IFLAGS1
) $^
$(FINAL_TARGET
)/modules
1860 ifdef EXTRA_PP_JS_MODULES
1861 libs
:: $(EXTRA_PP_JS_MODULES
)
1862 ifndef NO_DIST_INSTALL
1864 $(NSINSTALL
) -D
$(FINAL_TARGET
)/modules
; \
1866 dest
=$(FINAL_TARGET
)/modules
/`basename $$i`; \
1868 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py
$(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) $$i > $$dest; \
1874 ################################################################################
1877 ifneq (,$(SDK_LIBRARY
))
1881 ifndef NO_DIST_INSTALL
1882 libs
:: $(SDK_LIBRARY
) $(SDK_LIB_DIR
)
1883 $(INSTALL
) $(IFLAGS2
) $^
1888 ifneq (,$(SDK_BINARY
))
1892 ifndef NO_DIST_INSTALL
1893 libs
:: $(SDK_BINARY
) $(SDK_BIN_DIR
)
1894 $(INSTALL
) $(IFLAGS2
) $^
1899 ################################################################################
1902 JAR_MANIFEST
:= $(srcdir)/jar.mn
1906 +$(LOOP_OVER_PARALLEL_DIRS
)
1908 +$(LOOP_OVER_TOOL_DIRS
)
1910 $(FINAL_TARGET
)/chrome
:
1913 ifneq (,$(wildcard $(JAR_MANIFEST
)))
1914 ifndef NO_DIST_INSTALL
1915 libs realchrome
:: $(CHROME_DEPS
) $(FINAL_TARGET
)/chrome
1916 $(PYTHON
) $(MOZILLA_DIR
)/config
/JarMaker.py \
1917 $(QUIET
) -j
$(FINAL_TARGET
)/chrome \
1918 $(MAKE_JARS_FLAGS
) $(XULPPFLAGS
) $(DEFINES
) $(ACDEFINES
) \
1923 ifneq ($(DIST_FILES
),)
1924 libs
:: $(DIST_FILES
)
1926 for f in
$(DIST_FILES
); do \
1927 dest
=$(FINAL_TARGET
)/`basename $$f`; \
1929 $(PYTHON
) $(MOZILLA_DIR
)/config
/Preprocessor.py \
1930 $(XULAPP_DEFINES
) $(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) \
1931 $(srcdir)/$$f > $$dest; \
1935 ifneq ($(DIST_CHROME_FILES
),)
1936 libs
:: $(DIST_CHROME_FILES
)
1938 for f in
$(DIST_CHROME_FILES
); do \
1939 dest
=$(FINAL_TARGET
)/chrome
/`basename $$f`; \
1941 $(PYTHON
) $(MOZILLA_DIR
)/config
/Preprocessor.py \
1942 $(XULAPP_DEFINES
) $(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) \
1943 $(srcdir)/$$f > $$dest; \
1947 ifneq ($(XPI_PKGNAME
),)
1951 @echo
"Stripping $(XPI_PKGNAME) package directory..."
1952 @echo
$(FINAL_TARGET
)
1953 @cd
$(FINAL_TARGET
) && find .
! -type d \
1963 ! -name
"*.properties" \
1974 $(PLATFORM_EXCLUDE_LIST
) \
1975 -exec
$(STRIP
) $(STRIP_FLAGS
) {} >/dev
/null
2>&1 \
;
1978 @echo
"Packaging $(XPI_PKGNAME).xpi..."
1979 cd
$(FINAL_TARGET
) && $(ZIP
) -qr ..
/$(XPI_PKGNAME
).xpi
*
1982 ifdef INSTALL_EXTENSION_ID
1984 $(error XPI_NAME must be set for INSTALL_EXTENSION_ID
)
1988 $(RM
) -rf
"$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
1989 $(NSINSTALL
) -D
"$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
1990 cd
$(FINAL_TARGET
) && tar $(TAR_CREATE_FLAGS
) - . |
(cd
"../../bin/extensions/$(INSTALL_EXTENSION_ID)" && tar -xf
-)
1994 ifneq (,$(filter flat symlink
,$(MOZ_CHROME_FILE_FORMAT
)))
1995 _JAR_REGCHROME_DISABLE_JAR
=1
1997 _JAR_REGCHROME_DISABLE_JAR
=0
2000 REGCHROME
= $(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/add-chrome.pl \
2001 $(if
$(filter gtk2
,$(MOZ_WIDGET_TOOLKIT
)),-x
) \
2002 $(if
$(CROSS_COMPILE
),-o
$(OS_ARCH
)) $(FINAL_TARGET
)/chrome
/installed-chrome.txt \
2003 $(_JAR_REGCHROME_DISABLE_JAR
)
2005 REGCHROME_INSTALL
= $(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/add-chrome.pl \
2006 $(if
$(filter gtk2
,$(MOZ_WIDGET_TOOLKIT
)),-x
) \
2007 $(if
$(CROSS_COMPILE
),-o
$(OS_ARCH
)) $(DESTDIR
)$(mozappdir
)/chrome
/installed-chrome.txt \
2008 $(_JAR_REGCHROME_DISABLE_JAR
)
2011 #############################################################################
2013 #############################################################################
2014 ifdef COMPILER_DEPEND
2016 @echo
"$(MAKE): No need to run depend target.\
2017 Using compiler-based depend." 1>&2
2018 ifeq ($(GNU_CC
)$(GNU_CXX
),)
2020 @echo
"`echo '$(MAKE):'|sed 's/./ /g'`"\
2021 '(Compiler-based depend was turned on by "--enable-md".)' 1>&2
2024 @space
="`echo '$(MAKE): '|sed 's/./ /g'`";\
2025 echo
"$$space"'Since you are using a GNU compiler,\
2026 it is on by default.' 1>&2; \
2027 echo
"$$space"'To turn it off, pass --disable-md to configure.' 1>&2
2030 else # ! COMPILER_DEPEND
2032 ifndef MOZ_AUTO_DEPS
2034 define MAKE_DEPS_NOAUTO
2035 $(MKDEPEND
) -w1024
-o
'.$(OBJ_SUFFIX)' -f-
$(DEFINES
) $(ACDEFINES
) $(INCLUDES
) $< 2>/dev
/null | sed
-e
"s|^[^ ]*/||" > $@
2038 $(MDDEPDIR
)/%.pp
: %.c
2040 @
$(MAKE_DEPS_NOAUTO
)
2042 $(MDDEPDIR
)/%.pp
: %.
cpp
2044 @
$(MAKE_DEPS_NOAUTO
)
2046 $(MDDEPDIR
)/%.pp
: %.s
2048 @
$(MAKE_DEPS_NOAUTO
)
2050 ifneq (,$(OBJS
)$(XPIDLSRCS
)$(SDK_XPIDLSRCS
)$(SIMPLE_PROGRAMS
))
2051 depend
:: $(SUBMAKEFILES
) $(MAKE_DIRS
) $(MDDEPFILES
)
2053 depend
:: $(SUBMAKEFILES
)
2055 +$(LOOP_OVER_PARALLEL_DIRS
)
2057 +$(LOOP_OVER_TOOL_DIRS
)
2059 dependclean
:: $(SUBMAKEFILES
)
2061 +$(LOOP_OVER_PARALLEL_DIRS
)
2063 +$(LOOP_OVER_TOOL_DIRS
)
2065 endif # MOZ_AUTO_DEPS
2067 endif # COMPILER_DEPEND
2070 #############################################################################
2071 # MDDEPDIR is the subdirectory where all the dependency files are placed.
2072 # This uses a make rule (instead of a macro) to support parallel
2073 # builds (-jN). If this were done in the LOOP_OVER_DIRS macro, two
2074 # processes could simultaneously try to create the same directory.
2076 # We use $(CURDIR) in the rule's target to ensure that we don't find
2077 # a dependency directory in the source tree via VPATH (perhaps from
2078 # a previous build in the source tree) and thus neglect to create a
2079 # dependency directory in the object directory, where we really need
2082 $(CURDIR
)/$(MDDEPDIR
):
2083 @if
test ! -d
$@
; then echo Creating
$@
; rm -rf
$@
; mkdir
$@
; else true
; fi
2085 ifneq (,$(filter-out all chrome default
export realchrome tools
clean clobber clobber_all
distclean realclean,$(MAKECMDGOALS
)))
2086 ifneq (,$(OBJS
)$(XPIDLSRCS
)$(SDK_XPIDLSRCS
)$(SIMPLE_PROGRAMS
))
2087 MDDEPEND_FILES
:= $(strip $(wildcard $(MDDEPDIR
)/*.pp
))
2089 ifneq (,$(MDDEPEND_FILES
))
2091 # The script mddepend.pl checks the dependencies and writes to stdout
2092 # one rule to force out-of-date objects. For example,
2093 # foo.o boo.o: FORCE
2094 # The script has an advantage over including the *.pp files directly
2095 # because it handles the case when header files are removed from the build.
2096 # 'make' would complain that there is no way to build missing headers.
2097 ifeq (,$(MAKE_RESTARTS
))
2098 $(MDDEPDIR
)/.
all.pp
: FORCE
2099 @
$(PERL
) $(BUILD_TOOLS
)/mddepend.pl
$@
$(MDDEPEND_FILES
)
2101 -include $(MDDEPDIR
)/.
all.pp
2103 include $(MDDEPEND_FILES
)
2109 #############################################################################
2111 -include $(topsrcdir
)/$(MOZ_BUILD_APP
)/app-rules.mk
2112 -include $(MY_RULES
)
2115 # This speeds up gmake's processing if these files don't exist.
2117 $(MY_CONFIG
) $(MY_RULES
):
2121 # Generate Emacs tags in a file named TAGS if ETAGS was set in $(MY_CONFIG)
2125 ifneq ($(CSRCS
)$(CPPSRCS
)$(HEADERS
),)
2127 TAGS
:: $(CSRCS
) $(CPPSRCS
) $(HEADERS
)
2128 $(ETAGS
) $(CSRCS
) $(CPPSRCS
) $(HEADERS
)
2132 ################################################################################
2133 # Special gmake rules.
2134 ################################################################################
2138 # Disallow parallel builds with MSVC < 8
2140 ifneq (,$(filter 1200 1300 1310,$(_MSC_VER
)))
2145 # Re-define the list of default suffixes, so gmake won't have to churn through
2146 # hundreds of built-in suffix rules for stuff we don't need.
2151 # Fake targets. Always run these rules, even if a file/directory with that
2152 # name already exists.
2154 .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 check-interactive check-one
2156 # Used as a dependency to force targets to rebuild
2159 # Delete target if error occurs when building target
2162 # Properly set LIBPATTERNS for the platform
2163 .LIBPATTERNS
= $(if
$(IMPORT_LIB_SUFFIX
),$(LIB_PREFIX
)%.
$(IMPORT_LIB_SUFFIX
)) $(LIB_PREFIX
)%.
$(LIB_SUFFIX
) $(DLL_PREFIX
)%$(DLL_SUFFIX
)
2167 TAGS
: $(SUBMAKEFILES
) $(CSRCS
) $(CPPSRCS
) $(wildcard *.h
)
2168 -etags
$(CSRCS
) $(CPPSRCS
) $(wildcard *.h
)
2169 +$(LOOP_OVER_PARALLEL_DIRS
)
2187 echo-requires-recursive
::
2188 ifdef _REPORT_ALL_DIRS
2189 @echo
$(subst $(topsrcdir
)/,,$(srcdir)): $(MODULE
): $(REQUIRES
)
2191 @
$(if
$(REQUIRES
),echo
$(subst $(topsrcdir
)/,,$(srcdir)): $(MODULE
): $(REQUIRES
))
2193 +$(LOOP_OVER_PARALLEL_DIRS
)
2197 @
$(topsrcdir
)/build
/unix
/print-depth-path.sh
2200 @
$(topsrcdir
)/build
/package
/rpm
/print-module-name.sh
2202 echo-module-filelist
:
2203 @
$(topsrcdir
)/build
/package
/rpm
/print-module-filelist.sh
2206 ifneq (,$(filter $(PROGRAM
) $(HOST_PROGRAM
) $(SIMPLE_PROGRAMS
) $(HOST_LIBRARY
) $(LIBRARY
) $(SHARED_LIBRARY
),$(TARGETS
)))
2207 @echo
--------------------------------------------------------------------------------
2208 @echo
"PROGRAM = $(PROGRAM)"
2209 @echo
"SIMPLE_PROGRAMS = $(SIMPLE_PROGRAMS)"
2210 @echo
"LIBRARY = $(LIBRARY)"
2211 @echo
"SHARED_LIBRARY = $(SHARED_LIBRARY)"
2212 @echo
"SHARED_LIBRARY_LIBS = $(SHARED_LIBRARY_LIBS)"
2213 @echo
"LIBS = $(LIBS)"
2214 @echo
"DEF_FILE = $(DEF_FILE)"
2215 @echo
"IMPORT_LIBRARY = $(IMPORT_LIBRARY)"
2216 @echo
"STATIC_LIBS = $(STATIC_LIBS)"
2217 @echo
"SHARED_LIBS = $(SHARED_LIBS)"
2218 @echo
"EXTRA_DSO_LIBS = $(EXTRA_DSO_LIBS)"
2219 @echo
"EXTRA_DSO_LDOPTS = $(EXTRA_DSO_LDOPTS)"
2220 @echo
"DEPENDENT_LIBS = $(DEPENDENT_LIBS)"
2221 @echo
--------------------------------------------------------------------------------
2223 +$(LOOP_OVER_PARALLEL_DIRS
)
2227 @echo
"MOZ_BUILD_ROOT = $(MOZ_BUILD_ROOT)"
2228 @echo
"MOZ_WIDGET_TOOLKIT = $(MOZ_WIDGET_TOOLKIT)"
2230 @echo
"CXX = $(CXX)"
2231 @echo
"CCC = $(CCC)"
2232 @echo
"CPP = $(CPP)"
2235 @echo
"IMPLIB = $(IMPLIB)"
2236 @echo
"FILTER = $(FILTER)"
2237 @echo
"MKSHLIB = $(MKSHLIB)"
2238 @echo
"MKCSHLIB = $(MKCSHLIB)"
2240 @echo
"CFLAGS = $(CFLAGS)"
2241 @echo
"OS_CFLAGS = $(OS_CFLAGS)"
2242 @echo
"COMPILE_CFLAGS = $(COMPILE_CFLAGS)"
2243 @echo
"CXXFLAGS = $(CXXFLAGS)"
2244 @echo
"OS_CXXFLAGS = $(OS_CXXFLAGS)"
2245 @echo
"COMPILE_CXXFLAGS = $(COMPILE_CXXFLAGS)"
2246 @echo
"COMPILE_CMFLAGS = $(COMPILE_CMFLAGS)"
2247 @echo
"COMPILE_CMMFLAGS = $(COMPILE_CMMFLAGS)"
2248 @echo
"LDFLAGS = $(LDFLAGS)"
2249 @echo
"OS_LDFLAGS = $(OS_LDFLAGS)"
2250 @echo
"DSO_LDOPTS = $(DSO_LDOPTS)"
2251 @echo
"OS_INCLUDES = $(OS_INCLUDES)"
2252 @echo
"OS_LIBS = $(OS_LIBS)"
2253 @echo
"EXTRA_LIBS = $(EXTRA_LIBS)"
2254 @echo
"BIN_FLAGS = $(BIN_FLAGS)"
2255 @echo
"INCLUDES = $(INCLUDES)"
2256 @echo
"DEFINES = $(DEFINES)"
2257 @echo
"ACDEFINES = $(ACDEFINES)"
2258 @echo
"BIN_SUFFIX = $(BIN_SUFFIX)"
2259 @echo
"LIB_SUFFIX = $(LIB_SUFFIX)"
2260 @echo
"DLL_SUFFIX = $(DLL_SUFFIX)"
2261 @echo
"IMPORT_LIB_SUFFIX = $(IMPORT_LIB_SUFFIX)"
2262 @echo
"INSTALL = $(INSTALL)"
2265 @echo
"HOST_CC = $(HOST_CC)"
2266 @echo
"HOST_CXX = $(HOST_CXX)"
2267 @echo
"HOST_CFLAGS = $(HOST_CFLAGS)"
2268 @echo
"HOST_LDFLAGS = $(HOST_LDFLAGS)"
2269 @echo
"HOST_LIBS = $(HOST_LIBS)"
2270 @echo
"HOST_EXTRA_LIBS = $(HOST_EXTRA_LIBS)"
2271 @echo
"HOST_EXTRA_DEPS = $(HOST_EXTRA_DEPS)"
2272 @echo
"HOST_PROGRAM = $(HOST_PROGRAM)"
2273 @echo
"HOST_OBJS = $(HOST_OBJS)"
2274 @echo
"HOST_PROGOBJS = $(HOST_PROGOBJS)"
2275 @echo
"HOST_LIBRARY = $(HOST_LIBRARY)"
2278 @echo
"Build Modules = $(BUILD_MODULES)"
2279 @echo
"Module dirs = $(BUILD_MODULE_DIRS)"
2282 ifneq (,$(filter $(PROGRAM
) $(SIMPLE_PROGRAMS
) $(LIBRARY
) $(SHARED_LIBRARY
),$(TARGETS
)))
2283 zip
$(DEPTH
)/makefiles
$(subst $(topsrcdir
),$(MOZ_SRC
)/mozilla
,$(srcdir)/Makefile.in
)
2285 +$(LOOP_OVER_PARALLEL_DIRS
)
2290 $(DOXYGEN
) $(DEPTH
)/config
/doxygen.cfg
2292 check:: $(SUBMAKEFILES
) $(MAKE_DIRS
)
2293 +$(LOOP_OVER_PARALLEL_DIRS
)
2295 +$(LOOP_OVER_TOOL_DIRS
)