michael@0: #! gmake michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: ####################################################################### michael@0: # (1) Include initial platform-independent assignments (MANDATORY). # michael@0: ####################################################################### michael@0: michael@0: include manifest.mn michael@0: michael@0: ####################################################################### michael@0: # (2) Include "global" configuration information. (OPTIONAL) # michael@0: ####################################################################### michael@0: michael@0: include $(CORE_DEPTH)/coreconf/config.mk michael@0: michael@0: ####################################################################### michael@0: # (3) Include "component" configuration information. (OPTIONAL) # michael@0: ####################################################################### michael@0: michael@0: michael@0: michael@0: ####################################################################### michael@0: # (4) Include "local" platform-dependent assignments (OPTIONAL). # michael@0: ####################################################################### michael@0: michael@0: michael@0: michael@0: ####################################################################### michael@0: # (5) Execute "global" rules. (OPTIONAL) # michael@0: ####################################################################### michael@0: michael@0: include $(CORE_DEPTH)/coreconf/rules.mk michael@0: michael@0: ####################################################################### michael@0: # (6) Execute "component" rules. (OPTIONAL) # michael@0: ####################################################################### michael@0: michael@0: michael@0: michael@0: ####################################################################### michael@0: # (7) Execute "local" rules. (OPTIONAL). # michael@0: ####################################################################### michael@0: michael@0: nss_build_all: build_nspr all michael@0: michael@0: nss_clean_all: clobber_nspr clobber michael@0: michael@0: NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/config.status michael@0: NSPR_CONFIGURE = $(CORE_DEPTH)/../nspr/configure michael@0: michael@0: # michael@0: # Translate coreconf build options to NSPR configure options. michael@0: # michael@0: michael@0: ifeq ($(OS_TARGET),Android) michael@0: NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) --target=arm-linux-androideabi --with-android-version=$(OS_TARGET_RELEASE) michael@0: endif michael@0: ifdef BUILD_OPT michael@0: NSPR_CONFIGURE_OPTS += --disable-debug --enable-optimize michael@0: endif michael@0: ifdef USE_X32 michael@0: NSPR_CONFIGURE_OPTS += --enable-x32 michael@0: endif michael@0: ifdef USE_64 michael@0: NSPR_CONFIGURE_OPTS += --enable-64bit michael@0: endif michael@0: ifeq ($(OS_TARGET),WIN95) michael@0: NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95 michael@0: endif michael@0: ifdef USE_DEBUG_RTL michael@0: NSPR_CONFIGURE_OPTS += --enable-debug-rtl michael@0: endif michael@0: ifdef NS_USE_GCC michael@0: NSPR_COMPILERS = CC=gcc CXX=g++ michael@0: endif michael@0: michael@0: # michael@0: # Some pwd commands on Windows (for example, the pwd michael@0: # command in Cygwin) return a pathname that begins michael@0: # with a (forward) slash. When such a pathname is michael@0: # passed to Windows build tools (for example, cl), it michael@0: # is mistaken as a command-line option. If that is the case, michael@0: # we use a relative pathname as NSPR's prefix on Windows. michael@0: # michael@0: michael@0: USEABSPATH="YES" michael@0: ifeq (,$(filter-out WIN%,$(OS_TARGET))) michael@0: ifeq (,$(findstring :,$(shell pwd))) michael@0: USEABSPATH="NO" michael@0: endif michael@0: endif michael@0: ifeq ($(USEABSPATH),"YES") michael@0: NSPR_PREFIX = $(shell pwd)/../dist/$(OBJDIR_NAME) michael@0: else michael@0: NSPR_PREFIX = $$(topsrcdir)/../dist/$(OBJDIR_NAME) michael@0: endif michael@0: michael@0: $(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE) michael@0: mkdir -p $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) michael@0: cd $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) ; \ michael@0: $(NSPR_COMPILERS) sh ../configure \ michael@0: $(NSPR_CONFIGURE_OPTS) \ michael@0: --with-dist-prefix='$(NSPR_PREFIX)' \ michael@0: --with-dist-includedir='$(NSPR_PREFIX)/include' michael@0: michael@0: build_nspr: $(NSPR_CONFIG_STATUS) michael@0: $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) michael@0: michael@0: clobber_nspr: $(NSPR_CONFIG_STATUS) michael@0: $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) clobber michael@0: michael@0: build_docs: michael@0: $(MAKE) -C $(CORE_DEPTH)/doc michael@0: michael@0: clean_docs: michael@0: $(MAKE) -C $(CORE_DEPTH)/doc clean michael@0: michael@0: nss_RelEng_bld: import all michael@0: michael@0: package: michael@0: $(MAKE) -C pkg publish michael@0: