Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
michael@0 | 1 | #! gmake |
michael@0 | 2 | # |
michael@0 | 3 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 6 | |
michael@0 | 7 | ####################################################################### |
michael@0 | 8 | # (1) Include initial platform-independent assignments (MANDATORY). # |
michael@0 | 9 | ####################################################################### |
michael@0 | 10 | |
michael@0 | 11 | include manifest.mn |
michael@0 | 12 | |
michael@0 | 13 | ####################################################################### |
michael@0 | 14 | # (2) Include "global" configuration information. (OPTIONAL) # |
michael@0 | 15 | ####################################################################### |
michael@0 | 16 | |
michael@0 | 17 | include $(CORE_DEPTH)/coreconf/config.mk |
michael@0 | 18 | |
michael@0 | 19 | ####################################################################### |
michael@0 | 20 | # (3) Include "component" configuration information. (OPTIONAL) # |
michael@0 | 21 | ####################################################################### |
michael@0 | 22 | |
michael@0 | 23 | |
michael@0 | 24 | |
michael@0 | 25 | ####################################################################### |
michael@0 | 26 | # (4) Include "local" platform-dependent assignments (OPTIONAL). # |
michael@0 | 27 | ####################################################################### |
michael@0 | 28 | |
michael@0 | 29 | |
michael@0 | 30 | |
michael@0 | 31 | ####################################################################### |
michael@0 | 32 | # (5) Execute "global" rules. (OPTIONAL) # |
michael@0 | 33 | ####################################################################### |
michael@0 | 34 | |
michael@0 | 35 | include $(CORE_DEPTH)/coreconf/rules.mk |
michael@0 | 36 | |
michael@0 | 37 | ####################################################################### |
michael@0 | 38 | # (6) Execute "component" rules. (OPTIONAL) # |
michael@0 | 39 | ####################################################################### |
michael@0 | 40 | |
michael@0 | 41 | |
michael@0 | 42 | |
michael@0 | 43 | ####################################################################### |
michael@0 | 44 | # (7) Execute "local" rules. (OPTIONAL). # |
michael@0 | 45 | ####################################################################### |
michael@0 | 46 | |
michael@0 | 47 | nss_build_all: build_nspr all |
michael@0 | 48 | |
michael@0 | 49 | nss_clean_all: clobber_nspr clobber |
michael@0 | 50 | |
michael@0 | 51 | NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/config.status |
michael@0 | 52 | NSPR_CONFIGURE = $(CORE_DEPTH)/../nspr/configure |
michael@0 | 53 | |
michael@0 | 54 | # |
michael@0 | 55 | # Translate coreconf build options to NSPR configure options. |
michael@0 | 56 | # |
michael@0 | 57 | |
michael@0 | 58 | ifeq ($(OS_TARGET),Android) |
michael@0 | 59 | NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) --target=arm-linux-androideabi --with-android-version=$(OS_TARGET_RELEASE) |
michael@0 | 60 | endif |
michael@0 | 61 | ifdef BUILD_OPT |
michael@0 | 62 | NSPR_CONFIGURE_OPTS += --disable-debug --enable-optimize |
michael@0 | 63 | endif |
michael@0 | 64 | ifdef USE_X32 |
michael@0 | 65 | NSPR_CONFIGURE_OPTS += --enable-x32 |
michael@0 | 66 | endif |
michael@0 | 67 | ifdef USE_64 |
michael@0 | 68 | NSPR_CONFIGURE_OPTS += --enable-64bit |
michael@0 | 69 | endif |
michael@0 | 70 | ifeq ($(OS_TARGET),WIN95) |
michael@0 | 71 | NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95 |
michael@0 | 72 | endif |
michael@0 | 73 | ifdef USE_DEBUG_RTL |
michael@0 | 74 | NSPR_CONFIGURE_OPTS += --enable-debug-rtl |
michael@0 | 75 | endif |
michael@0 | 76 | ifdef NS_USE_GCC |
michael@0 | 77 | NSPR_COMPILERS = CC=gcc CXX=g++ |
michael@0 | 78 | endif |
michael@0 | 79 | |
michael@0 | 80 | # |
michael@0 | 81 | # Some pwd commands on Windows (for example, the pwd |
michael@0 | 82 | # command in Cygwin) return a pathname that begins |
michael@0 | 83 | # with a (forward) slash. When such a pathname is |
michael@0 | 84 | # passed to Windows build tools (for example, cl), it |
michael@0 | 85 | # is mistaken as a command-line option. If that is the case, |
michael@0 | 86 | # we use a relative pathname as NSPR's prefix on Windows. |
michael@0 | 87 | # |
michael@0 | 88 | |
michael@0 | 89 | USEABSPATH="YES" |
michael@0 | 90 | ifeq (,$(filter-out WIN%,$(OS_TARGET))) |
michael@0 | 91 | ifeq (,$(findstring :,$(shell pwd))) |
michael@0 | 92 | USEABSPATH="NO" |
michael@0 | 93 | endif |
michael@0 | 94 | endif |
michael@0 | 95 | ifeq ($(USEABSPATH),"YES") |
michael@0 | 96 | NSPR_PREFIX = $(shell pwd)/../dist/$(OBJDIR_NAME) |
michael@0 | 97 | else |
michael@0 | 98 | NSPR_PREFIX = $$(topsrcdir)/../dist/$(OBJDIR_NAME) |
michael@0 | 99 | endif |
michael@0 | 100 | |
michael@0 | 101 | $(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE) |
michael@0 | 102 | mkdir -p $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) |
michael@0 | 103 | cd $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) ; \ |
michael@0 | 104 | $(NSPR_COMPILERS) sh ../configure \ |
michael@0 | 105 | $(NSPR_CONFIGURE_OPTS) \ |
michael@0 | 106 | --with-dist-prefix='$(NSPR_PREFIX)' \ |
michael@0 | 107 | --with-dist-includedir='$(NSPR_PREFIX)/include' |
michael@0 | 108 | |
michael@0 | 109 | build_nspr: $(NSPR_CONFIG_STATUS) |
michael@0 | 110 | $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) |
michael@0 | 111 | |
michael@0 | 112 | clobber_nspr: $(NSPR_CONFIG_STATUS) |
michael@0 | 113 | $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) clobber |
michael@0 | 114 | |
michael@0 | 115 | build_docs: |
michael@0 | 116 | $(MAKE) -C $(CORE_DEPTH)/doc |
michael@0 | 117 | |
michael@0 | 118 | clean_docs: |
michael@0 | 119 | $(MAKE) -C $(CORE_DEPTH)/doc clean |
michael@0 | 120 | |
michael@0 | 121 | nss_RelEng_bld: import all |
michael@0 | 122 | |
michael@0 | 123 | package: |
michael@0 | 124 | $(MAKE) -C pkg publish |
michael@0 | 125 |