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$(HOST_BIN_SUFFIX)
24
HOST_CSRCS = nsinstall.c pathsub.c
27
TARGETS = $(HOST_PROGRAM) $(SIMPLE_PROGRAMS)
30
ifdef USE_ELF_DYNSTR_GC
31
TARGETS += elf-dynstr-gc
32
# Compiling the above will create dependency files.
37
# IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
38
# a recursive rule for finding nsinstall and the Perl scripts.
40
override NSBUILDROOT :=
44
MODULE_OPTIMIZE_FLAGS = -O3
47
ifndef COMPILER_DEPEND
48
ifndef MOZ_NATIVE_MAKEDEPEND
53
include $(topsrcdir)/config/config.mk
55
# Do not install util programs
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
67
$(DEPTH)/mozilla-config.h \
68
$(srcdir)/nsStaticComponents.h \
71
export:: $(TARGETS) $(HEADERS)
72
$(INSTALL) $(IFLAGS1) $(HEADERS) $(DIST)/include
73
-$(RM) $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES)
75
$(INSTALL) $(HOST_PROGRAM) $(DIST)/bin
78
# Generate a new buildid every time we "export" in config... that's only
79
# supposed to be once per-build!
82
printf "%s" $(MOZ_BUILD_DATE) > buildid
84
$(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid > buildid
87
ifdef WRAP_SYSTEM_INCLUDES
89
$(call mkdir_deps,system_wrappers) \
92
export:: $(export-preqs)
93
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
94
-DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
95
-DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
96
-DMOZ_NATIVE_HUNSPELL=$(MOZ_NATIVE_HUNSPELL) \
97
-DMOZ_NATIVE_BZ2=$(MOZ_NATIVE_BZ2) \
98
-DMOZ_NATIVE_ZLIB=$(MOZ_NATIVE_ZLIB) \
99
-DMOZ_NATIVE_PNG=$(MOZ_NATIVE_PNG) \
100
-DMOZ_NATIVE_JPEG=$(MOZ_NATIVE_JPEG) \
101
-DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \
102
-DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \
103
$(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
104
$(INSTALL) system_wrappers $(DIST)
106
GARBAGE_DIRS += system_wrappers
109
ifdef WRAP_STL_INCLUDES
120
STL_WRAPPERS_SENTINEL = $(DIST)/stl_wrappers/sentinel
122
$(STL_WRAPPERS_SENTINEL): $(srcdir)/make-stl-wrappers.py $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers $(GLOBAL_DEPS)
123
$(PYTHON) $(srcdir)/make-stl-wrappers.py stl_wrappers $(stl_compiler) $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers
124
$(PYTHON) $(srcdir)/nsinstall.py stl_wrappers $(DIST)
125
touch $(STL_WRAPPERS_SENTINEL)
127
export:: $(STL_WRAPPERS_SENTINEL)
129
GARBAGE += $(STL_WRAPPERS_SENTINEL)
130
GARBAGE_DIRS += stl_wrappers
134
$(SYSINSTALL) $(IFLAGS1) $(DEPTH)/mozilla-config.h $(DESTDIR)$(includedir)
137
$(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES) buildid $(srcdir)/*.pyc *.pyc
140
ifdef USE_ELF_DYNSTR_GC
141
elf-dynstr-gc: elf-dynstr-gc.c $(GLOBAL_DEPS)
142
$(CC) $(COMPILE_CFLAGS) $(GLIB_CFLAGS) -o $@ $< $(LDFLAGS) $(GLIB_LIBS)
148
ifndef COMPILER_DEPEND
150
clean clobber realclean clobber_all::
151
cd $(MKDEPEND_DIR); $(MAKE) $@
157
unit-Preprocessor.py \
159
unit-printprereleasesuffix.py \
163
unit-writemozinfo.py \
168
check-python-modules \
173
check:: $(check-preqs)
175
check-python-modules::
177
for test in $(PYUNITS); do \
178
$(PYTHON) $(srcdir)/tests/$$test ; \
182
$(MAKE) -C tests/src-simple check-jar
183
$(MAKE) -C tests/src-simple check-flat
184
$(MAKE) -C tests/src-simple check-flat USE_EXTENSION_MANIFEST=1
185
ifneq (,$(filter-out WINNT OS2,$(OS_ARCH)))
186
$(MAKE) -C tests/src-simple check-symlink
190
$(MAKE) -C tests/makefiles/autodeps check