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.
22 ifneq (WINNT
,$(HOST_OS_ARCH
))
23 HOST_PROGRAM
= nsinstall_real
$(HOST_BIN_SUFFIX
)
24 HOST_CSRCS
= nsinstall.c pathsub.c
28 ifdef USE_ELF_DYNSTR_GC
29 export:: elf-dynstr-gc
33 # IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
34 # a recursive rule for finding nsinstall and the Perl scripts.
36 override NSBUILDROOT
:=
40 MODULE_OPTIMIZE_FLAGS
= -O3
43 include $(topsrcdir
)/config
/config.mk
45 # Do not install util programs
48 ifneq (WINNT
,$(HOST_OS_ARCH
))
49 # Ensure nsinstall is atomically created
50 nsinstall
$(HOST_BIN_SUFFIX
): $(HOST_PROGRAM
)
54 NSINSTALL_FILES
:= nsinstall
$(HOST_BIN_SUFFIX
)
55 NSINSTALL_DEST
:= $(DIST
)/bin
56 NSINSTALL_TARGET
:= export
57 INSTALL_TARGETS
+= NSINSTALL
61 $(DEPTH
)/mozilla-config.h \
62 $(srcdir)/nsStaticComponents.h \
64 HEADERS_DEST
:= $(DIST
)/include
65 HEADERS_TARGET
:= export
66 INSTALL_TARGETS
+= HEADERS
68 PYTHON_UNIT_TESTS
:= $(wildcard $(srcdir)/tests
/unit-
*.py
)
70 include $(topsrcdir
)/config
/rules.mk
72 HOST_CFLAGS
+= -DUNICODE
-D_UNICODE
74 ifeq ($(OS_CONFIG
),SunOS4.1
)
75 NSPR_CFLAGS
+= -I
$(srcdir)/..
/nsprpub
/pr
/include/md
79 -$(RM
) $(FINAL_LINK_COMPS
) $(FINAL_LINK_LIBS
) $(FINAL_LINK_COMP_NAMES
)
81 # Generate a new buildid every time we "export" in config... that's only
82 # supposed to be once per-build!
85 printf
"%s" $(MOZ_BUILD_DATE
) > buildid
87 $(PYTHON
) $(topsrcdir
)/toolkit
/xre
/make-platformini.py
--print-buildid
> buildid
90 ifdef WRAP_SYSTEM_INCLUDES
92 $(call mkdir_deps
,system_wrappers
) \
95 export:: $(export-preqs
)
96 $(PYTHON
) $(topsrcdir
)/config
/Preprocessor.py
$(DEFINES
) $(ACDEFINES
) \
97 -DMOZ_TREE_CAIRO
=$(MOZ_TREE_CAIRO
) \
98 -DMOZ_TREE_PIXMAN
=$(MOZ_TREE_PIXMAN
) \
99 -DMOZ_NATIVE_HUNSPELL
=$(MOZ_NATIVE_HUNSPELL
) \
100 -DMOZ_NATIVE_BZ2
=$(MOZ_NATIVE_BZ2
) \
101 -DMOZ_NATIVE_ZLIB
=$(MOZ_NATIVE_ZLIB
) \
102 -DMOZ_NATIVE_PNG
=$(MOZ_NATIVE_PNG
) \
103 -DMOZ_NATIVE_JPEG
=$(MOZ_NATIVE_JPEG
) \
104 -DMOZ_NATIVE_LIBEVENT
=$(MOZ_NATIVE_LIBEVENT
) \
105 -DMOZ_NATIVE_LIBVPX
=$(MOZ_NATIVE_LIBVPX
) \
106 $(srcdir)/system-headers |
$(PERL
) $(topsrcdir
)/nsprpub
/config
/make-system-wrappers.pl system_wrappers
107 $(INSTALL
) system_wrappers
$(DIST
)
109 GARBAGE_DIRS
+= system_wrappers
112 ifdef WRAP_STL_INCLUDES
123 STL_WRAPPERS_SENTINEL
= $(DIST
)/stl_wrappers
/sentinel
125 $(STL_WRAPPERS_SENTINEL
): $(srcdir)/make-stl-wrappers.py
$(srcdir)/$(stl_compiler
)-stl-wrapper.template.h
$(srcdir)/stl-headers
$(GLOBAL_DEPS
)
126 $(PYTHON
) $(srcdir)/make-stl-wrappers.py stl_wrappers
$(stl_compiler
) $(srcdir)/$(stl_compiler
)-stl-wrapper.template.h
$(srcdir)/stl-headers
127 $(PYTHON
) $(srcdir)/nsinstall.py stl_wrappers
$(DIST
)
128 touch
$(STL_WRAPPERS_SENTINEL
)
130 export:: $(STL_WRAPPERS_SENTINEL
)
132 GARBAGE
+= $(STL_WRAPPERS_SENTINEL
)
133 GARBAGE_DIRS
+= stl_wrappers
137 $(SYSINSTALL
) $(IFLAGS1
) $(DEPTH
)/mozilla-config.h
$(DESTDIR
)$(includedir)
140 $(FINAL_LINK_COMPS
) $(FINAL_LINK_LIBS
) $(FINAL_LINK_COMP_NAMES
) buildid
$(srcdir)/*.pyc
*.pyc
143 ifdef USE_ELF_DYNSTR_GC
144 elf-dynstr-gc
: elf-dynstr-gc.c
$(GLOBAL_DEPS
) $(call mkdir_deps
,$(MDDEPDIR
))
145 $(CC
) $(COMPILE_CFLAGS
) $(GLIB_CFLAGS
) -o
$@
$< $(LDFLAGS
) $(GLIB_LIBS
)
156 check:: $(check-preqs
)
159 $(MAKE
) -C tests
/src-simple check-jar
160 $(MAKE
) -C tests
/src-simple check-flat
161 $(MAKE
) -C tests
/src-simple check-flat USE_EXTENSION_MANIFEST
=1
162 ifneq (,$(filter-out WINNT OS2
,$(OS_ARCH
)))
163 $(MAKE
) -C tests
/src-simple check-symlink
167 $(MAKE
) -C tests
/makefiles
/autodeps
check