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/.
7 # For sanity's sake, we compile nsinstall without the wrapped system
8 # headers, so that we can use it to set up the wrapped system headers.
11 # STDCXX_COMPAT is not needed here, and will actually fail because
12 # libstdc++-compat is not built yet.
13 MOZ_LIBSTDCXX_HOST_VERSION
=
15 ifneq (WINNT
,$(HOST_OS_ARCH
))
16 HOST_PROGRAM
= nsinstall_real
$(HOST_BIN_SUFFIX
)
20 ifdef USE_ELF_DYNSTR_GC
21 export:: elf-dynstr-gc
25 # IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
26 # a recursive rule for finding nsinstall and the Perl scripts.
28 override NSBUILDROOT
:=
32 MODULE_OPTIMIZE_FLAGS
= -O3
35 include $(topsrcdir
)/config
/config.mk
37 ifneq (WINNT
,$(HOST_OS_ARCH
))
38 # Ensure nsinstall is atomically created
39 nsinstall
$(HOST_BIN_SUFFIX
): $(HOST_PROGRAM
)
43 NSINSTALL_FILES
:= nsinstall
$(HOST_BIN_SUFFIX
)
44 NSINSTALL_DEST
:= $(DIST
)/bin
45 NSINSTALL_TARGET
:= export
46 INSTALL_TARGETS
+= NSINSTALL
50 $(DEPTH
)/mozilla-config.h \
52 HEADERS_DEST
:= $(DIST
)/include
53 HEADERS_TARGET
:= export
54 INSTALL_TARGETS
+= HEADERS
56 PYTHON_UNIT_TESTS
:= $(wildcard $(srcdir)/tests
/unit-
*.py
)
58 include $(topsrcdir
)/config
/rules.mk
60 HOST_CFLAGS
+= -DUNICODE
-D_UNICODE
62 ifeq ($(OS_CONFIG
),SunOS4.1
)
63 NSPR_CFLAGS
+= -I
$(srcdir)/..
/nsprpub
/pr
/include/md
66 # Generate a new buildid every time we "export" in config... that's only
67 # supposed to be once per-build!
70 printf
"%s" $(MOZ_BUILD_DATE
) > buildid
72 $(PYTHON
) $(topsrcdir
)/toolkit
/xre
/make-platformini.py
--print-buildid
> buildid
75 ifdef WRAP_SYSTEM_INCLUDES
77 $(call mkdir_deps
,system_wrappers
) \
80 export:: $(export-preqs
)
81 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py
$(DEFINES
) $(ACDEFINES
) \
82 -DMOZ_TREE_CAIRO
=$(MOZ_TREE_CAIRO
) \
83 -DMOZ_TREE_PIXMAN
=$(MOZ_TREE_PIXMAN
) \
84 -DMOZ_NATIVE_HUNSPELL
=$(MOZ_NATIVE_HUNSPELL
) \
85 -DMOZ_NATIVE_BZ2
=$(MOZ_NATIVE_BZ2
) \
86 -DMOZ_NATIVE_ZLIB
=$(MOZ_NATIVE_ZLIB
) \
87 -DMOZ_NATIVE_PNG
=$(MOZ_NATIVE_PNG
) \
88 -DMOZ_NATIVE_JPEG
=$(MOZ_NATIVE_JPEG
) \
89 -DMOZ_NATIVE_LIBEVENT
=$(MOZ_NATIVE_LIBEVENT
) \
90 -DMOZ_NATIVE_LIBVPX
=$(MOZ_NATIVE_LIBVPX
) \
91 -DMOZ_NATIVE_ICU
=$(MOZ_NATIVE_ICU
) \
92 $(srcdir)/system-headers |
$(PERL
) $(topsrcdir
)/nsprpub
/config
/make-system-wrappers.pl system_wrappers
93 $(INSTALL
) system_wrappers
$(DIST
)
95 GARBAGE_DIRS
+= system_wrappers
98 ifdef WRAP_STL_INCLUDES
109 STL_WRAPPERS_SENTINEL
= $(DIST
)/stl_wrappers
/sentinel
111 $(STL_WRAPPERS_SENTINEL
): $(srcdir)/make-stl-wrappers.py
$(srcdir)/$(stl_compiler
)-stl-wrapper.template.h
$(srcdir)/stl-headers
$(GLOBAL_DEPS
)
112 $(PYTHON
) $(srcdir)/make-stl-wrappers.py stl_wrappers
$(stl_compiler
) $(srcdir)/$(stl_compiler
)-stl-wrapper.template.h
$(srcdir)/stl-headers
113 $(PYTHON
) $(srcdir)/nsinstall.py
-t stl_wrappers
$(DIST
)
114 touch
$(STL_WRAPPERS_SENTINEL
)
116 export:: $(STL_WRAPPERS_SENTINEL
)
118 GARBAGE
+= $(STL_WRAPPERS_SENTINEL
)
119 GARBAGE_DIRS
+= stl_wrappers
123 $(SYSINSTALL
) $(IFLAGS1
) $(DEPTH
)/mozilla-config.h
$(DESTDIR
)$(includedir)
126 $(FINAL_LINK_COMPS
) $(FINAL_LINK_LIBS
) $(FINAL_LINK_COMP_NAMES
) buildid
$(srcdir)/*.pyc
*.pyc
129 ifdef USE_ELF_DYNSTR_GC
130 elf-dynstr-gc
: elf-dynstr-gc.c
$(GLOBAL_DEPS
) $(call mkdir_deps
,$(MDDEPDIR
))
131 $(CC
) $(COMPILE_CFLAGS
) $(GLIB_CFLAGS
) -DELFDYNSTRGC_BUILD
-o
$@
$< $(LDFLAGS
) $(GLIB_LIBS
)
142 check:: $(check-preqs
)
145 $(MAKE
) -C tests
/src-simple check-jar
146 $(MAKE
) -C tests
/src-simple check-flat
147 $(MAKE
) -C tests
/src-simple check-flat USE_EXTENSION_MANIFEST
=1
148 ifneq (,$(filter-out WINNT OS2
,$(OS_ARCH
)))
149 $(MAKE
) -C tests
/src-simple check-symlink
153 $(MAKE
) -C tests
/makefiles
/autodeps
check