3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 topsrcdir
= @top_srcdir@
12 include $(DEPTH
)/config
/autoconf.mk
14 # For sanity's sake, we compile nsinstall without the wrapped system
15 # headers, so that we can use it to set up the wrapped system headers.
18 # STDCXX_COMPAT is not needed here, and will actually fail because
19 # libstdc++-compat is not built yet.
20 MOZ_LIBSTDCXX_HOST_VERSION
=
22 ifneq (WINNT
,$(HOST_OS_ARCH
))
23 HOST_PROGRAM
= nsinstall_real
$(HOST_BIN_SUFFIX
)
27 ifdef USE_ELF_DYNSTR_GC
28 export:: elf-dynstr-gc
32 # IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
33 # a recursive rule for finding nsinstall and the Perl scripts.
35 override NSBUILDROOT
:=
39 MODULE_OPTIMIZE_FLAGS
= -O3
42 include $(topsrcdir
)/config
/config.mk
44 # Do not install util programs
47 ifneq (WINNT
,$(HOST_OS_ARCH
))
48 # Ensure nsinstall is atomically created
49 nsinstall
$(HOST_BIN_SUFFIX
): $(HOST_PROGRAM
)
53 NSINSTALL_FILES
:= nsinstall
$(HOST_BIN_SUFFIX
)
54 NSINSTALL_DEST
:= $(DIST
)/bin
55 NSINSTALL_TARGET
:= export
56 INSTALL_TARGETS
+= NSINSTALL
60 $(DEPTH
)/mozilla-config.h \
62 HEADERS_DEST
:= $(DIST
)/include
63 HEADERS_TARGET
:= export
64 INSTALL_TARGETS
+= HEADERS
66 PYTHON_UNIT_TESTS
:= $(wildcard $(srcdir)/tests
/unit-
*.py
)
68 include $(topsrcdir
)/config
/rules.mk
70 HOST_CFLAGS
+= -DUNICODE
-D_UNICODE
72 ifeq ($(OS_CONFIG
),SunOS4.1
)
73 NSPR_CFLAGS
+= -I
$(srcdir)/..
/nsprpub
/pr
/include/md
76 # Generate a new buildid every time we "export" in config... that's only
77 # supposed to be once per-build!
80 printf
"%s" $(MOZ_BUILD_DATE
) > buildid
82 $(PYTHON
) $(topsrcdir
)/toolkit
/xre
/make-platformini.py
--print-buildid
> buildid
85 ifdef WRAP_SYSTEM_INCLUDES
87 $(call mkdir_deps
,system_wrappers
) \
90 export:: $(export-preqs
)
91 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py
$(DEFINES
) $(ACDEFINES
) \
92 -DMOZ_TREE_CAIRO
=$(MOZ_TREE_CAIRO
) \
93 -DMOZ_TREE_PIXMAN
=$(MOZ_TREE_PIXMAN
) \
94 -DMOZ_NATIVE_HUNSPELL
=$(MOZ_NATIVE_HUNSPELL
) \
95 -DMOZ_NATIVE_BZ2
=$(MOZ_NATIVE_BZ2
) \
96 -DMOZ_NATIVE_ZLIB
=$(MOZ_NATIVE_ZLIB
) \
97 -DMOZ_NATIVE_PNG
=$(MOZ_NATIVE_PNG
) \
98 -DMOZ_NATIVE_JPEG
=$(MOZ_NATIVE_JPEG
) \
99 -DMOZ_NATIVE_LIBEVENT
=$(MOZ_NATIVE_LIBEVENT
) \
100 -DMOZ_NATIVE_LIBVPX
=$(MOZ_NATIVE_LIBVPX
) \
101 -DMOZ_NATIVE_ICU
=$(MOZ_NATIVE_ICU
) \
102 $(srcdir)/system-headers |
$(PERL
) $(topsrcdir
)/nsprpub
/config
/make-system-wrappers.pl system_wrappers
103 $(INSTALL
) system_wrappers
$(DIST
)
105 GARBAGE_DIRS
+= system_wrappers
108 ifdef WRAP_STL_INCLUDES
119 STL_WRAPPERS_SENTINEL
= $(DIST
)/stl_wrappers
/sentinel
121 $(STL_WRAPPERS_SENTINEL
): $(srcdir)/make-stl-wrappers.py
$(srcdir)/$(stl_compiler
)-stl-wrapper.template.h
$(srcdir)/stl-headers
$(GLOBAL_DEPS
)
122 $(PYTHON
) $(srcdir)/make-stl-wrappers.py stl_wrappers
$(stl_compiler
) $(srcdir)/$(stl_compiler
)-stl-wrapper.template.h
$(srcdir)/stl-headers
123 $(PYTHON
) $(srcdir)/nsinstall.py stl_wrappers
$(DIST
)
124 touch
$(STL_WRAPPERS_SENTINEL
)
126 export:: $(STL_WRAPPERS_SENTINEL
)
128 GARBAGE
+= $(STL_WRAPPERS_SENTINEL
)
129 GARBAGE_DIRS
+= stl_wrappers
133 $(SYSINSTALL
) $(IFLAGS1
) $(DEPTH
)/mozilla-config.h
$(DESTDIR
)$(includedir)
136 $(FINAL_LINK_COMPS
) $(FINAL_LINK_LIBS
) $(FINAL_LINK_COMP_NAMES
) buildid
$(srcdir)/*.pyc
*.pyc
139 ifdef USE_ELF_DYNSTR_GC
140 elf-dynstr-gc
: elf-dynstr-gc.c
$(GLOBAL_DEPS
) $(call mkdir_deps
,$(MDDEPDIR
))
141 $(CC
) $(COMPILE_CFLAGS
) $(GLIB_CFLAGS
) -o
$@
$< $(LDFLAGS
) $(GLIB_LIBS
)
152 check:: $(check-preqs
)
155 $(MAKE
) -C tests
/src-simple check-jar
156 $(MAKE
) -C tests
/src-simple check-flat
157 $(MAKE
) -C tests
/src-simple check-flat USE_EXTENSION_MANIFEST
=1
158 ifneq (,$(filter-out WINNT OS2
,$(OS_ARCH
)))
159 $(MAKE
) -C tests
/src-simple check-symlink
163 $(MAKE
) -C tests
/makefiles
/autodeps
check