2
# This Source Code Form is subject to the terms of the Mozilla Public
3
# License, v. 2.0. If a copy of the MPL was not distributed with this
4
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
topsrcdir = @top_srcdir@
11
include $(DEPTH)/config/autoconf.mk
13
# For sanity's sake, we compile nsinstall without the wrapped system
14
# headers, so that we can use it to set up the wrapped system headers.
17
ifneq (WINNT,$(HOST_OS_ARCH))
18
HOST_PROGRAM = nsinstall$(HOST_BIN_SUFFIX)
19
HOST_CSRCS = nsinstall.c pathsub.c
22
TARGETS = $(HOST_PROGRAM) $(SIMPLE_PROGRAMS)
24
# IMPORTANT: Disable NSBUILDROOT for this directory only, otherwise we have
25
# a recursive rule for finding nsinstall and the Perl scripts.
27
override NSBUILDROOT :=
31
MODULE_OPTIMIZE_FLAGS = -O3
34
ifndef COMPILER_DEPEND
35
ifndef MOZ_NATIVE_MAKEDEPEND
40
include $(topsrcdir)/config/config.mk
42
# Do not install util programs
45
# Force wrap zlib system header if building js as a shared library.
46
ifneq (,$(JS_SHARED_LIBRARY)$(MOZ_NATIVE_ZLIB))
47
DEFINES += -DMOZ_NATIVE_ZLIB=1
50
include $(topsrcdir)/config/rules.mk
52
HOST_CFLAGS += -DUNICODE -D_UNICODE
56
$(INSTALL) $(HOST_PROGRAM) $(DIST)/bin
59
ifdef WRAP_SYSTEM_INCLUDES
61
$(call mkdir_deps,system_wrappers_js) \
63
$(PYTHON) $(srcdir)/Preprocessor.py $(DEFINES) $(ACDEFINES) \
64
$(srcdir)/system-headers | $(PERL) $(srcdir)/make-system-wrappers.pl system_wrappers_js
65
$(INSTALL) system_wrappers_js $(DIST)
67
GARBAGE_DIRS += system_wrappers_js
70
GARBAGE += $(srcdir)/*.pyc *.pyc
74
ifndef COMPILER_DEPEND
76
clean clobber realclean clobber_all::
77
cd $(MKDEPEND_DIR); $(MAKE) $@