Makefile (2983B)
1 #! gmake 2 # 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/. 6 7 CORE_DEPTH = .. 8 DEPTH = .. 9 10 include $(CORE_DEPTH)/coreconf/config.mk 11 12 # This "jungle" of conditionals evaluates which DIRS to build! 13 # The main reason for it is AFAIK /automation/taskcluster/scripts/split.sh 14 # 15 # The fundamental organisation is: 16 # if NSS_BUILD_UTIL_ONLY 17 # else 18 # if NSS_BUILD_SOFTOKEN_ONLY 19 # else # build "all" the rest of NSS 20 # endif 21 # 22 # But there is even some build (NSS_BUILD_WITHOUT_SOFTOKEN), which 23 # depends on a previous partial build! 24 # 25 # FWIW, the dependencies are sorted and "compacted" instead of single 26 # lines for smaller patches, as these probably won't change much and 27 # it's easier to read this way. 28 29 # Building softoken (and freebl) only requires that the paths 30 # to the locations where the util headers and libraries were 31 # previously installed by a prior util-only build - likely in 32 # in a system location that varies with the distribution. This 33 # cannot be addressed here and requires that downstream package 34 # mantainers add suitable modifications. Building full nss will 35 # not have that problem as everything is available. 36 37 ifndef USE_SYSTEM_ZLIB 38 ZLIB_SRCDIR = zlib 39 endif 40 41 ifndef MOZILLA_CLIENT 42 ifndef NSS_USE_SYSTEM_SQLITE 43 SQLITE_SRCDIR = sqlite 44 endif 45 46 ifeq ($(OS_ARCH),Linux) 47 SYSINIT_SRCDIR = sysinit 48 endif 49 endif # MOZILLA_CLIENT 50 51 ifndef NSS_DISABLE_DBM 52 DBM_SRCDIR = dbm 53 endif 54 55 ifndef NSS_DISABLE_LIBPKIX 56 LIBPKIX_SRCDIR = libpkix 57 endif 58 59 ifeq ($(NSS_BUILD_UTIL_ONLY),1) 60 UTIL_SRCDIR = util 61 62 else 63 ifeq ($(NSS_BUILD_SOFTOKEN_ONLY),1) 64 FREEBL_SRCDIR = freebl 65 SOFTOKEN_SRCDIR = softoken 66 else 67 # Not included when building nss without softoken 68 # This build type uses the build results of the prior 69 # NSS_BUILD_UTIL_ONLY and NSS_BUILD_SOFTOKEN_ONLY builds 70 ifneq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1) 71 FREEBL_SRCDIR = freebl 72 SOFTOKEN_SRCDIR = softoken 73 UTIL_SRCDIR = util 74 endif 75 endif 76 77 SOFTOKEN_SRCDIRS = \ 78 $(DBM_SRCDIR) $(FREEBL_SRCDIR) $(SOFTOKEN_SRCDIR) \ 79 $(SQLITE_SRCDIR) $(NULL) 80 81 ifneq (,$(FREEBL_SRCDIR)) 82 $(FREEBL_SRCDIR): $(UTIL_SRCDIR) 83 endif 84 85 ifneq (,$(SOFTOKEN_SRCDIR)) 86 $(SOFTOKEN_SRCDIR): $(DBM_SRCDIR) $(FREEBL_SRCDIR) $(SQLITE_SRCDIR) $(UTIL_SRCDIR) 87 endif 88 89 ifndef NSS_BUILD_SOFTOKEN_ONLY 90 NSS_SRCDIRS = \ 91 base certdb certhigh ckfw crmf cryptohi dev jar $(LIBPKIX_SRCDIR) \ 92 nss pk11wrap pkcs12 pkcs7 pki smime ssl $(SYSINIT_SRCDIR) $(ZLIB_SRCDIR) 93 94 ifneq (,$(SYSINIT_SRCDIR)) 95 $(SYSINIT_SRCDIR): $(UTIL_SRCDIR) 96 endif 97 98 nss: base certdb certhigh cryptohi dev $(LIBPKIX_SRCDIR) pk11wrap pki $(UTIL_SRCDIR) 99 smime: nss pkcs7 pkcs12 100 ssl: nss 101 ckfw: nss 102 103 endif # !NSS_BUILD_SOFTOKEN_ONLY 104 endif # !NSS_BUILD_UTIL_ONLY 105 106 DIRS = \ 107 $(NSS_SRCDIRS) $(SOFTOKEN_SRCDIRS) $(UTIL_SRCDIR) $(NULL) 108 109 include $(CORE_DEPTH)/coreconf/rules.mk