Blame nss/Makefile

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