1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/Makefile Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,125 @@ 1.4 +#! gmake 1.5 +# 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +####################################################################### 1.11 +# (1) Include initial platform-independent assignments (MANDATORY). # 1.12 +####################################################################### 1.13 + 1.14 +include manifest.mn 1.15 + 1.16 +####################################################################### 1.17 +# (2) Include "global" configuration information. (OPTIONAL) # 1.18 +####################################################################### 1.19 + 1.20 +include $(CORE_DEPTH)/coreconf/config.mk 1.21 + 1.22 +####################################################################### 1.23 +# (3) Include "component" configuration information. (OPTIONAL) # 1.24 +####################################################################### 1.25 + 1.26 + 1.27 + 1.28 +####################################################################### 1.29 +# (4) Include "local" platform-dependent assignments (OPTIONAL). # 1.30 +####################################################################### 1.31 + 1.32 + 1.33 + 1.34 +####################################################################### 1.35 +# (5) Execute "global" rules. (OPTIONAL) # 1.36 +####################################################################### 1.37 + 1.38 +include $(CORE_DEPTH)/coreconf/rules.mk 1.39 + 1.40 +####################################################################### 1.41 +# (6) Execute "component" rules. (OPTIONAL) # 1.42 +####################################################################### 1.43 + 1.44 + 1.45 + 1.46 +####################################################################### 1.47 +# (7) Execute "local" rules. (OPTIONAL). # 1.48 +####################################################################### 1.49 + 1.50 +nss_build_all: build_nspr all 1.51 + 1.52 +nss_clean_all: clobber_nspr clobber 1.53 + 1.54 +NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/config.status 1.55 +NSPR_CONFIGURE = $(CORE_DEPTH)/../nspr/configure 1.56 + 1.57 +# 1.58 +# Translate coreconf build options to NSPR configure options. 1.59 +# 1.60 + 1.61 +ifeq ($(OS_TARGET),Android) 1.62 +NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) --target=arm-linux-androideabi --with-android-version=$(OS_TARGET_RELEASE) 1.63 +endif 1.64 +ifdef BUILD_OPT 1.65 +NSPR_CONFIGURE_OPTS += --disable-debug --enable-optimize 1.66 +endif 1.67 +ifdef USE_X32 1.68 +NSPR_CONFIGURE_OPTS += --enable-x32 1.69 +endif 1.70 +ifdef USE_64 1.71 +NSPR_CONFIGURE_OPTS += --enable-64bit 1.72 +endif 1.73 +ifeq ($(OS_TARGET),WIN95) 1.74 +NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95 1.75 +endif 1.76 +ifdef USE_DEBUG_RTL 1.77 +NSPR_CONFIGURE_OPTS += --enable-debug-rtl 1.78 +endif 1.79 +ifdef NS_USE_GCC 1.80 +NSPR_COMPILERS = CC=gcc CXX=g++ 1.81 +endif 1.82 + 1.83 +# 1.84 +# Some pwd commands on Windows (for example, the pwd 1.85 +# command in Cygwin) return a pathname that begins 1.86 +# with a (forward) slash. When such a pathname is 1.87 +# passed to Windows build tools (for example, cl), it 1.88 +# is mistaken as a command-line option. If that is the case, 1.89 +# we use a relative pathname as NSPR's prefix on Windows. 1.90 +# 1.91 + 1.92 +USEABSPATH="YES" 1.93 +ifeq (,$(filter-out WIN%,$(OS_TARGET))) 1.94 +ifeq (,$(findstring :,$(shell pwd))) 1.95 +USEABSPATH="NO" 1.96 +endif 1.97 +endif 1.98 +ifeq ($(USEABSPATH),"YES") 1.99 +NSPR_PREFIX = $(shell pwd)/../dist/$(OBJDIR_NAME) 1.100 +else 1.101 +NSPR_PREFIX = $$(topsrcdir)/../dist/$(OBJDIR_NAME) 1.102 +endif 1.103 + 1.104 +$(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE) 1.105 + mkdir -p $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) 1.106 + cd $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) ; \ 1.107 + $(NSPR_COMPILERS) sh ../configure \ 1.108 + $(NSPR_CONFIGURE_OPTS) \ 1.109 + --with-dist-prefix='$(NSPR_PREFIX)' \ 1.110 + --with-dist-includedir='$(NSPR_PREFIX)/include' 1.111 + 1.112 +build_nspr: $(NSPR_CONFIG_STATUS) 1.113 + $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) 1.114 + 1.115 +clobber_nspr: $(NSPR_CONFIG_STATUS) 1.116 + $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) clobber 1.117 + 1.118 +build_docs: 1.119 + $(MAKE) -C $(CORE_DEPTH)/doc 1.120 + 1.121 +clean_docs: 1.122 + $(MAKE) -C $(CORE_DEPTH)/doc clean 1.123 + 1.124 +nss_RelEng_bld: import all 1.125 + 1.126 +package: 1.127 + $(MAKE) -C pkg publish 1.128 +