Makefile (3392B)
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 ####################################################################### 8 # (1) Include initial platform-independent assignments (MANDATORY). # 9 ####################################################################### 10 11 include manifest.mn 12 13 ####################################################################### 14 # (2) Include "global" configuration information. (OPTIONAL) # 15 ####################################################################### 16 17 include $(CORE_DEPTH)/coreconf/config.mk 18 19 ####################################################################### 20 # (3) Include "component" configuration information. (OPTIONAL) # 21 ####################################################################### 22 23 ####################################################################### 24 # (4) Include "local" platform-dependent assignments (OPTIONAL). # 25 ####################################################################### 26 27 28 EXTRA_LIBS += \ 29 $(DIST)/lib/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) \ 30 $(NULL) 31 32 # SHLIBSign cannot depend on freebl or above as it's used to sign them. 33 # use a minimal set of required libraries to compile 34 ifeq ($(OS_ARCH), WINNT) 35 36 EXTRA_LIBS += \ 37 $(NSSUTIL_LIB_DIR)/$(LIB_PREFIX)nssutil3.$(LIB_SUFFIX) \ 38 $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \ 39 $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \ 40 $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \ 41 $(NULL) 42 43 else 44 45 EXTRA_SHARED_LIBS += \ 46 -L$(NSSUTIL_LIB_DIR) \ 47 -lnssutil3 \ 48 -L$(NSPR_LIB_DIR) \ 49 -lplc4 \ 50 -lplds4 \ 51 -lnspr4 \ 52 $(NULL) 53 54 endif 55 56 57 # sign any and all shared libraries that contain the word freebl 58 ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1) 59 CHECKLIBS = 60 CHECKLOC = 61 else 62 CHECKLIBS = $(DIST)/lib/$(DLL_PREFIX)softokn3.$(DLL_SUFFIX) 63 CHECKLIBS += $(wildcard $(DIST)/lib/$(DLL_PREFIX)freebl*3.$(DLL_SUFFIX)) 64 ifndef NSS_DISABLE_DBM 65 CHECKLIBS += $(DIST)/lib/$(DLL_PREFIX)nssdbm3.$(DLL_SUFFIX) 66 endif 67 CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk) 68 69 MD_LIB_RELEASE_FILES = $(CHECKLOC) 70 ALL_TRASH += $(CHECKLOC) 71 endif 72 73 ####################################################################### 74 # (5) Execute "global" rules. (OPTIONAL) # 75 ####################################################################### 76 77 include $(CORE_DEPTH)/coreconf/rules.mk 78 79 ####################################################################### 80 # (6) Execute "component" rules. (OPTIONAL) # 81 ####################################################################### 82 83 84 ####################################################################### 85 # (7) Execute "local" rules. (OPTIONAL). # 86 ####################################################################### 87 88 89 include ../platrules.mk 90 91 SRCDIR = $(call core_abspath,.) 92 93 %.chk: %.$(DLL_SUFFIX) 94 ifeq ($(CROSS_COMPILE),1) 95 # do nothing 96 else 97 cd $(OBJDIR) ; sh $(SRCDIR)/sign.sh $(call core_abspath,$(DIST)) \ 98 $(call core_abspath,$(OBJDIR)) $(OS_TARGET) \ 99 $(call core_abspath,$(NSPR_LIB_DIR)) $(call core_abspath,$<) 100 endif 101 102 103 libs: install 104 ifdef CHECKLOC 105 $(MAKE) $(CHECKLOC) 106 endif