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 # Don't copy xulrunner files at install time, when using system xulrunner
70 # ELOG prints out failed command when building silently (gmake -s).
71 ifneq (,$(findstring -s
,$(MAKEFLAGS
)))
72 ELOG
:= $(EXEC
) sh
$(BUILD_TOOLS
)/print-failed-commands.sh
77 ifeq (,$(filter-out WINNT WINCE
,$(OS_ARCH
)))
79 _LIBNAME_RELATIVE_PATHS
=1
83 ifeq (,$(filter-out WINNT WINCE
,$(OS_ARCH
)))
85 _VPATH_SRCS
= $(if
$(filter /%,$<),$<,$(PWD
)/$<)
90 # Add $(DIST)/lib to VPATH so that -lfoo dependencies are followed
93 VPATH
+= $(LIBXUL_SDK
)/lib
96 # EXPAND_LIBNAME - $(call EXPAND_LIBNAME,foo)
97 # expands to foo.lib on platforms with import libs and -lfoo otherwise
99 # EXPAND_LIBNAME_PATH - $(call EXPAND_LIBNAME_PATH,foo,dir)
100 # expands to dir/foo.lib on platforms with import libs and
101 # -Ldir -lfoo otherwise
103 # EXPAND_MOZLIBNAME - $(call EXPAND_MOZLIBNAME,foo)
104 # expands to $(DIST)/lib/foo.lib on platforms with import libs and
107 ifdef _LIBNAME_RELATIVE_PATHS
108 EXPAND_LIBNAME
= $(foreach lib
,$(1),$(LIB_PREFIX
)$(lib
).
$(LIB_SUFFIX
))
109 EXPAND_LIBNAME_PATH
= $(foreach lib
,$(1),$(2)/$(LIB_PREFIX
)$(lib
).
$(LIB_SUFFIX
))
110 EXPAND_MOZLIBNAME
= $(foreach lib
,$(1),$(DIST
)/lib
/$(LIB_PREFIX
)$(lib
).
$(LIB_SUFFIX
))
112 EXPAND_LIBNAME
= $(addprefix -l
,$(1))
113 EXPAND_LIBNAME_PATH
= -L
$(2) $(addprefix -l
,$(1))
114 EXPAND_MOZLIBNAME
= $(addprefix -l
,$(1))
118 EXTRA_DSO_LIBS
:= $(call EXPAND_MOZLIBNAME
,$(EXTRA_DSO_LIBS
))
121 ################################################################################
122 # Testing frameworks support
123 ################################################################################
129 $(error Must
define MODULE when defining XPCSHELL_TESTS.
)
132 # Test file installation
135 for testdir in
$(XPCSHELL_TESTS
); do \
137 $(srcdir)/$$testdir/*.js \
138 $(DEPTH
)/_tests
/xpcshell-simple
/$(MODULE
)/$$testdir; \
141 # Path formats on Windows are hard. We require a topsrcdir formatted so that
142 # it may be passed to nsILocalFile.initWithPath (in other words, an absolute
143 # path of the form X:\path\to\topsrcdir), which we store in NATIVE_TOPSRCDIR.
144 # We require a forward-slashed path to topsrcdir so that it may be combined
145 # with a relative forward-slashed path for loading scripts, both dynamically
146 # and statically for head/test/tail JS files. Of course, on non-Windows none
147 # of this matters, and things will work correctly because everything's
148 # forward-slashed, everywhere, always.
150 NATIVE_TOPSRCDIR
:= `cygpath -wa $(topsrcdir)`
151 FWDSLASH_TOPSRCDIR
:= `cygpath -ma $(topsrcdir)`
153 FWDSLASH_TOPSRCDIR
:= $(topsrcdir
)
154 ifeq ($(HOST_OS_ARCH
),WINNT
)
155 NATIVE_TOPSRCDIR
:= $(subst /,\\,$(WIN_TOP_SRC
))
157 NATIVE_TOPSRCDIR
:= $(topsrcdir
)
159 endif # CYGWIN_WRAPPER
161 testxpcdir
= $(topsrcdir
)/testing
/xpcshell
166 for testdir in
$(XPCSHELL_TESTS
); do \
167 $(RUN_TEST_PROGRAM
) \
168 $(testxpcdir
)/test_all.sh \
169 $(DIST
)/bin
/xpcshell \
170 $(FWDSLASH_TOPSRCDIR
) \
171 $(NATIVE_TOPSRCDIR
) \
172 $(DEPTH
)/_tests
/xpcshell-simple
/$(MODULE
)/$$testdir; \
178 $(RUN_TEST_PROGRAM
) \
179 $(testxpcdir
)/test_one.sh \
180 $(DIST
)/bin
/xpcshell \
181 $(FWDSLASH_TOPSRCDIR
) \
182 $(NATIVE_TOPSRCDIR
) \
183 $(DEPTH
)/_tests
/xpcshell-simple
/$(MODULE
)/$$testdir \
189 $(RUN_TEST_PROGRAM
) \
190 $(testxpcdir
)/test_one.sh \
191 $(DIST
)/bin
/xpcshell \
192 $(FWDSLASH_TOPSRCDIR
) \
193 $(NATIVE_TOPSRCDIR
) \
194 $(DEPTH
)/_tests
/xpcshell-simple
/$(MODULE
)/$$testdir \
197 endif # XPCSHELL_TESTS
201 # Compile the tests to $(DIST)/bin. Make lots of niceties available by default
202 # through TestHarness.h, by modifying the list of includes and the libs against
204 CPPSRCS
+= $(CPP_UNIT_TESTS
)
205 SIMPLE_PROGRAMS
+= $(CPP_UNIT_TESTS
:.
cpp=$(BIN_SUFFIX
))
206 REQUIRES
+= testing xpcom
207 LIBS
+= $(XPCOM_GLUE_LDOPTS
) $(NSPR_LIBS
)
209 # ...and run them the usual way
212 for f in
$(subst .
cpp,,$(CPP_UNIT_TESTS
)); do \
213 XPCOM_DEBUG_BREAK
=stack-and-abort
$(RUN_TEST_PROGRAM
) $(DIST
)/bin
/$$f; \
216 endif # CPP_UNIT_TESTS
224 # If BUILD_STATIC_LIBS or FORCE_STATIC_LIB is set, build a static library.
225 # Otherwise, build a shared library.
229 ifdef STATIC_LIBRARY_NAME
230 ifneq (,$(filter OS2 WINNT WINCE
,$(OS_ARCH
)))
232 STATIC_LIBRARY_NAME
:= $(SHORT_LIBNAME
)
233 SHARED_LIBRARY_NAME
:= $(SHORT_LIBNAME
)
236 LIBRARY
:= $(LIB_PREFIX
)$(STATIC_LIBRARY_NAME
).
$(LIB_SUFFIX
)
237 endif # STATIC_LIBRARY_NAME
241 ifdef HOST_LIBRARY_NAME
242 HOST_LIBRARY
:= $(LIB_PREFIX
)$(HOST_LIBRARY_NAME
).
$(LIB_SUFFIX
)
247 ifneq (_1
,$(FORCE_SHARED_LIB
)_
$(BUILD_STATIC_LIBS
))
251 MKSHLIB
= $(MKCSHLIB
)
255 SHARED_LIBRARY
:= $(SHARED_LIBRARY_NAME
)
257 SHARED_LIBRARY
:= $(DLL_PREFIX
)$(SHARED_LIBRARY_NAME
)$(DLL_SUFFIX
)
260 ifeq ($(OS_ARCH
),OS2
)
261 DEF_FILE
:= $(SHARED_LIBRARY
:.dll
=.def
)
264 ifneq (,$(filter OS2 WINNT WINCE
,$(OS_ARCH
)))
265 IMPORT_LIBRARY
:= $(LIB_PREFIX
)$(SHARED_LIBRARY_NAME
).
$(IMPORT_LIB_SUFFIX
)
268 ifdef MOZ_ENABLE_LIBXUL
273 endif # FORCE_SHARED_LIB && !BUILD_STATIC_LIBS
276 ifeq (,$(BUILD_STATIC_LIBS
)$(FORCE_STATIC_LIB
))
280 ifeq (_1
,$(FORCE_SHARED_LIB
)_
$(BUILD_STATIC_LIBS
))
281 SHARED_LIBRARY
:= $(NULL
)
283 IMPORT_LIBRARY
:= $(NULL
)
286 ifdef FORCE_STATIC_LIB
287 ifndef FORCE_SHARED_LIB
288 SHARED_LIBRARY
:= $(NULL
)
290 IMPORT_LIBRARY
:= $(NULL
)
294 ifdef FORCE_SHARED_LIB
295 ifndef FORCE_STATIC_LIB
300 ifdef JAVA_LIBRARY_NAME
301 JAVA_LIBRARY
:= $(JAVA_LIBRARY_NAME
).jar
304 ifeq (,$(filter-out WINNT WINCE
,$(OS_ARCH
)))
308 # Unless we're building SIMPLE_PROGRAMS, all C++ files share a PDB file per
309 # directory. For parallel builds, this PDB file is shared and locked by
310 # MSPDBSRV.EXE, starting with MSVC8 SP1. If you're using MSVC 7.1 or MSVC8
311 # without SP1, don't do parallel builds.
313 # The final PDB for libraries and programs is created by the linker and uses
314 # a different name from the single PDB file created by the compiler. See
318 ifdef SIMPLE_PROGRAMS
319 COMPILE_PDBFILE
= $(basename $(@F
)).pdb
321 COMPILE_PDBFILE
= generated.pdb
324 LINK_PDBFILE
= $(basename $(@F
)).pdb
326 CODFILE
=$(basename $(@F
)).cod
330 ifdef SHARED_LIBRARY_NAME
331 MAPFILE
=$(SHARED_LIBRARY_NAME
).map
333 MAPFILE
=$(basename $(@F
)).map
334 endif # SHARED_LIBRARY_NAME
338 OS_LDFLAGS
+= -DEF
:$(DEFFILE
)
339 EXTRA_DEPS
+= $(DEFFILE
)
343 OS_LDFLAGS
+= -MAP
:$(MAPFILE
)
348 ifdef ENABLE_CXX_EXCEPTIONS
350 CXXFLAGS
+= -fexceptions
352 ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER
)))
358 endif # ENABLE_CXX_EXCEPTIONS
361 ifeq (,$(filter-out WINNT WINCE
,$(HOST_OS_ARCH
)))
362 HOST_PDBFILE
=$(basename $(@F
)).pdb
366 TARGETS
= $(LIBRARY
) $(SHARED_LIBRARY
) $(PROGRAM
) $(SIMPLE_PROGRAMS
) $(HOST_LIBRARY
) $(HOST_PROGRAM
) $(HOST_SIMPLE_PROGRAMS
) $(JAVA_LIBRARY
)
372 $(addsuffix .
$(OBJ_SUFFIX
), $(JMC_GEN
)) \
373 $(CSRCS
:.c
=.
$(OBJ_SUFFIX
)) \
374 $(patsubst %.
cc,%.
$(OBJ_SUFFIX
),$(CPPSRCS
:.
cpp=.
$(OBJ_SUFFIX
))) \
375 $(CMSRCS
:.m
=.
$(OBJ_SUFFIX
)) \
376 $(CMMSRCS
:.mm
=.
$(OBJ_SUFFIX
)) \
377 $(ASFILES
:.
$(ASM_SUFFIX
)=.
$(OBJ_SUFFIX
))
378 OBJS
= $(strip $(_OBJS
))
383 $(addprefix host_
,$(HOST_CSRCS
:.c
=.
$(OBJ_SUFFIX
))) \
384 $(addprefix host_
,$(patsubst %.
cc,%.
$(OBJ_SUFFIX
),$(HOST_CPPSRCS
:.
cpp=.
$(OBJ_SUFFIX
)))) \
385 $(addprefix host_
,$(HOST_CMSRCS
:.m
=.
$(OBJ_SUFFIX
))) \
386 $(addprefix host_
,$(HOST_CMMSRCS
:.mm
=.
$(OBJ_SUFFIX
)))
387 HOST_OBJS
= $(strip $(_HOST_OBJS
))
390 LIBOBJS
:= $(addprefix \", $(OBJS
))
391 LIBOBJS
:= $(addsuffix \", $(LIBOBJS
))
394 ifneq (,$(OBJS
)$(XPIDLSRCS
)$(SDK_XPIDLSRCS
)$(SIMPLE_PROGRAMS
))
395 MDDEPFILES
= $(addprefix $(MDDEPDIR
)/,$(OBJS
:.
$(OBJ_SUFFIX
)=.pp
))
397 MDDEPFILES
+= $(addprefix $(MDDEPDIR
)/,$(XPIDLSRCS
:.idl
=.xpt
)) \
398 $(addprefix $(MDDEPDIR
)/,$(SDK_XPIDLSRCS
:.idl
=.xpt
))
404 $(GARBAGE
) $(TARGETS
) $(OBJS
) $(PROGOBJS
) LOGS TAGS a.out \
405 $(filter-out $(ASFILES
),$(OBJS
:.
$(OBJ_SUFFIX
)=.s
)) $(OBJS
:.
$(OBJ_SUFFIX
)=.ii
) \
406 $(OBJS
:.
$(OBJ_SUFFIX
)=.i
) \
407 $(HOST_PROGOBJS
) $(HOST_OBJS
) $(IMPORT_LIBRARY
) $(DEF_FILE
)\
408 $(EXE_DEF_FILE
) so_locations _gen _stubs
$(wildcard *.res
) $(wildcard *.RES
) \
409 $(wildcard *.pdb
) $(CODFILE
) $(MAPFILE
) $(IMPORT_LIBRARY
) \
410 $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=.exp
) $(wildcard *.ilk
) \
411 $(PROGRAM
:$(BIN_SUFFIX
)=.exp
) $(SIMPLE_PROGRAMS
:$(BIN_SUFFIX
)=.exp
) \
412 $(PROGRAM
:$(BIN_SUFFIX
)=.lib
) $(SIMPLE_PROGRAMS
:$(BIN_SUFFIX
)=.lib
) \
413 $(SIMPLE_PROGRAMS
:$(BIN_SUFFIX
)=.
$(OBJ_SUFFIX
)) \
414 $(wildcard gts_tmp_
*) $(LIBRARY
:%.a
=.
%.timestamp
)
416 $(GARBAGE_DIRS
) /no-such-file
419 GARBAGE
+= $(MOCSRCS
)
422 ifdef SIMPLE_PROGRAMS
423 GARBAGE
+= $(SIMPLE_PROGRAMS
:%=%.
$(OBJ_SUFFIX
))
426 ifdef HOST_SIMPLE_PROGRAMS
427 GARBAGE
+= $(HOST_SIMPLE_PROGRAMS
:%=%.
$(OBJ_SUFFIX
))
431 # the Solaris WorkShop template repository cache. it occasionally can get
432 # out of sync, so targets like clobber should kill it.
434 ifeq ($(SOLARIS_SUNPRO_CXX
),1)
435 GARBAGE_DIRS
+= SunWS_cache
438 ifeq ($(OS_ARCH
),OpenVMS
)
439 GARBAGE
+= $(wildcard *.
*_defines
)
441 VMS_SYMVEC_FILE
= $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=_symvec.opt
)
443 VMS_SYMVEC_FILE_MODULE
= $(topsrcdir
)/build
/unix
/vms
/$(notdir $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=_dbg_symvec.opt
))
445 VMS_SYMVEC_FILE_MODULE
= $(topsrcdir
)/build
/unix
/vms
/$(notdir $(SHARED_LIBRARY
:$(DLL_SUFFIX
)=_symvec.opt
))
447 VMS_SYMVEC_FILE_COMP
= $(topsrcdir
)/build
/unix
/vms
/component_symvec.opt
448 GARBAGE
+= $(VMS_SYMVEC_FILE
)
450 DSO_LDOPTS
:= $(filter-out -auto_symvec
,$(DSO_LDOPTS
)) $(VMS_SYMVEC_FILE
)
455 XPIDL_GEN_DIR
= _xpidlgen
457 ifdef MOZ_UPDATE_XTERM
458 # Its good not to have a newline at the end of the titlebar string because it
459 # makes the make -s output easier to read. Echo -n does not work on all
460 # platforms, but we can trick sed into doing it.
461 UPDATE_TITLE
= sed
-e
"s!Y!$@ in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(dir)!" $(MOZILLA_DIR
)/config
/xterm.str
;
462 UPDATE_TITLE_export
= sed
-e
"s!Y!export in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR
)/config
/xterm.str
;
463 UPDATE_TITLE_libs
= sed
-e
"s!Y!libs in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR
)/config
/xterm.str
;
464 UPDATE_TITLE_tools
= sed
-e
"s!Y!tools in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$*!" $(MOZILLA_DIR
)/config
/xterm.str
;
467 ifneq (,$(strip $(DIRS
)))
470 $(foreach dir,$(DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) $@
; )
473 # we only use this for the makefiles target and other stuff that doesn't matter
474 ifneq (,$(strip $(PARALLEL_DIRS
)))
475 LOOP_OVER_PARALLEL_DIRS
= \
477 $(foreach dir,$(PARALLEL_DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) $@
; )
480 ifneq (,$(strip $(STATIC_DIRS
)))
481 LOOP_OVER_STATIC_DIRS
= \
483 $(foreach dir,$(STATIC_DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) $@
; )
486 ifneq (,$(strip $(TOOL_DIRS
)))
487 LOOP_OVER_TOOL_DIRS
= \
489 $(foreach dir,$(TOOL_DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) $@
; )
493 # create a bunch of fake targets for order-only processing
494 PARALLEL_DIRS_export
= $(addsuffix _export
,$(PARALLEL_DIRS
))
495 PARALLEL_DIRS_libs
= $(addsuffix _libs
,$(PARALLEL_DIRS
))
496 PARALLEL_DIRS_tools
= $(addsuffix _tools
,$(PARALLEL_DIRS
))
498 .PHONY
: $(PARALLEL_DIRS_export
) $(PARALLEL_DIRS_libs
) $(PARALLEL_DIRS_tools
)
502 # Now we can differentiate between objects used to build a library, and
503 # objects used to build an executable in the same directory.
510 HOST_PROGOBJS
= $(HOST_OBJS
)
513 # MAKE_DIRS: List of directories to build while looping over directories.
514 # A Makefile that needs $(MDDEPDIR) created but doesn't set any of these
515 # variables we know to check can just set NEED_MDDEPDIR explicitly.
516 ifneq (,$(OBJS
)$(XPIDLSRCS
)$(SDK_XPIDLSRCS
)$(SIMPLE_PROGRAMS
)$(NEED_MDDEPDIR
))
517 MAKE_DIRS
+= $(CURDIR
)/$(MDDEPDIR
)
518 GARBAGE_DIRS
+= $(MDDEPDIR
)
522 # Tags: emacs (etags), vi (ctags)
523 # TAG_PROGRAM := ctags -L -
525 TAG_PROGRAM
= xargs etags
-a
528 # Turn on C++ linking if we have any .cpp or .mm files
529 # (moved this from config.mk so that config.mk can be included
530 # before the CPPSRCS are defined)
532 ifneq ($(CPPSRCS
)$(CMMSRCS
),)
537 # Make sure to wrap static libs inside linker specific flags to turn on & off
538 # inclusion of all symbols inside the static libs
540 ifndef NO_LD_ARCHIVE_FLAGS
541 ifdef SHARED_LIBRARY_LIBS
542 EXTRA_DSO_LDOPTS
:= $(MKSHLIB_FORCE_ALL
) $(SHARED_LIBRARY_LIBS
) $(MKSHLIB_UNFORCE_ALL
) $(EXTRA_DSO_LDOPTS
)
547 # This will strip out symbols that the component should not be
548 # exporting from the .dynsym section.
551 EXTRA_DSO_LDOPTS
+= $(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS
)
555 # Enforce the requirement that MODULE_NAME must be set
556 # for components in static builds
560 ifndef FORCE_SHARED_LIB
562 $(error MODULE_NAME is required for components which may be used in static builds
)
569 # MacOS X specific stuff
572 ifeq ($(OS_ARCH
),Darwin
)
575 EXTRA_DSO_LDOPTS
+= -bundle
577 EXTRA_DSO_LDOPTS
+= -dynamiclib
-install_name @executable_path
/$(SHARED_LIBRARY
) -compatibility_version
1 -current_version
1 -single_module
583 # On NetBSD a.out systems, use -Bsymbolic. This fixes what would otherwise be
584 # fatal symbol name clashes between components.
586 ifeq ($(OS_ARCH
),NetBSD
)
587 ifeq ($(DLL_SUFFIX
),.so
.1.0)
589 EXTRA_DSO_LDOPTS
+= -Wl
,-Bsymbolic
594 ifeq ($(OS_ARCH
),FreeBSD
)
596 EXTRA_DSO_LDOPTS
+= -Wl
,-Bsymbolic
600 ifeq ($(OS_ARCH
),NetBSD
)
601 ifneq (,$(filter arc cobalt hpcmips mipsco newsmips pmax sgimips
,$(OS_TEST
)))
602 ifeq ($(MODULE
),layout
)
603 OS_CFLAGS
+= -Wa
,-xgot
604 OS_CXXFLAGS
+= -Wa
,-xgot
609 ifeq ($(OS_ARCH
),Linux
)
610 ifneq (,$(filter mips mipsel
,$(OS_TEST
)))
611 ifeq ($(MODULE
),layout
)
612 OS_CFLAGS
+= -Wa
,-xgot
613 OS_CXXFLAGS
+= -Wa
,-xgot
619 # HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag
620 # which uses internal symbols first
622 ifeq ($(OS_ARCH
),HP-UX
)
624 ifeq ($(GNU_CC
)$(GNU_CXX
),)
625 EXTRA_DSO_LDOPTS
+= -Wl
,-Bsymbolic
626 ifneq ($(HAS_EXTRAEXPORTS
),1)
627 MKSHLIB
+= -Wl
,+eNSGetModule
-Wl
,+eerrno
628 MKCSHLIB
+= +eNSGetModule
+eerrno
629 ifneq ($(OS_TEST
),ia64
)
630 MKSHLIB
+= -Wl
,+e_shlInit
631 MKCSHLIB
+= +e_shlInit
633 endif # !HAS_EXTRAEXPORTS
634 endif # non-gnu compilers
638 ifeq ($(OS_ARCH
),AIX
)
640 ifneq ($(HAS_EXTRAEXPORTS
),1)
641 MKSHLIB
+= -bE
:$(MOZILLA_DIR
)/build
/unix
/aix.exp
-bnoexpall
642 MKCSHLIB
+= -bE
:$(MOZILLA_DIR
)/build
/unix
/aix.exp
-bnoexpall
643 endif # HAS_EXTRAEXPORTS
648 # OSF1: add -B symbolic flag for components
650 ifeq ($(OS_ARCH
),OSF1
)
652 ifeq ($(GNU_CC
)$(GNU_CXX
),)
653 EXTRA_DSO_LDOPTS
+= -B symbolic
659 # Linux: add -Bsymbolic flag for components
661 ifeq ($(OS_ARCH
),Linux
)
663 EXTRA_DSO_LDOPTS
+= -Wl
,-Bsymbolic
670 ifeq ($(OS_ARCH
),WINNT
)
673 DSO_LDOPTS
+= -Wl
,--out-implib
-Wl
,$(IMPORT_LIBRARY
)
686 ifeq (_WINNT
,$(GNU_CC
)_
$(OS_ARCH
))
690 endif # WINNT && !GNU_CC
691 ifneq (,$(filter WINCE
,$(OS_ARCH
)))
695 ifeq ($(OS_TARGET
), WINCE
)
697 HOST_OUTOPTION
= -Fo
# eol
700 ifeq (,$(CROSS_COMPILE
))
701 HOST_OUTOPTION
= $(OUTOPTION
)
703 HOST_OUTOPTION
= -o
# eol
707 ################################################################################
709 # SUBMAKEFILES: List of Makefiles for next level down.
710 # This is used to update or create the Makefiles before invoking them.
711 SUBMAKEFILES
+= $(addsuffix /Makefile
, $(DIRS
) $(TOOL_DIRS
) $(PARALLEL_DIRS
))
713 # The root makefile doesn't want to do a plain export/libs, because
714 # of the tiers and because of libxul. Suppress the default rules in favor
715 # of something else. Makefiles which use this var *must* provide a sensible
716 # default rule before including rules.mk
717 ifndef SUPPRESS_DEFAULT_RULES
721 $(foreach tier
,$(TIERS
),$(MAKE
) tier_
$(tier
); ) true
726 ifneq (,$(strip $(STATIC_DIRS
)))
727 $(foreach dir,$(STATIC_DIRS
),$(MAKE
) -C
$(dir); )
741 endif # SUPPRESS_DEFAULT_RULES
743 ifeq ($(filter s
,$(MAKEFLAGS
)),)
751 MAKE_TIER_SUBMAKEFILES
= +$(if
$(tier_
$*_dirs
),$(MAKE
) $(addsuffix /Makefile
,$(tier_
$*_dirs
)))
755 @
$(MAKE_TIER_SUBMAKEFILES
)
757 $(foreach dir,$(tier_
$*_dirs
),$(MAKE
) -C
$(dir) export; ) true
761 @
$(MAKE_TIER_SUBMAKEFILES
)
763 $(foreach dir,$(tier_
$*_dirs
),$(MAKE
) -C
$(dir) libs
; ) true
767 @
$(MAKE_TIER_SUBMAKEFILES
)
769 $(foreach dir,$(tier_
$*_dirs
),$(MAKE
) -C
$(dir) tools
; ) true
771 $(foreach tier
,$(TIERS
),tier_
$(tier
))::
772 @
$(ECHO
) "$@: $($@_staticdirs) $($@_dirs)"
774 $(foreach dir,$($@_staticdirs
),$(MAKE
) -C
$(dir); ) true
778 # Do everything from scratch
783 # Add dummy depend target for tinderboxes
787 all_platforms
:: $(NFSPWD
)
789 if
test ! -d LOGS
; then
rm -rf LOGS
; mkdir LOGS
; else true
; fi
; \
790 for h in
$(PLATFORM_HOSTS
); do \
791 echo
"On $$h: $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log";\
792 rsh
$$h -n
"(chdir $$d; \
793 $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log; \
794 echo DONE) &" 2>&1 > LOGS
/$$h.pid
& \
799 cd
$(@D
); $(MAKE
) $(@F
)
802 # Target to only regenerate makefiles
803 makefiles
: $(SUBMAKEFILES
)
804 ifneq (,$(DIRS
)$(TOOL_DIRS
)$(PARALLEL_DIRS
))
805 +$(LOOP_OVER_PARALLEL_DIRS
)
807 +$(LOOP_OVER_TOOL_DIRS
)
811 export:: $(PARALLEL_DIRS_export
)
813 $(PARALLEL_DIRS_export
): %_export
: %/Makefile
814 +@
$(UPDATE_TITLE_export
) $(MAKE
) -C
$* export
817 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
))
819 +$(LOOP_OVER_TOOL_DIRS
)
822 tools
:: $(PARALLEL_DIRS_tools
)
824 $(PARALLEL_DIRS_tools
): %_tools
: %/Makefile
825 +@
$(UPDATE_TITLE_tools
) $(MAKE
) -C
$* tools
828 tools
:: $(SUBMAKEFILES
) $(MAKE_DIRS
)
830 ifneq (,$(strip $(TOOL_DIRS
)))
832 $(foreach dir,$(TOOL_DIRS
),$(UPDATE_TITLE
) $(MAKE
) -C
$(dir) libs
; )
836 # Rule to create list of libraries for final link
842 ifdef BUILD_STATIC_LIBS
843 @
$(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/build-list.pl
$(FINAL_LINK_COMPS
) $(STATIC_LIBRARY_NAME
)
845 @
$(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/build-list.pl
$(FINAL_LINK_COMP_NAMES
) $(MODULE_NAME
)
847 endif # BUILD_STATIC_LIBS
849 $(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/build-list.pl
$(FINAL_LINK_LIBS
) $(STATIC_LIBRARY_NAME
)
851 endif # EXPORT_LIBRARY
854 # Create dependencies on static (and shared EXTRA_DSO_LIBS) libraries
855 LIBS_DEPS
= $(filter %.
$(LIB_SUFFIX
), $(LIBS
))
856 HOST_LIBS_DEPS
= $(filter %.
$(LIB_SUFFIX
), $(HOST_LIBS
))
857 DSO_LDOPTS_DEPS
= $(EXTRA_DSO_LIBS
) $(filter %.
$(LIB_SUFFIX
), $(EXTRA_DSO_LDOPTS
))
859 # Dependancies which, if modified, should cause everything to rebuild
860 GLOBAL_DEPS
+= Makefile Makefile.in
$(DEPTH
)/config
/autoconf.mk
$(DEPTH
)/config
/config.mk
862 ##############################################
864 libs
:: $(PARALLEL_DIRS_libs
)
866 $(PARALLEL_DIRS_libs
): %_libs
: %/Makefile
867 +@
$(UPDATE_TITLE_libs
) $(MAKE
) -C
$* libs
870 libs
:: $(SUBMAKEFILES
) $(MAKE_DIRS
) $(HOST_LIBRARY
) $(LIBRARY
) $(SHARED_LIBRARY
) $(IMPORT_LIBRARY
) $(HOST_PROGRAM
) $(PROGRAM
) $(HOST_SIMPLE_PROGRAMS
) $(SIMPLE_PROGRAMS
) $(JAVA_LIBRARY
)
871 ifndef NO_DIST_INSTALL
873 ifdef EXPORT_LIBRARY
# Stage libs that will be linked into a static build
875 $(INSTALL
) $(IFLAGS1
) $(LIBRARY
) $(DEPTH
)/staticlib
/components
877 $(INSTALL
) $(IFLAGS1
) $(LIBRARY
) $(DEPTH
)/staticlib
879 endif # EXPORT_LIBRARY
882 $(error Shipping static component libs makes no sense.
)
884 $(INSTALL
) $(IFLAGS1
) $(LIBRARY
) $(DIST
)/lib
890 $(INSTALL
) $(IFLAGS2
) $(SHARED_LIBRARY
) $(FINAL_TARGET
)/components
891 $(ELF_DYNSTR_GC
) $(FINAL_TARGET
)/components
/$(SHARED_LIBRARY
)
892 ifdef BEOS_ADDON_WORKAROUND
893 ( cd
$(FINAL_TARGET
)/components
&& $(CC
) -nostart
-o
$(SHARED_LIBRARY
).stub
$(SHARED_LIBRARY
) )
895 else # ! IS_COMPONENT
896 ifneq (,$(filter OS2 WINNT WINCE
,$(OS_ARCH
)))
897 $(INSTALL
) $(IFLAGS2
) $(IMPORT_LIBRARY
) $(DIST
)/lib
899 $(INSTALL
) $(IFLAGS2
) $(SHARED_LIBRARY
) $(DIST
)/lib
901 $(INSTALL
) $(IFLAGS2
) $(SHARED_LIBRARY
) $(FINAL_TARGET
)
902 ifdef BEOS_ADDON_WORKAROUND
903 ( cd
$(FINAL_TARGET
) && $(CC
) -nostart
-o
$(SHARED_LIBRARY
).stub
$(SHARED_LIBRARY
) )
906 endif # SHARED_LIBRARY
908 $(INSTALL
) $(IFLAGS2
) $(PROGRAM
) $(FINAL_TARGET
)
910 ifdef SIMPLE_PROGRAMS
911 $(INSTALL
) $(IFLAGS2
) $(SIMPLE_PROGRAMS
) $(FINAL_TARGET
)
914 $(INSTALL
) $(IFLAGS2
) $(HOST_PROGRAM
) $(DIST
)/host
/bin
916 ifdef HOST_SIMPLE_PROGRAMS
917 $(INSTALL
) $(IFLAGS2
) $(HOST_SIMPLE_PROGRAMS
) $(DIST
)/host
/bin
920 $(INSTALL
) $(IFLAGS1
) $(HOST_LIBRARY
) $(DIST
)/host
/lib
924 $(INSTALL
) $(IFLAGS1
) $(JAVA_LIBRARY
) $(FINAL_TARGET
)/components
926 $(INSTALL
) $(IFLAGS1
) $(JAVA_LIBRARY
) $(FINAL_TARGET
)
929 endif # !NO_DIST_INSTALL
932 ##############################################
934 ifndef NO_PROFILE_GUIDED_OPTIMIZE
935 ifneq (,$(MOZ_PROFILE_GENERATE
)$(MOZ_PROFILE_USE
))
936 ifeq ($(OS_ARCH
)_
$(GNU_CC
)$(INTERNAL_TOOLS
), WINNT_
)
937 # Force re-linking when building with PGO, since
938 # the MSVC linker does all the work. We force re-link
939 # in both stages so you can do depend builds with PGO.
941 $(SHARED_LIBRARY
): FORCE
947 ifdef MOZ_PROFILE_USE
948 # In the second pass, we need to merge the pgc files into the pgd file.
949 # The compiler would do this for us automatically if they were in the right
950 # place, but they're in dist/bin.
951 ifneq (,$(SHARED_LIBRARY
)$(PROGRAM
))
954 $(PYTHON
) $(topsrcdir
)/build
/win32
/pgomerge.py \
955 $(PROGRAM
:$(BIN_SUFFIX
)=) $(DIST
)/bin
958 $(PYTHON
) $(topsrcdir
)/build
/win32
/pgomerge.py \
959 $(SHARED_LIBRARY_NAME
) $(DIST
)/bin
962 endif # MOZ_PROFILE_USE
964 endif # MOZ_PROFILE_GENERATE || MOZ_PROFILE_USE
965 endif # NO_PROFILE_GUIDED_OPTIMIZE
967 ##############################################
970 $(MAKE
) -C
$(topsrcdir
) -f client.mk checkout
972 run_viewer
: $(FINAL_TARGET
)/viewer
973 cd
$(FINAL_TARGET
); \
974 MOZILLA_FIVE_HOME
=`pwd` \
975 LD_LIBRARY_PATH
=".:$(LIBS_PATH):$$LD_LIBRARY_PATH" \
978 clean clobber realclean clobber_all
:: $(SUBMAKEFILES
)
980 -rm -rf
$(ALL_TRASH_DIRS
)
981 +-$(LOOP_OVER_PARALLEL_DIRS
)
983 +-$(LOOP_OVER_STATIC_DIRS
)
984 +-$(LOOP_OVER_TOOL_DIRS
)
986 distclean:: $(SUBMAKEFILES
)
987 +-$(LOOP_OVER_PARALLEL_DIRS
)
989 +-$(LOOP_OVER_STATIC_DIRS
)
990 +-$(LOOP_OVER_TOOL_DIRS
)
991 -rm -rf
$(ALL_TRASH_DIRS
)
992 -rm -f
$(ALL_TRASH
) \
993 Makefile .HSancillary \
994 $(wildcard *.
$(OBJ_SUFFIX
)) $(wildcard *.ho
) $(wildcard host_
*.o
*) \
995 $(wildcard *.
$(LIB_SUFFIX
)) $(wildcard *$(DLL_SUFFIX
)) \
996 $(wildcard *.
$(IMPORT_LIB_SUFFIX
))
997 ifeq ($(OS_ARCH
),OS2
)
998 -rm -f
$(PROGRAM
:.exe
=.map
)
1003 find
$(topsrcdir
) -name
dist -prune
-o \
( -name
'*.[hc]' -o
-name
'*.cp' -o
-name
'*.cpp' -o
-name
'*.idl' \
) -print |
$(TAG_PROGRAM
)
1007 # creates OBJS, links with LIBS to create Foo
1009 $(PROGRAM
): $(PROGOBJS
) $(LIBS_DEPS
) $(EXTRA_DEPS
) $(EXE_DEF_FILE
) $(RESFILE
) $(GLOBAL_DEPS
)
1010 ifeq (WINCE
,$(OS_ARCH
))
1011 $(LD
) -NOLOGO
-OUT
:$@
$(WIN32_EXE_LDFLAGS
) $(LDFLAGS
) $(PROGOBJS
) $(RESFILE
) $(LIBS
) $(EXTRA_LIBS
) $(OS_LIBS
)
1013 ifeq (_WINNT
,$(GNU_CC
)_
$(OS_ARCH
))
1014 $(LD
) -NOLOGO
-OUT
:$@
-PDB
:$(LINK_PDBFILE
) $(WIN32_EXE_LDFLAGS
) $(LDFLAGS
) $(PROGOBJS
) $(RESFILE
) $(LIBS
) $(EXTRA_LIBS
) $(OS_LIBS
)
1015 ifdef MSMANIFEST_TOOL
1016 @if
test -f
$@.manifest
; then \
1017 if
test -f
"$(srcdir)/$@.manifest"; then \
1018 mt.exe
-NOLOGO
-MANIFEST
"$(win_srcdir)/$@.manifest" $@.manifest
-OUTPUTRESOURCE
:$@\
;1; \
1020 mt.exe
-NOLOGO
-MANIFEST
$@.manifest
-OUTPUTRESOURCE
:$@\
;1; \
1022 rm -f
$@.manifest
; \
1024 endif # MSVC with manifest tool
1026 ifeq ($(CPP_PROG_LINK
),1)
1027 $(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
)
1028 else # ! CPP_PROG_LINK
1029 $(CC
) -o
$@
$(CFLAGS
) $(PROGOBJS
) $(RESFILE
) $(WIN32_EXE_LDFLAGS
) $(SOLARIS_JEMALLOC_LDFLAGS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(BIN_FLAGS
) $(EXE_DEF_FILE
)
1030 endif # CPP_PROG_LINK
1031 endif # WINNT && !GNU_CC
1037 ifdef MOZ_POST_PROGRAM_COMMAND
1038 $(MOZ_POST_PROGRAM_COMMAND
) $@
1040 ifeq ($(OS_ARCH
),BeOS
)
1041 ifdef BEOS_PROGRAM_RESOURCE
1042 xres
-o
$@
$(BEOS_PROGRAM_RESOURCE
)
1047 $(HOST_PROGRAM
): $(HOST_PROGOBJS
) $(HOST_LIBS_DEPS
) $(HOST_EXTRA_DEPS
) $(GLOBAL_DEPS
)
1048 ifeq (WINCE
,$(OS_ARCH
))
1049 $(HOST_LD
) -NOLOGO
-OUT
:$@
$(HOST_OBJS
) $(WIN32_EXE_LDFLAGS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1051 ifeq (_WINNT
,$(GNU_CC
)_
$(HOST_OS_ARCH
))
1052 $(HOST_LD
) -NOLOGO
-OUT
:$@
-PDB
:$(HOST_PDBFILE
) $(HOST_OBJS
) $(WIN32_EXE_LDFLAGS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1053 ifdef MSMANIFEST_TOOL
1054 @if
test -f
$@.manifest
; then \
1055 mt.exe
-NOLOGO
-MANIFEST
$@.manifest
-OUTPUTRESOURCE
:$@\
;1; \
1056 rm -f
$@.manifest
; \
1058 endif # MSVC with manifest tool
1060 ifeq ($(CPP_PROG_LINK
),1)
1061 $(HOST_CXX
) -o
$@
$(HOST_CXXFLAGS
) $(HOST_LDFLAGS
) $(HOST_PROGOBJS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1063 $(HOST_CC
) -o
$@
$(HOST_CFLAGS
) $(HOST_LDFLAGS
) $(HOST_PROGOBJS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1064 endif # CPP_PROG_LINK
1069 # This is an attempt to support generation of multiple binaries
1070 # in one directory, it assumes everything to compile Foo is in
1071 # Foo.o (from either Foo.c or Foo.cpp).
1073 # SIMPLE_PROGRAMS = Foo Bar
1074 # creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
1076 $(SIMPLE_PROGRAMS
): %$(BIN_SUFFIX
): %.
$(OBJ_SUFFIX
) $(LIBS_DEPS
) $(EXTRA_DEPS
) $(GLOBAL_DEPS
)
1077 ifeq (WINCE
,$(OS_ARCH
))
1078 $(LD
) -nologo
-entry
:main
-out
:$@
$< $(WIN32_EXE_LDFLAGS
) $(LDFLAGS
) $(LIBS
) $(EXTRA_LIBS
) $(OS_LIBS
)
1080 ifeq (_WINNT
,$(GNU_CC
)_
$(OS_ARCH
))
1081 $(LD
) -nologo
-out
:$@
-pdb
:$(LINK_PDBFILE
) $< $(WIN32_EXE_LDFLAGS
) $(LDFLAGS
) $(LIBS
) $(EXTRA_LIBS
) $(OS_LIBS
)
1082 ifdef MSMANIFEST_TOOL
1083 @if
test -f
$@.manifest
; then \
1084 mt.exe
-NOLOGO
-MANIFEST
$@.manifest
-OUTPUTRESOURCE
:$@\
;1; \
1085 rm -f
$@.manifest
; \
1087 endif # MSVC with manifest tool
1089 ifeq ($(CPP_PROG_LINK
),1)
1090 $(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
)
1092 $(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
)
1093 endif # CPP_PROG_LINK
1094 endif # WINNT && !GNU_CC
1100 ifdef MOZ_POST_PROGRAM_COMMAND
1101 $(MOZ_POST_PROGRAM_COMMAND
) $@
1104 $(HOST_SIMPLE_PROGRAMS
): host_
%$(HOST_BIN_SUFFIX
): host_
%.
$(OBJ_SUFFIX
) $(HOST_LIBS_DEPS
) $(HOST_EXTRA_DEPS
) $(GLOBAL_DEPS
)
1105 ifeq (WINCE
,$(OS_ARCH
))
1106 $(HOST_LD
) -NOLOGO
-OUT
:$@
$(WIN32_EXE_LDFLAGS
) $< $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1108 ifeq (WINNT_
,$(HOST_OS_ARCH
)_
$(GNU_CC
))
1109 $(HOST_LD
) -NOLOGO
-OUT
:$@
-PDB
:$(HOST_PDBFILE
) $< $(WIN32_EXE_LDFLAGS
) $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1111 ifneq (,$(HOST_CPPSRCS
)$(USE_HOST_CXX
))
1112 $(HOST_CXX
) $(HOST_OUTOPTION
)$@
$(HOST_CXXFLAGS
) $(INCLUDES
) $< $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1114 $(HOST_CC
) $(HOST_OUTOPTION
)$@
$(HOST_CFLAGS
) $(INCLUDES
) $< $(HOST_LIBS
) $(HOST_EXTRA_LIBS
)
1120 # Purify target. Solaris/sparc only to start.
1121 # Purify does not recognize "egcs" or "c++" so we go with
1122 # "gcc" and "g++" for now.
1125 ifeq ($(CPP_PROG_LINK
),1)
1126 $(PURIFY
) $(CCC
) -o
$^.pure
$(CXXFLAGS
) $(PROGOBJS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
)
1128 $(PURIFY
) $(CC
) -o
$^.pure
$(CFLAGS
) $(PROGOBJS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
)
1130 ifndef NO_DIST_INSTALL
1131 $(INSTALL
) $(IFLAGS2
) $^.pure
$(FINAL_TARGET
)
1134 quantify
: $(PROGRAM
)
1135 ifeq ($(CPP_PROG_LINK
),1)
1136 $(QUANTIFY
) $(CCC
) -o
$^.quantify
$(CXXFLAGS
) $(PROGOBJS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
)
1138 $(QUANTIFY
) $(CC
) -o
$^.quantify
$(CFLAGS
) $(PROGOBJS
) $(LDFLAGS
) $(LIBS_DIR
) $(LIBS
) $(OS_LIBS
) $(EXTRA_LIBS
)
1140 ifndef NO_DIST_INSTALL
1141 $(INSTALL
) $(IFLAGS2
) $^.quantify
$(FINAL_TARGET
)
1145 # This allows us to create static versions of the shared libraries
1146 # that are built using other static libraries. Confused...?
1148 ifdef SHARED_LIBRARY_LIBS
1149 ifeq (,$(GNU_LD
)$(filter-out OS2 WINNT WINCE
, $(OS_ARCH
)))
1150 ifneq (,$(BUILD_STATIC_LIBS
)$(FORCE_STATIC_LIB
))
1151 LOBJS
+= $(SHARED_LIBRARY_LIBS
)
1154 ifneq (,$(filter OSF1 BSD_OS FreeBSD NetBSD OpenBSD SunOS Darwin
,$(OS_ARCH
)))
1155 CLEANUP1
:= | egrep
-v
'(________64ELEL_|__.SYMDEF)'
1156 CLEANUP2
:= rm -f ________64ELEL_ __.SYMDEF
1160 SUB_LOBJS
= $(shell for lib in
$(SHARED_LIBRARY_LIBS
); do
$(AR_LIST
) $${lib} $(CLEANUP1
); done
;)
1163 ifdef MOZILLA_PROBE_LIBS
1164 PROBE_LOBJS
= $(shell for lib in
$(MOZILLA_PROBE_LIBS
); do
$(AR_LIST
) $${lib} $(CLEANUP1
); done
;)
1166 ifdef DTRACE_PROBE_OBJ
1167 EXTRA_DEPS
+= $(DTRACE_PROBE_OBJ
)
1170 $(LIBRARY
): $(OBJS
) $(LOBJS
) $(SHARED_LIBRARY_LIBS
) $(EXTRA_DEPS
) $(GLOBAL_DEPS
)
1172 ifneq (,$(GNU_LD
)$(filter-out OS2 WINNT WINCE
, $(OS_ARCH
)))
1173 ifdef SHARED_LIBRARY_LIBS
1175 @for lib in
$(SHARED_LIBRARY_LIBS
); do
$(AR_EXTRACT
) $${lib}; $(CLEANUP2
); done
1178 $(AR
) $(AR_FLAGS
) $(OBJS
) $(LOBJS
) $(SUB_LOBJS
)
1180 @
rm -f foodummyfilefoo
$(SUB_LOBJS
)
1182 ifeq (,$(filter-out WINNT WINCE
, $(OS_ARCH
)))
1183 $(IMPORT_LIBRARY
): $(SHARED_LIBRARY
)
1186 ifeq ($(OS_ARCH
),OS2
)
1187 $(DEF_FILE
): $(OBJS
) $(SHARED_LIBRARY_LIBS
)
1189 echo LIBRARY
$(SHARED_LIBRARY_NAME
) INITINSTANCE TERMINSTANCE
> $@
1191 echo CODE LOADONCALL MOVEABLE DISCARDABLE
>> $@
1192 echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED
>> $@
1194 ifeq ($(IS_COMPONENT
),1)
1195 ifeq ($(HAS_EXTRAEXPORTS
),1)
1196 ifndef MOZ_OS2_USE_DECLSPEC
1197 $(FILTER
) $(OBJS
) $(SHARED_LIBRARY_LIBS
) >> $@
1200 echo _NSGetModule
>> $@
1203 ifndef MOZ_OS2_USE_DECLSPEC
1204 $(FILTER
) $(OBJS
) $(SHARED_LIBRARY_LIBS
) >> $@
1209 ifdef MOZ_OS2_USE_DECLSPEC
1210 $(IMPORT_LIBRARY
): $(SHARED_LIBRARY
)
1212 $(IMPORT_LIBRARY
): $(DEF_FILE
)
1219 $(HOST_LIBRARY
): $(HOST_OBJS
) Makefile
1221 $(HOST_AR
) $(HOST_AR_FLAGS
) $(HOST_OBJS
)
1224 ifdef NO_LD_ARCHIVE_FLAGS
1225 SUB_SHLOBJS
= $(SUB_LOBJS
)
1230 ifdef DTRACE_PROBE_OBJ
1231 ifndef DTRACE_LIB_DEPENDENT
1232 $(DTRACE_PROBE_OBJ
): $(OBJS
)
1233 dtrace
-G
-C
-32 -s
$(MOZILLA_DTRACE_SRC
) -o
$(DTRACE_PROBE_OBJ
) $(OBJS
)
1239 # On Darwin (Mac OS X), dwarf2 debugging uses debug info left in .o files,
1240 # so instead of deleting .o files after repacking them into a dylib, we make
1241 # symlinks back to the originals. The symlinks are a no-op for stabs debugging,
1242 # so no need to conditionalize on OS version or debugging format.
1244 $(SHARED_LIBRARY
): $(OBJS
) $(LOBJS
) $(DEF_FILE
) $(RESFILE
) $(SHARED_LIBRARY_LIBS
) $(EXTRA_DEPS
) $(DSO_LDOPTS_DEPS
) $(GLOBAL_DEPS
)
1245 ifndef INCREMENTAL_LINKER
1248 ifeq ($(OS_ARCH
),OpenVMS
)
1249 @if
test ! -f
$(VMS_SYMVEC_FILE
); then \
1250 if
test -f
$(VMS_SYMVEC_FILE_MODULE
); then \
1251 echo Creating specific component options file
$(VMS_SYMVEC_FILE
); \
1252 cp
$(VMS_SYMVEC_FILE_MODULE
) $(VMS_SYMVEC_FILE
); \
1256 @if
test ! -f
$(VMS_SYMVEC_FILE
); then \
1257 echo Creating generic component options file
$(VMS_SYMVEC_FILE
); \
1258 cp
$(VMS_SYMVEC_FILE_COMP
) $(VMS_SYMVEC_FILE
); \
1262 ifdef NO_LD_ARCHIVE_FLAGS
1263 ifdef SHARED_LIBRARY_LIBS
1264 @
rm -f
$(SUB_SHLOBJS
)
1265 @for lib in
$(SHARED_LIBRARY_LIBS
); do
$(AR_EXTRACT
) $${lib}; $(CLEANUP2
); done
1266 ifeq ($(OS_ARCH
),Darwin
)
1267 @echo Making symlinks to the original object files in the archive libraries
$(SHARED_LIBRARY_LIBS
)
1268 @for lib in
$(SHARED_LIBRARY_LIBS
); do \
1269 libdir=`echo $$lib|sed -e 's,/[^/]*\.a,,'`; \
1270 ofiles
=`$(AR_LIST) $${lib}`; \
1271 for ofile in
$$ofiles; do \
1272 if
[ -f
$$libdir/$$ofile ]; then \
1274 ln
-s
$$libdir/$$ofile $$ofile; \
1279 endif # SHARED_LIBRARY_LIBS
1280 endif # NO_LD_ARCHIVE_FLAGS
1281 ifdef DTRACE_LIB_DEPENDENT
1282 @
rm -f
$(PROBE_LOBJS
)
1283 @for lib in
$(MOZILLA_PROBE_LIBS
); do
$(AR_EXTRACT
) $${lib}; $(CLEANUP2
); done
1285 dtrace
-G
-C
-32 -s
$(MOZILLA_DTRACE_SRC
) -o
$(DTRACE_PROBE_OBJ
) $(PROBE_LOBJS
)
1287 @for lib in
$(MOZILLA_PROBE_LIBS
); do \
1288 ofiles
=`$(AR_LIST) $${lib}`; \
1289 $(AR_DELETE
) $${lib} $$ofiles; \
1291 $(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
)
1292 @
rm -f
$(PROBE_LOBJS
)
1293 @
rm -f
$(DTRACE_PROBE_OBJ
)
1294 @for lib in
$(MOZILLA_PROBE_LIBS
); do \
1295 if
[ -L
$${lib} ]; then
rm -f
`readlink $${lib}`; fi
; \
1297 @
rm -f
$(MOZILLA_PROBE_LIBS
)
1299 else # ! DTRACE_LIB_DEPENDENT
1300 $(MKSHLIB
) $(SHLIB_LDSTARTFILE
) $(OBJS
) $(DTRACE_PROBE_OBJ
) $(LOBJS
) $(SUB_SHLOBJS
) $(RESFILE
) $(LDFLAGS
) $(EXTRA_DSO_LDOPTS
) $(OS_LIBS
) $(EXTRA_LIBS
) $(DEF_FILE
) $(SHLIB_LDENDFILE
)
1301 endif # DTRACE_LIB_DEPENDENT
1303 ifeq (_WINNT
,$(GNU_CC
)_
$(OS_ARCH
))
1304 ifdef MSMANIFEST_TOOL
1305 ifdef EMBED_MANIFEST_AT
1306 @if
test -f
$@.manifest
; then \
1307 mt.exe
-NOLOGO
-MANIFEST
$@.manifest
-OUTPUTRESOURCE
:$@\
;$(EMBED_MANIFEST_AT
); \
1308 rm -f
$@.manifest
; \
1310 endif # EMBED_MANIFEST_AT
1311 endif # MSVC with manifest tool
1312 endif # WINNT && !GCC
1313 ifeq ($(OS_ARCH
),Darwin
)
1315 @
rm -f
$(SUB_SHLOBJS
)
1317 @
rm -f foodummyfilefoo
$(DELETE_AFTER_LINK
)
1322 ifdef MOZ_POST_DSO_LIB_COMMAND
1323 $(MOZ_POST_DSO_LIB_COMMAND
) $@
1327 ifdef COMPILER_DEPEND
1328 ifeq ($(SOLARIS_SUNPRO_CC
),1)
1329 _MDDEPFILE
= $(MDDEPDIR
)/$(@F
).pp
1331 define MAKE_DEPS_AUTO_CC
1332 if
test -d
$(@D
); then \
1333 echo
"Building deps for $< using Sun Studio cc"; \
1334 $(CC
) $(COMPILE_CFLAGS
) -xM
$< >$(_MDDEPFILE
) ; \
1337 define MAKE_DEPS_AUTO_CXX
1338 if
test -d
$(@D
); then \
1339 echo
"Building deps for $< using Sun Studio CC"; \
1340 $(CXX
) $(COMPILE_CXXFLAGS
) -xM
$< >$(_MDDEPFILE
) ; \
1343 endif # Sun Studio on Solaris
1344 else # COMPILER_DEPEND
1346 # Generate dependencies on the fly
1348 _MDDEPFILE
= $(MDDEPDIR
)/$(@F
).pp
1350 define MAKE_DEPS_AUTO
1351 if
test -d
$(@D
); then \
1352 echo
"Building deps for $<"; \
1353 $(MKDEPEND
) -o
'.$(OBJ_SUFFIX)' -f-
$(DEFINES
) $(ACDEFINES
) $(INCLUDES
) $< 2>/dev
/null | sed
-e
"s|^[^ ]*/||" > $(_MDDEPFILE
) ; \
1357 MAKE_DEPS_AUTO_CC
= $(MAKE_DEPS_AUTO
)
1358 MAKE_DEPS_AUTO_CXX
= $(MAKE_DEPS_AUTO
)
1360 endif # COMPILER_DEPEND
1362 endif # MOZ_AUTO_DEPS
1365 ifeq ($(OS_ARCH
),SunOS
)
1366 SOLARIS_JEMALLOC_LDFLAGS
= $(call EXPAND_LIBNAME_PATH
,jemalloc
,$(DIST
)/lib
)
1370 # Rules for building native targets must come first because of the host_ prefix
1371 host_
%.
$(OBJ_SUFFIX
): %.c
$(GLOBAL_DEPS
)
1373 $(ELOG
) $(HOST_CC
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1375 host_
%.
$(OBJ_SUFFIX
): %.
cpp $(GLOBAL_DEPS
)
1377 $(ELOG
) $(HOST_CXX
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CXXFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1379 host_
%.
$(OBJ_SUFFIX
): %.
cc $(GLOBAL_DEPS
)
1381 $(ELOG
) $(HOST_CXX
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CXXFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1383 host_
%.
$(OBJ_SUFFIX
): %.m
$(GLOBAL_DEPS
)
1385 $(ELOG
) $(HOST_CC
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CFLAGS
) $(HOST_CMFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1387 host_
%.
$(OBJ_SUFFIX
): %.mm
$(GLOBAL_DEPS
)
1389 $(ELOG
) $(HOST_CXX
) $(HOST_OUTOPTION
)$@
-c
$(HOST_CXXFLAGS
) $(HOST_CMMFLAGS
) $(INCLUDES
) $(NSPR_CFLAGS
) $(_VPATH_SRCS
)
1391 %: %.c
$(GLOBAL_DEPS
)
1393 @
$(MAKE_DEPS_AUTO_CC
)
1394 $(ELOG
) $(CC
) $(CFLAGS
) $(LDFLAGS
) $(OUTOPTION
)$@
$(_VPATH_SRCS
)
1396 %.
$(OBJ_SUFFIX
): %.c
$(GLOBAL_DEPS
)
1398 @
$(MAKE_DEPS_AUTO_CC
)
1399 $(ELOG
) $(CC
) $(OUTOPTION
)$@
-c
$(COMPILE_CFLAGS
) $(_VPATH_SRCS
)
1401 moc_
%.
cpp: %.h
$(GLOBAL_DEPS
)
1402 $(MOC
) $< $(OUTOPTION
)$@
1405 # The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
1407 %.
$(OBJ_SUFFIX
): %.
$(ASM_SUFFIX
) $(GLOBAL_DEPS
)
1408 $(AS
) -o
$@
$(ASFLAGS
) $(AS_DASH_C_FLAG
) $(_VPATH_SRCS
)
1411 %.
$(OBJ_SUFFIX
): %.S
$(GLOBAL_DEPS
)
1412 $(AS
) -o
$@
$(ASFLAGS
) -c
$<
1414 %: %.
cpp $(GLOBAL_DEPS
)
1415 @
$(MAKE_DEPS_AUTO_CXX
)
1416 $(CCC
) $(OUTOPTION
)$@
$(CXXFLAGS
) $(_VPATH_SRCS
) $(LDFLAGS
)
1419 # Please keep the next two rules in sync.
1421 %.
$(OBJ_SUFFIX
): %.
cc $(GLOBAL_DEPS
)
1423 @
$(MAKE_DEPS_AUTO_CXX
)
1424 $(ELOG
) $(CCC
) $(OUTOPTION
)$@
-c
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
)
1426 %.
$(OBJ_SUFFIX
): %.
cpp $(GLOBAL_DEPS
)
1428 @
$(MAKE_DEPS_AUTO_CXX
)
1429 ifdef STRICT_CPLUSPLUS_SUFFIX
1430 echo
"#line 1 \"$*.cpp\"" | cat
- $*.
cpp > t_
$*.
cc
1431 $(ELOG
) $(CCC
) -o
$@
-c
$(COMPILE_CXXFLAGS
) t_
$*.
cc
1434 $(ELOG
) $(CCC
) $(OUTOPTION
)$@
-c
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
)
1435 endif #STRICT_CPLUSPLUS_SUFFIX
1437 $(OBJ_PREFIX
)%.
$(OBJ_SUFFIX
): %.mm
$(GLOBAL_DEPS
)
1439 @
$(MAKE_DEPS_AUTO_CXX
)
1440 $(ELOG
) $(CCC
) -o
$@
-c
$(COMPILE_CXXFLAGS
) $(COMPILE_CMMFLAGS
) $(_VPATH_SRCS
)
1442 $(OBJ_PREFIX
)%.
$(OBJ_SUFFIX
): %.m
$(GLOBAL_DEPS
)
1444 @
$(MAKE_DEPS_AUTO_CC
)
1445 $(ELOG
) $(CC
) -o
$@
-c
$(COMPILE_CFLAGS
) $(COMPILE_CMFLAGS
) $(_VPATH_SRCS
)
1448 $(CCC
) -S
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
)
1451 $(CCC
) -S
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
)
1454 $(CC
) -S
$(COMPILE_CFLAGS
) $(_VPATH_SRCS
)
1457 $(CCC
) -C
-E
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
) > $*.i
1460 $(CCC
) -C
-E
$(COMPILE_CXXFLAGS
) $(_VPATH_SRCS
) > $*.i
1463 $(CC
) -C
-E
$(COMPILE_CFLAGS
) $(_VPATH_SRCS
) > $*.i
1466 $(CCC
) -C
-E
$(COMPILE_CXXFLAGS
) $(COMPILE_CMMFLAGS
) $(_VPATH_SRCS
) > $*.i
1469 @echo Creating Resource file
: $@
1470 ifeq ($(OS_ARCH
),OS2
)
1471 $(RC
) $(RCFLAGS
:-D
%=-d
%) -i
$(subst /,\
,$(srcdir)) -r
$< $@
1474 $(RC
) $(RCFLAGS
) $(filter-out -U
%,$(DEFINES
)) $(INCLUDES
:-I
%=--include-dir
%) $(OUTOPTION
)$@
$(_VPATH_SRCS
)
1476 $(RC
) $(RCFLAGS
) -r
$(DEFINES
) $(INCLUDES
) $(OUTOPTION
)$@
$(_VPATH_SRCS
)
1480 # need 3 separate lines for OS/2
1487 rm -f
$@
; cp
$< $@
; chmod
+x
$@
1489 # Cancel these implicit rules
1499 ###############################################################################
1501 ###############################################################################
1502 ifneq (,$(filter OS2 WINNT WINCE
,$(OS_ARCH
)))
1509 SPACE
:= $(EMPTY
) $(EMPTY
)
1511 # Cygwin and MSYS have their own special path form, but javac expects the source
1512 # and class paths to be in the DOS form (i.e. e:/builds/...). This function
1513 # does the appropriate conversion on Windows, but is a noop on other systems.
1514 ifeq (,$(filter-out WINNT WINCE
, $(HOST_OS_ARCH
)))
1515 ifdef CYGWIN_WRAPPER
1516 normalizepath
= $(foreach p
,$(1),$(shell cygpath
-m
$(p
)))
1519 # We use 'pwd -W' to get DOS form of the path. However, since the given path
1520 # could be a file or a non-existent path, we cannot call 'pwd -W' directly
1521 # on the path. Instead, we extract the root path (i.e. "c:/"), call 'pwd -W'
1522 # on it, then merge with the rest of the path.
1523 root-path
= $(shell echo
$(1) | sed
-e
"s|\(/[^/]*\)/\?\(.*\)|\1|")
1524 non-root-path
= $(shell echo
$(1) | sed
-e
"s|\(/[^/]*\)/\?\(.*\)|\2|")
1525 normalizepath
= $(foreach p
,$(1),$(if
$(filter /%,$(1)),$(shell cd
$(call root-path
,$(1)) && pwd
-W
)$(call non-root-path
,$(1)),$(1)))
1528 normalizepath
= $(1)
1531 _srcdir
= $(call normalizepath
,$(srcdir))
1532 ifdef JAVA_SOURCEPATH
1533 SP
= $(subst $(SPACE
),$(SEP
),$(call normalizepath
,$(strip $(JAVA_SOURCEPATH
))))
1534 _JAVA_SOURCEPATH
= ".$(SEP)$(_srcdir)$(SEP)$(SP)"
1536 _JAVA_SOURCEPATH
= ".$(SEP)$(_srcdir)"
1539 ifdef JAVA_CLASSPATH
1540 CP
= $(subst $(SPACE
),$(SEP
),$(call normalizepath
,$(strip $(JAVA_CLASSPATH
))))
1541 _JAVA_CLASSPATH
= ".$(SEP)$(CP)"
1550 $(_JAVA_DIR
)/%.class
: %.java
$(GLOBAL_DEPS
) $(_JAVA_DIR
)
1551 $(CYGWIN_WRAPPER
) $(JAVAC
) $(JAVAC_FLAGS
) -classpath
$(_JAVA_CLASSPATH
) \
1552 -sourcepath
$(_JAVA_SOURCEPATH
) -d
$(_JAVA_DIR
) $(_VPATH_SRCS
)
1554 $(JAVA_LIBRARY
): $(addprefix $(_JAVA_DIR
)/,$(JAVA_SRCS
:.java
=.class
)) $(GLOBAL_DEPS
)
1555 $(JAR
) cf
$@
-C
$(_JAVA_DIR
) .
1557 GARBAGE_DIRS
+= $(_JAVA_DIR
)
1559 ###############################################################################
1561 ###############################################################################
1563 # In GNU make 3.80, makefiles must use the /cygdrive syntax, even if we're
1564 # processing them with AS perl. See bug 232003
1566 CYGWIN_TOPSRCDIR
= -nowrap
-p
$(topsrcdir
) -wrap
1569 # Note: Passing depth to make-makefile is optional.
1570 # It saves the script some work, though.
1571 Makefile
: Makefile.in
1572 @
$(PERL
) $(AUTOCONF_TOOLS
)/make-makefile
-t
$(topsrcdir
) -d
$(DEPTH
) $(CYGWIN_TOPSRCDIR
)
1575 # VPATH does not work on some machines in this case, so add $(srcdir)
1576 $(SUBMAKEFILES
): % : $(srcdir)/%.in
1577 $(PERL
) $(AUTOCONF_TOOLS
)/make-makefile
-t
$(topsrcdir
) -d
$(DEPTH
) $(CYGWIN_TOPSRCDIR
) $@
1580 ifdef AUTOUPDATE_CONFIGURE
1581 $(topsrcdir
)/configure
: $(topsrcdir
)/configure.in
1582 (cd
$(topsrcdir
) && $(AUTOCONF
)) && (cd
$(DEPTH
) && .
/config.status
--recheck
)
1585 ###############################################################################
1586 # Bunch of things that extend the 'export' rule (in order):
1587 ###############################################################################
1589 ################################################################################
1590 # Copy each element of EXPORTS to $(PUBLIC)
1592 ifneq ($(EXPORTS
)$(XPIDLSRCS
)$(SDK_HEADERS
)$(SDK_XPIDLSRCS
),)
1593 $(SDK_PUBLIC
) $(PUBLIC
):
1598 ifneq ($(XPIDLSRCS
)$(SDK_XPIDLSRCS
),)
1604 ifneq ($(XPI_NAME
),)
1608 export:: $(FINAL_TARGET
)
1611 ifndef NO_DIST_INSTALL
1613 export:: $(EXPORTS
) $(PUBLIC
)
1614 $(INSTALL
) $(IFLAGS1
) $^
1617 ifneq ($(SDK_HEADERS
),)
1618 export:: $(SDK_HEADERS
) $(SDK_PUBLIC
)
1619 $(INSTALL
) $(IFLAGS1
) $^
1621 export:: $(SDK_HEADERS
) $(PUBLIC
)
1622 $(INSTALL
) $(IFLAGS1
) $^
1624 endif # NO_DIST_INSTALL
1626 ################################################################################
1627 # Copy each element of PREF_JS_EXPORTS
1632 ifneq (,$(XPI_NAME
)$(LIBXUL_SDK
))
1633 PREF_DIR
= defaults
/preferences
1635 PREF_DIR
= defaults
/pref
1639 ifneq ($(PREF_JS_EXPORTS
),)
1640 # on win32, pref files need CRLF line endings... see bug 206029
1641 ifeq (WINNT
,$(OS_ARCH
))
1642 PREF_PPFLAGS
= --line-endings
=crlf
1645 ifndef NO_DIST_INSTALL
1646 $(FINAL_TARGET
)/$(PREF_DIR
):
1649 libs
:: $(FINAL_TARGET
)/$(PREF_DIR
) $(PREF_JS_EXPORTS
)
1651 for i in
$(PREF_JS_EXPORTS
); do \
1652 dest
=$(FINAL_TARGET
)/$(PREF_DIR
)/`basename $$i`; \
1654 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py
$(PREF_PPFLAGS
) $(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) $$i > $$dest; \
1659 ################################################################################
1660 # Copy each element of AUTOCFG_JS_EXPORTS to $(FINAL_TARGET)/defaults/autoconfig
1662 ifneq ($(AUTOCFG_JS_EXPORTS
),)
1663 $(FINAL_TARGET
)/defaults
/autoconfig
::
1666 ifndef NO_DIST_INSTALL
1667 export:: $(AUTOCFG_JS_EXPORTS
) $(FINAL_TARGET
)/defaults
/autoconfig
1668 $(INSTALL
) $(IFLAGS1
) $^
1672 ################################################################################
1673 # Export the elements of $(XPIDLSRCS) & $(SDK_XPIDLSRCS),
1674 # generating .h and .xpt files and moving them to the appropriate places.
1676 ifneq ($(XPIDLSRCS
)$(SDK_XPIDLSRCS
),)
1678 export:: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.h
, $(XPIDLSRCS
))
1681 XPIDL_MODULE
= $(MODULE
)
1684 ifeq ($(XPIDL_MODULE
),) # we need $(XPIDL_MODULE) to make $(XPIDL_MODULE).xpt
1687 @echo
"*** Error processing XPIDLSRCS:"
1688 @echo
"Please define MODULE or XPIDL_MODULE when defining XPIDLSRCS,"
1689 @echo
"so we have a module name to use when creating MODULE.xpt."
1690 @echo
; sleep
2; false
1693 $(SDK_IDL_DIR
) $(IDL_DIR
)::
1696 # generate .h files from into $(XPIDL_GEN_DIR), then export to $(PUBLIC);
1697 # warn against overriding existing .h file.
1698 $(XPIDL_GEN_DIR
)/.done
:
1699 @if
test ! -d
$(XPIDL_GEN_DIR
); then echo Creating
$(XPIDL_GEN_DIR
)/.done
; rm -rf
$(XPIDL_GEN_DIR
); mkdir
$(XPIDL_GEN_DIR
); fi
1702 # don't depend on $(XPIDL_GEN_DIR), because the modification date changes
1703 # with any addition to the directory, regenerating all .h files -> everything.
1705 $(XPIDL_GEN_DIR
)/%.h
: %.idl
$(XPIDL_COMPILE
) $(XPIDL_GEN_DIR
)/.done
1707 $(ELOG
) $(XPIDL_COMPILE
) -m header
-w
$(XPIDL_FLAGS
) -o
$(XPIDL_GEN_DIR
)/$* $(_VPATH_SRCS
)
1708 @if
test -n
"$(findstring $*.h, $(EXPORTS) $(SDK_HEADERS))"; \
1709 then echo
"*** WARNING: file $*.h generated from $*.idl overrides $(srcdir)/$*.h"; else true
; fi
1712 # generate intermediate .xpt files into $(XPIDL_GEN_DIR), then link
1713 # into $(XPIDL_MODULE).xpt and export it to $(FINAL_TARGET)/components.
1714 $(XPIDL_GEN_DIR
)/%.xpt
: %.idl
$(XPIDL_COMPILE
) $(XPIDL_GEN_DIR
)/.done
1716 $(ELOG
) $(XPIDL_COMPILE
) -m typelib
-w
$(XPIDL_FLAGS
) -e
$@
-d
$(MDDEPDIR
)/$*.pp
$(_VPATH_SRCS
)
1718 # no need to link together if XPIDLSRCS contains only XPIDL_MODULE
1719 ifneq ($(XPIDL_MODULE
).idl
,$(strip $(XPIDLSRCS
)))
1720 $(XPIDL_GEN_DIR
)/$(XPIDL_MODULE
).xpt
: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.xpt
,$(XPIDLSRCS
) $(SDK_XPIDLSRCS
)) $(GLOBAL_DEPS
) $(XPIDL_LINK
)
1721 $(XPIDL_LINK
) $(XPIDL_GEN_DIR
)/$(XPIDL_MODULE
).xpt
$(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.xpt
,$(XPIDLSRCS
) $(SDK_XPIDLSRCS
))
1722 endif # XPIDL_MODULE.xpt != XPIDLSRCS
1724 libs
:: $(XPIDL_GEN_DIR
)/$(XPIDL_MODULE
).xpt
1725 ifndef NO_DIST_INSTALL
1726 $(INSTALL
) $(IFLAGS1
) $(XPIDL_GEN_DIR
)/$(XPIDL_MODULE
).xpt
$(FINAL_TARGET
)/components
1731 GARBAGE_DIRS
+= $(XPIDL_GEN_DIR
)
1733 endif # XPIDLSRCS || SDK_XPIDLSRCS
1735 ifneq ($(XPIDLSRCS
),)
1736 # export .idl files to $(IDL_DIR)
1737 ifndef NO_DIST_INSTALL
1738 export:: $(XPIDLSRCS
) $(IDL_DIR
)
1739 $(INSTALL
) $(IFLAGS1
) $^
1741 export:: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.h
, $(XPIDLSRCS
)) $(PUBLIC
)
1742 $(INSTALL
) $(IFLAGS1
) $^
1743 endif # NO_DIST_INSTALL
1750 # General rules for exporting idl files.
1752 # WORK-AROUND ONLY, for mozilla/tools/module-deps/bootstrap.pl build.
1753 # Bug to fix idl dependency problems w/o this extra build pass is
1754 # http://bugzilla.mozilla.org/show_bug.cgi?id=145777
1759 export-idl
:: $(SUBMAKEFILES
) $(MAKE_DIRS
)
1761 ifneq ($(XPIDLSRCS
)$(SDK_XPIDLSRCS
),)
1762 ifndef NO_DIST_INSTALL
1763 export-idl
:: $(XPIDLSRCS
) $(SDK_XPIDLSRCS
) $(IDL_DIR
)
1764 $(INSTALL
) $(IFLAGS1
) $^
1767 +$(LOOP_OVER_PARALLEL_DIRS
)
1769 +$(LOOP_OVER_TOOL_DIRS
)
1774 ifneq ($(SDK_XPIDLSRCS
),)
1775 # export .idl files to $(IDL_DIR) & $(SDK_IDL_DIR)
1776 ifndef NO_DIST_INSTALL
1777 export:: $(SDK_XPIDLSRCS
) $(IDL_DIR
)
1778 $(INSTALL
) $(IFLAGS1
) $^
1780 export:: $(SDK_XPIDLSRCS
) $(SDK_IDL_DIR
)
1781 $(INSTALL
) $(IFLAGS1
) $^
1783 export:: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.h
, $(SDK_XPIDLSRCS
)) $(PUBLIC
)
1784 $(INSTALL
) $(IFLAGS1
) $^
1786 export:: $(patsubst %.idl
,$(XPIDL_GEN_DIR
)/%.h
, $(SDK_XPIDLSRCS
)) $(SDK_PUBLIC
)
1787 $(INSTALL
) $(IFLAGS1
) $^
1790 endif # SDK_XPIDLSRCS
1795 ifneq ($(XPIDLSRCS
)$(SDK_XPIDLSRCS
),)
1797 JAVA_XPIDLSRCS
= $(XPIDLSRCS
) $(SDK_XPIDLSRCS
)
1799 # A single IDL file can contain multiple interfaces, which result in multiple
1800 # Java interface files. So use hidden dependency files.
1801 JAVADEPFILES
= $(addprefix $(JAVA_GEN_DIR
)/.
,$(JAVA_XPIDLSRCS
:.idl
=.java.pp
))
1805 GARBAGE_DIRS
+= $(JAVA_GEN_DIR
)
1807 # generate .java files into _javagen/[package name dirs]
1808 _JAVA_GEN_DIR
= $(JAVA_GEN_DIR
)/$(JAVA_IFACES_PKG_NAME
)
1812 $(JAVA_GEN_DIR
)/.
%.java.pp
: %.idl
$(XPIDL_COMPILE
) $(_JAVA_GEN_DIR
)
1814 $(ELOG
) $(XPIDL_COMPILE
) -m java
-w
-I
$(srcdir) -I
$(IDL_DIR
) -o
$(_JAVA_GEN_DIR
)/$* $(_VPATH_SRCS
)
1817 # "Install" generated Java interfaces. We segregate them based on the XPI_NAME.
1818 # If XPI_NAME is not set, install into the "default" directory.
1819 ifneq ($(XPI_NAME
),)
1820 JAVA_INSTALL_DIR
= $(JAVA_DIST_DIR
)/$(XPI_NAME
)
1822 JAVA_INSTALL_DIR
= $(JAVA_DIST_DIR
)/default
1825 $(JAVA_INSTALL_DIR
):
1828 export:: $(JAVA_DIST_DIR
) $(JAVADEPFILES
) $(JAVA_INSTALL_DIR
)
1829 (cd
$(JAVA_GEN_DIR
) && tar $(TAR_CREATE_FLAGS
) - .
) |
(cd
$(JAVA_INSTALL_DIR
) && tar -xf
-)
1831 endif # XPIDLSRCS || SDK_XPIDLSRCS
1832 endif # MOZ_JAVAXPCOM
1834 ################################################################################
1835 # Copy each element of EXTRA_COMPONENTS to $(FINAL_TARGET)/components
1836 ifdef EXTRA_COMPONENTS
1837 libs
:: $(EXTRA_COMPONENTS
)
1838 ifndef NO_DIST_INSTALL
1839 $(INSTALL
) $(IFLAGS1
) $^
$(FINAL_TARGET
)/components
1844 ifdef EXTRA_PP_COMPONENTS
1845 libs
:: $(EXTRA_PP_COMPONENTS
)
1846 ifndef NO_DIST_INSTALL
1848 $(NSINSTALL
) -D
$(FINAL_TARGET
)/components
; \
1850 dest
=$(FINAL_TARGET
)/components
/`basename $$i`; \
1852 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py
$(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) $$i > $$dest; \
1858 ################################################################################
1859 # Copy each element of EXTRA_JS_MODULES to $(FINAL_TARGET)/modules
1860 ifdef EXTRA_JS_MODULES
1861 libs
:: $(EXTRA_JS_MODULES
)
1862 ifndef NO_DIST_INSTALL
1863 $(INSTALL
) $(IFLAGS1
) $^
$(FINAL_TARGET
)/modules
1868 ifdef EXTRA_PP_JS_MODULES
1869 libs
:: $(EXTRA_PP_JS_MODULES
)
1870 ifndef NO_DIST_INSTALL
1872 $(NSINSTALL
) -D
$(FINAL_TARGET
)/modules
; \
1874 dest
=$(FINAL_TARGET
)/modules
/`basename $$i`; \
1876 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py
$(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) $$i > $$dest; \
1882 ################################################################################
1885 ifneq (,$(SDK_LIBRARY
))
1889 ifndef NO_DIST_INSTALL
1890 libs
:: $(SDK_LIBRARY
) $(SDK_LIB_DIR
)
1891 $(INSTALL
) $(IFLAGS2
) $^
1896 ifneq (,$(SDK_BINARY
))
1900 ifndef NO_DIST_INSTALL
1901 libs
:: $(SDK_BINARY
) $(SDK_BIN_DIR
)
1902 $(INSTALL
) $(IFLAGS2
) $^
1907 ################################################################################
1910 JAR_MANIFEST
:= $(srcdir)/jar.mn
1914 +$(LOOP_OVER_PARALLEL_DIRS
)
1916 +$(LOOP_OVER_TOOL_DIRS
)
1918 $(FINAL_TARGET
)/chrome
:
1921 ifneq (,$(wildcard $(JAR_MANIFEST
)))
1922 ifndef NO_DIST_INSTALL
1923 libs realchrome
:: $(CHROME_DEPS
) $(FINAL_TARGET
)/chrome
1924 $(PYTHON
) $(MOZILLA_DIR
)/config
/JarMaker.py \
1925 $(QUIET
) -j
$(FINAL_TARGET
)/chrome \
1926 $(MAKE_JARS_FLAGS
) $(XULPPFLAGS
) $(DEFINES
) $(ACDEFINES
) \
1931 ifneq ($(DIST_FILES
),)
1935 libs
:: $(DIST_FILES
) $(DIST
)/bin
1937 for f in
$(DIST_FILES
); do \
1938 dest
=$(FINAL_TARGET
)/`basename $$f`; \
1940 $(PYTHON
) $(MOZILLA_DIR
)/config
/Preprocessor.py \
1941 $(XULAPP_DEFINES
) $(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) \
1942 $(srcdir)/$$f > $$dest; \
1946 ifneq ($(DIST_CHROME_FILES
),)
1947 libs
:: $(DIST_CHROME_FILES
)
1949 for f in
$(DIST_CHROME_FILES
); do \
1950 dest
=$(FINAL_TARGET
)/chrome
/`basename $$f`; \
1952 $(PYTHON
) $(MOZILLA_DIR
)/config
/Preprocessor.py \
1953 $(XULAPP_DEFINES
) $(DEFINES
) $(ACDEFINES
) $(XULPPFLAGS
) \
1954 $(srcdir)/$$f > $$dest; \
1958 ifneq ($(XPI_PKGNAME
),)
1962 @echo
"Stripping $(XPI_PKGNAME) package directory..."
1963 @echo
$(FINAL_TARGET
)
1964 @cd
$(FINAL_TARGET
) && find .
! -type d \
1974 ! -name
"*.properties" \
1985 $(PLATFORM_EXCLUDE_LIST
) \
1986 -exec
$(STRIP
) $(STRIP_FLAGS
) {} >/dev
/null
2>&1 \
;
1989 @echo
"Packaging $(XPI_PKGNAME).xpi..."
1990 cd
$(FINAL_TARGET
) && $(ZIP
) -qr ..
/$(XPI_PKGNAME
).xpi
*
1993 ifdef INSTALL_EXTENSION_ID
1995 $(error XPI_NAME must be set for INSTALL_EXTENSION_ID
)
1999 $(RM
) -rf
"$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
2000 $(NSINSTALL
) -D
"$(DIST)/bin/extensions/$(INSTALL_EXTENSION_ID)"
2001 cd
$(FINAL_TARGET
) && tar $(TAR_CREATE_FLAGS
) - . |
(cd
"../../bin/extensions/$(INSTALL_EXTENSION_ID)" && tar -xf
-)
2005 ifneq (,$(filter flat symlink
,$(MOZ_CHROME_FILE_FORMAT
)))
2006 _JAR_REGCHROME_DISABLE_JAR
=1
2008 _JAR_REGCHROME_DISABLE_JAR
=0
2011 REGCHROME
= $(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/add-chrome.pl \
2012 $(if
$(filter gtk2
,$(MOZ_WIDGET_TOOLKIT
)),-x
) \
2013 $(if
$(CROSS_COMPILE
),-o
$(OS_ARCH
)) $(FINAL_TARGET
)/chrome
/installed-chrome.txt \
2014 $(_JAR_REGCHROME_DISABLE_JAR
)
2016 REGCHROME_INSTALL
= $(PERL
) -I
$(MOZILLA_DIR
)/config
$(MOZILLA_DIR
)/config
/add-chrome.pl \
2017 $(if
$(filter gtk2
,$(MOZ_WIDGET_TOOLKIT
)),-x
) \
2018 $(if
$(CROSS_COMPILE
),-o
$(OS_ARCH
)) $(DESTDIR
)$(mozappdir
)/chrome
/installed-chrome.txt \
2019 $(_JAR_REGCHROME_DISABLE_JAR
)
2022 #############################################################################
2024 #############################################################################
2025 ifdef COMPILER_DEPEND
2027 @echo
"$(MAKE): No need to run depend target.\
2028 Using compiler-based depend." 1>&2
2029 ifeq ($(GNU_CC
)$(GNU_CXX
),)
2031 @echo
"`echo '$(MAKE):'|sed 's/./ /g'`"\
2032 '(Compiler-based depend was turned on by "--enable-md".)' 1>&2
2035 @space
="`echo '$(MAKE): '|sed 's/./ /g'`";\
2036 echo
"$$space"'Since you are using a GNU compiler,\
2037 it is on by default.' 1>&2; \
2038 echo
"$$space"'To turn it off, pass --disable-md to configure.' 1>&2
2041 else # ! COMPILER_DEPEND
2043 ifndef MOZ_AUTO_DEPS
2045 define MAKE_DEPS_NOAUTO
2046 $(MKDEPEND
) -w1024
-o
'.$(OBJ_SUFFIX)' -f-
$(DEFINES
) $(ACDEFINES
) $(INCLUDES
) $< 2>/dev
/null | sed
-e
"s|^[^ ]*/||" > $@
2049 $(MDDEPDIR
)/%.pp
: %.c
2051 @
$(MAKE_DEPS_NOAUTO
)
2053 $(MDDEPDIR
)/%.pp
: %.
cpp
2055 @
$(MAKE_DEPS_NOAUTO
)
2057 $(MDDEPDIR
)/%.pp
: %.s
2059 @
$(MAKE_DEPS_NOAUTO
)
2061 ifneq (,$(OBJS
)$(XPIDLSRCS
)$(SDK_XPIDLSRCS
)$(SIMPLE_PROGRAMS
))
2062 depend
:: $(SUBMAKEFILES
) $(MAKE_DIRS
) $(MDDEPFILES
)
2064 depend
:: $(SUBMAKEFILES
)
2066 +$(LOOP_OVER_PARALLEL_DIRS
)
2068 +$(LOOP_OVER_TOOL_DIRS
)
2070 dependclean
:: $(SUBMAKEFILES
)
2072 +$(LOOP_OVER_PARALLEL_DIRS
)
2074 +$(LOOP_OVER_TOOL_DIRS
)
2076 endif # MOZ_AUTO_DEPS
2078 endif # COMPILER_DEPEND
2081 #############################################################################
2082 # MDDEPDIR is the subdirectory where all the dependency files are placed.
2083 # This uses a make rule (instead of a macro) to support parallel
2084 # builds (-jN). If this were done in the LOOP_OVER_DIRS macro, two
2085 # processes could simultaneously try to create the same directory.
2087 # We use $(CURDIR) in the rule's target to ensure that we don't find
2088 # a dependency directory in the source tree via VPATH (perhaps from
2089 # a previous build in the source tree) and thus neglect to create a
2090 # dependency directory in the object directory, where we really need
2093 $(CURDIR
)/$(MDDEPDIR
):
2094 @if
test ! -d
$@
; then echo Creating
$@
; rm -rf
$@
; mkdir
$@
; else true
; fi
2096 ifneq (,$(filter-out all chrome default
export realchrome tools
clean clobber clobber_all
distclean realclean,$(MAKECMDGOALS
)))
2097 ifneq (,$(OBJS
)$(XPIDLSRCS
)$(SDK_XPIDLSRCS
)$(SIMPLE_PROGRAMS
))
2098 MDDEPEND_FILES
:= $(strip $(wildcard $(MDDEPDIR
)/*.pp
))
2100 ifneq (,$(MDDEPEND_FILES
))
2102 # The script mddepend.pl checks the dependencies and writes to stdout
2103 # one rule to force out-of-date objects. For example,
2104 # foo.o boo.o: FORCE
2105 # The script has an advantage over including the *.pp files directly
2106 # because it handles the case when header files are removed from the build.
2107 # 'make' would complain that there is no way to build missing headers.
2108 ifeq (,$(MAKE_RESTARTS
))
2109 $(MDDEPDIR
)/.
all.pp
: FORCE
2110 @
$(PERL
) $(BUILD_TOOLS
)/mddepend.pl
$@
$(MDDEPEND_FILES
)
2112 -include $(MDDEPDIR
)/.
all.pp
2114 include $(MDDEPEND_FILES
)
2120 #############################################################################
2122 -include $(topsrcdir
)/$(MOZ_BUILD_APP
)/app-rules.mk
2123 -include $(MY_RULES
)
2126 # This speeds up gmake's processing if these files don't exist.
2128 $(MY_CONFIG
) $(MY_RULES
):
2132 # Generate Emacs tags in a file named TAGS if ETAGS was set in $(MY_CONFIG)
2136 ifneq ($(CSRCS
)$(CPPSRCS
)$(HEADERS
),)
2138 TAGS
:: $(CSRCS
) $(CPPSRCS
) $(HEADERS
)
2139 $(ETAGS
) $(CSRCS
) $(CPPSRCS
) $(HEADERS
)
2143 ################################################################################
2144 # Special gmake rules.
2145 ################################################################################
2149 # Disallow parallel builds with MSVC < 8
2151 ifneq (,$(filter 1200 1300 1310,$(_MSC_VER
)))
2156 # Re-define the list of default suffixes, so gmake won't have to churn through
2157 # hundreds of built-in suffix rules for stuff we don't need.
2162 # Fake targets. Always run these rules, even if a file/directory with that
2163 # name already exists.
2165 .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
2167 # Used as a dependency to force targets to rebuild
2170 # Delete target if error occurs when building target
2173 # Properly set LIBPATTERNS for the platform
2174 .LIBPATTERNS
= $(if
$(IMPORT_LIB_SUFFIX
),$(LIB_PREFIX
)%.
$(IMPORT_LIB_SUFFIX
)) $(LIB_PREFIX
)%.
$(LIB_SUFFIX
) $(DLL_PREFIX
)%$(DLL_SUFFIX
)
2178 TAGS
: $(SUBMAKEFILES
) $(CSRCS
) $(CPPSRCS
) $(wildcard *.h
)
2179 -etags
$(CSRCS
) $(CPPSRCS
) $(wildcard *.h
)
2180 +$(LOOP_OVER_PARALLEL_DIRS
)
2190 @
$(foreach tier
,$(TIERS
),echo
'$(tier):'; echo
' dirs: $(tier_$(tier)_dirs)'; echo
' staticdirs: $(tier_$(tier)_staticdirs)'; )
2201 echo-requires-recursive
::
2202 ifdef _REPORT_ALL_DIRS
2203 @echo
$(subst $(topsrcdir
)/,,$(srcdir)): $(MODULE
): $(REQUIRES
)
2205 @
$(if
$(REQUIRES
),echo
$(subst $(topsrcdir
)/,,$(srcdir)): $(MODULE
): $(REQUIRES
))
2207 +$(LOOP_OVER_PARALLEL_DIRS
)
2211 @
$(topsrcdir
)/build
/unix
/print-depth-path.sh
2214 @
$(topsrcdir
)/build
/package
/rpm
/print-module-name.sh
2216 echo-module-filelist
:
2217 @
$(topsrcdir
)/build
/package
/rpm
/print-module-filelist.sh
2220 ifneq (,$(filter $(PROGRAM
) $(HOST_PROGRAM
) $(SIMPLE_PROGRAMS
) $(HOST_LIBRARY
) $(LIBRARY
) $(SHARED_LIBRARY
),$(TARGETS
)))
2221 @echo
--------------------------------------------------------------------------------
2222 @echo
"PROGRAM = $(PROGRAM)"
2223 @echo
"SIMPLE_PROGRAMS = $(SIMPLE_PROGRAMS)"
2224 @echo
"LIBRARY = $(LIBRARY)"
2225 @echo
"SHARED_LIBRARY = $(SHARED_LIBRARY)"
2226 @echo
"SHARED_LIBRARY_LIBS = $(SHARED_LIBRARY_LIBS)"
2227 @echo
"LIBS = $(LIBS)"
2228 @echo
"DEF_FILE = $(DEF_FILE)"
2229 @echo
"IMPORT_LIBRARY = $(IMPORT_LIBRARY)"
2230 @echo
"STATIC_LIBS = $(STATIC_LIBS)"
2231 @echo
"SHARED_LIBS = $(SHARED_LIBS)"
2232 @echo
"EXTRA_DSO_LIBS = $(EXTRA_DSO_LIBS)"
2233 @echo
"EXTRA_DSO_LDOPTS = $(EXTRA_DSO_LDOPTS)"
2234 @echo
"DEPENDENT_LIBS = $(DEPENDENT_LIBS)"
2235 @echo
--------------------------------------------------------------------------------
2237 +$(LOOP_OVER_PARALLEL_DIRS
)
2241 @echo
"MOZ_BUILD_ROOT = $(MOZ_BUILD_ROOT)"
2242 @echo
"MOZ_WIDGET_TOOLKIT = $(MOZ_WIDGET_TOOLKIT)"
2244 @echo
"CXX = $(CXX)"
2245 @echo
"CCC = $(CCC)"
2246 @echo
"CPP = $(CPP)"
2249 @echo
"IMPLIB = $(IMPLIB)"
2250 @echo
"FILTER = $(FILTER)"
2251 @echo
"MKSHLIB = $(MKSHLIB)"
2252 @echo
"MKCSHLIB = $(MKCSHLIB)"
2254 @echo
"CFLAGS = $(CFLAGS)"
2255 @echo
"OS_CFLAGS = $(OS_CFLAGS)"
2256 @echo
"COMPILE_CFLAGS = $(COMPILE_CFLAGS)"
2257 @echo
"CXXFLAGS = $(CXXFLAGS)"
2258 @echo
"OS_CXXFLAGS = $(OS_CXXFLAGS)"
2259 @echo
"COMPILE_CXXFLAGS = $(COMPILE_CXXFLAGS)"
2260 @echo
"COMPILE_CMFLAGS = $(COMPILE_CMFLAGS)"
2261 @echo
"COMPILE_CMMFLAGS = $(COMPILE_CMMFLAGS)"
2262 @echo
"LDFLAGS = $(LDFLAGS)"
2263 @echo
"OS_LDFLAGS = $(OS_LDFLAGS)"
2264 @echo
"DSO_LDOPTS = $(DSO_LDOPTS)"
2265 @echo
"OS_INCLUDES = $(OS_INCLUDES)"
2266 @echo
"OS_LIBS = $(OS_LIBS)"
2267 @echo
"EXTRA_LIBS = $(EXTRA_LIBS)"
2268 @echo
"BIN_FLAGS = $(BIN_FLAGS)"
2269 @echo
"INCLUDES = $(INCLUDES)"
2270 @echo
"DEFINES = $(DEFINES)"
2271 @echo
"ACDEFINES = $(ACDEFINES)"
2272 @echo
"BIN_SUFFIX = $(BIN_SUFFIX)"
2273 @echo
"LIB_SUFFIX = $(LIB_SUFFIX)"
2274 @echo
"DLL_SUFFIX = $(DLL_SUFFIX)"
2275 @echo
"IMPORT_LIB_SUFFIX = $(IMPORT_LIB_SUFFIX)"
2276 @echo
"INSTALL = $(INSTALL)"
2279 @echo
"HOST_CC = $(HOST_CC)"
2280 @echo
"HOST_CXX = $(HOST_CXX)"
2281 @echo
"HOST_CFLAGS = $(HOST_CFLAGS)"
2282 @echo
"HOST_LDFLAGS = $(HOST_LDFLAGS)"
2283 @echo
"HOST_LIBS = $(HOST_LIBS)"
2284 @echo
"HOST_EXTRA_LIBS = $(HOST_EXTRA_LIBS)"
2285 @echo
"HOST_EXTRA_DEPS = $(HOST_EXTRA_DEPS)"
2286 @echo
"HOST_PROGRAM = $(HOST_PROGRAM)"
2287 @echo
"HOST_OBJS = $(HOST_OBJS)"
2288 @echo
"HOST_PROGOBJS = $(HOST_PROGOBJS)"
2289 @echo
"HOST_LIBRARY = $(HOST_LIBRARY)"
2292 @echo
"Build Modules = $(BUILD_MODULES)"
2293 @echo
"Module dirs = $(BUILD_MODULE_DIRS)"
2296 ifneq (,$(filter $(PROGRAM
) $(SIMPLE_PROGRAMS
) $(LIBRARY
) $(SHARED_LIBRARY
),$(TARGETS
)))
2297 zip
$(DEPTH
)/makefiles
$(subst $(topsrcdir
),$(MOZ_SRC
)/mozilla
,$(srcdir)/Makefile.in
)
2299 +$(LOOP_OVER_PARALLEL_DIRS
)
2304 $(DOXYGEN
) $(DEPTH
)/config
/doxygen.cfg
2306 check:: $(SUBMAKEFILES
) $(MAKE_DIRS
)
2307 +$(LOOP_OVER_PARALLEL_DIRS
)
2309 +$(LOOP_OVER_TOOL_DIRS
)