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 #######################################################################
8 # (1) Include initial platform-independent assignments (MANDATORY). #
9 #######################################################################
13 #######################################################################
14 # (2) Include "global" configuration information. (OPTIONAL) #
15 #######################################################################
17 include $(CORE_DEPTH)/coreconf/config.mk
19 #######################################################################
20 # (3) Include "component" configuration information. (OPTIONAL) #
21 #######################################################################
25 #######################################################################
26 # (4) Include "local" platform-dependent assignments (OPTIONAL). #
27 #######################################################################
31 #######################################################################
32 # (5) Execute "global" rules. (OPTIONAL) #
33 #######################################################################
35 include $(CORE_DEPTH)/coreconf/rules.mk
37 #######################################################################
38 # (6) Execute "component" rules. (OPTIONAL) #
39 #######################################################################
43 #######################################################################
44 # (7) Execute "local" rules. (OPTIONAL). #
45 #######################################################################
47 nss_build_all: build_nspr all
49 nss_clean_all: clobber_nspr clobber
51 NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/config.status
52 NSPR_CONFIGURE = $(CORE_DEPTH)/../nspr/configure
55 # Translate coreconf build options to NSPR configure options.
58 ifeq ($(OS_TARGET),Android)
59 NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) --target=arm-linux-androideabi --with-android-version=$(OS_TARGET_RELEASE)
62 NSPR_CONFIGURE_OPTS += --disable-debug --enable-optimize
65 NSPR_CONFIGURE_OPTS += --enable-x32
68 NSPR_CONFIGURE_OPTS += --enable-64bit
70 ifeq ($(OS_TARGET),WIN95)
71 NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
74 NSPR_CONFIGURE_OPTS += --enable-debug-rtl
77 NSPR_COMPILERS = CC=gcc CXX=g++
81 # Some pwd commands on Windows (for example, the pwd
82 # command in Cygwin) return a pathname that begins
83 # with a (forward) slash. When such a pathname is
84 # passed to Windows build tools (for example, cl), it
85 # is mistaken as a command-line option. If that is the case,
86 # we use a relative pathname as NSPR's prefix on Windows.
90 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
91 ifeq (,$(findstring :,$(shell pwd)))
95 ifeq ($(USEABSPATH),"YES")
96 NSPR_PREFIX = $(shell pwd)/../dist/$(OBJDIR_NAME)
98 NSPR_PREFIX = $$(topsrcdir)/../dist/$(OBJDIR_NAME)
101 $(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE)
102 mkdir -p $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)
103 cd $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) ; \
104 $(NSPR_COMPILERS) sh ../configure \
105 $(NSPR_CONFIGURE_OPTS) \
106 --with-dist-prefix='$(NSPR_PREFIX)' \
107 --with-dist-includedir='$(NSPR_PREFIX)/include'
109 build_nspr: $(NSPR_CONFIG_STATUS)
110 $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)
112 clobber_nspr: $(NSPR_CONFIG_STATUS)
113 $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) clobber
116 $(MAKE) -C $(CORE_DEPTH)/doc
119 $(MAKE) -C $(CORE_DEPTH)/doc clean
121 nss_RelEng_bld: import all
124 $(MAKE) -C pkg publish