1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/cmd/platlibs.mk Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,220 @@ 1.4 +# 1.5 +# This Source Code Form is subject to the terms of the Mozilla Public 1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + 1.9 +ifeq ($(BUILD_SUN_PKG), 1) 1.10 + 1.11 +# set RPATH-type linker instructions here so they can be used in the shared 1.12 +# version and in the mixed (static nss libs/shared NSPR libs) version. 1.13 + 1.14 +ifeq ($(OS_ARCH), SunOS) 1.15 +ifeq ($(USE_64), 1) 1.16 +EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64' 1.17 +else 1.18 +EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps' 1.19 +endif 1.20 +endif 1.21 + 1.22 +ifeq ($(OS_ARCH), Linux) 1.23 +ifeq ($(USE_64), 1) 1.24 +EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib' 1.25 +else 1.26 +EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib' 1.27 +endif 1.28 +endif 1.29 + 1.30 +endif # BUILD_SUN_PKG 1.31 + 1.32 +ifdef NSS_DISABLE_DBM 1.33 +DBMLIB = $(NULL) 1.34 +else 1.35 +DBMLIB = $(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) 1.36 +endif 1.37 + 1.38 +ifdef USE_STATIC_LIBS 1.39 + 1.40 +DEFINES += -DNSS_USE_STATIC_LIBS 1.41 +# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) 1.42 +ifndef NSS_USE_SYSTEM_FREEBL 1.43 +CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) 1.44 +SOFTOKENLIB=$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) 1.45 +else 1.46 +# Use the system installed freebl static library and set softoken one to empty. 1.47 +# Some tools need to link statically with freebl but none with softoken. Only 1.48 +# the softoken shared library, not the static one, is installed in the system. 1.49 +CRYPTOLIB=$(FREEBL_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) 1.50 +SOFTOKENLIB= 1.51 +EXTRA_SHARED_LIBS += \ 1.52 + -L$(SOFTOKEN_LIB_DIR) \ 1.53 + -lsoftokn3 \ 1.54 + $(NULL) 1.55 +endif 1.56 + 1.57 +PKIXLIB = \ 1.58 + $(DIST)/lib/$(LIB_PREFIX)pkixtop.$(LIB_SUFFIX) \ 1.59 + $(DIST)/lib/$(LIB_PREFIX)pkixutil.$(LIB_SUFFIX) \ 1.60 + $(DIST)/lib/$(LIB_PREFIX)pkixsystem.$(LIB_SUFFIX) \ 1.61 + $(DIST)/lib/$(LIB_PREFIX)pkixcrlsel.$(LIB_SUFFIX) \ 1.62 + $(DIST)/lib/$(LIB_PREFIX)pkixmodule.$(LIB_SUFFIX) \ 1.63 + $(DIST)/lib/$(LIB_PREFIX)pkixstore.$(LIB_SUFFIX) \ 1.64 + $(DIST)/lib/$(LIB_PREFIX)pkixparams.$(LIB_SUFFIX) \ 1.65 + $(DIST)/lib/$(LIB_PREFIX)pkixchecker.$(LIB_SUFFIX) \ 1.66 + $(DIST)/lib/$(LIB_PREFIX)pkixpki.$(LIB_SUFFIX) \ 1.67 + $(DIST)/lib/$(LIB_PREFIX)pkixtop.$(LIB_SUFFIX) \ 1.68 + $(DIST)/lib/$(LIB_PREFIX)pkixresults.$(LIB_SUFFIX) \ 1.69 + $(DIST)/lib/$(LIB_PREFIX)pkixcertsel.$(LIB_SUFFIX) 1.70 + 1.71 +# can't do this in manifest.mn because OS_ARCH isn't defined there. 1.72 +ifeq ($(OS_ARCH), WINNT) 1.73 + 1.74 +EXTRA_LIBS += \ 1.75 + $(DIST)/lib/$(LIB_PREFIX)smime.$(LIB_SUFFIX) \ 1.76 + $(DIST)/lib/$(LIB_PREFIX)ssl.$(LIB_SUFFIX) \ 1.77 + $(DIST)/lib/$(LIB_PREFIX)nss.$(LIB_SUFFIX) \ 1.78 + $(DIST)/lib/$(LIB_PREFIX)ssl.$(LIB_SUFFIX) \ 1.79 + $(DIST)/lib/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) \ 1.80 + $(DIST)/lib/$(LIB_PREFIX)pkcs12.$(LIB_SUFFIX) \ 1.81 + $(DIST)/lib/$(LIB_PREFIX)pkcs7.$(LIB_SUFFIX) \ 1.82 + $(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \ 1.83 + $(DIST)/lib/$(LIB_PREFIX)cryptohi.$(LIB_SUFFIX) \ 1.84 + $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ 1.85 + $(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \ 1.86 + $(SOFTOKENLIB) \ 1.87 + $(CRYPTOLIB) \ 1.88 + $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ 1.89 + $(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \ 1.90 + $(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \ 1.91 + $(PKIXLIB) \ 1.92 + $(DBMLIB) \ 1.93 + $(DIST)/lib/$(LIB_PREFIX)$(SQLITE_LIB_NAME).$(LIB_SUFFIX) \ 1.94 + $(DIST)/lib/$(LIB_PREFIX)nssutil3.$(LIB_SUFFIX) \ 1.95 + $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \ 1.96 + $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \ 1.97 + $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \ 1.98 + $(NULL) 1.99 + 1.100 +# $(PROGRAM) has NO explicit dependencies on $(OS_LIBS) 1.101 +#OS_LIBS += \ 1.102 + wsock32.lib \ 1.103 + winmm.lib \ 1.104 + $(NULL) 1.105 +else 1.106 + 1.107 +EXTRA_LIBS += \ 1.108 + $(DIST)/lib/$(LIB_PREFIX)smime.$(LIB_SUFFIX) \ 1.109 + $(DIST)/lib/$(LIB_PREFIX)ssl.$(LIB_SUFFIX) \ 1.110 + $(DIST)/lib/$(LIB_PREFIX)nss.$(LIB_SUFFIX) \ 1.111 + $(DIST)/lib/$(LIB_PREFIX)ssl.$(LIB_SUFFIX) \ 1.112 + $(DIST)/lib/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) \ 1.113 + $(DIST)/lib/$(LIB_PREFIX)pkcs12.$(LIB_SUFFIX) \ 1.114 + $(DIST)/lib/$(LIB_PREFIX)pkcs7.$(LIB_SUFFIX) \ 1.115 + $(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \ 1.116 + $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ 1.117 + $(DIST)/lib/$(LIB_PREFIX)cryptohi.$(LIB_SUFFIX) \ 1.118 + $(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \ 1.119 + $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ 1.120 + $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ 1.121 + $(SOFTOKENLIB) \ 1.122 + $(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \ 1.123 + $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ 1.124 + $(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \ 1.125 + $(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \ 1.126 + $(CRYPTOLIB) \ 1.127 + $(DBMLIB) \ 1.128 + $(PKIXLIB) \ 1.129 + $(DIST)/lib/$(LIB_PREFIX)nss.$(LIB_SUFFIX) \ 1.130 + $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ 1.131 + $(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \ 1.132 + $(NULL) 1.133 + 1.134 +ifeq ($(OS_ARCH), AIX) 1.135 +EXTRA_SHARED_LIBS += -brtl 1.136 +endif 1.137 + 1.138 +# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) 1.139 +# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX. 1.140 +EXTRA_SHARED_LIBS += \ 1.141 + -L$(DIST)/lib \ 1.142 + -l$(SQLITE_LIB_NAME) \ 1.143 + -L$(NSSUTIL_LIB_DIR) \ 1.144 + -lnssutil3 \ 1.145 + -L$(NSPR_LIB_DIR) \ 1.146 + -lplc4 \ 1.147 + -lplds4 \ 1.148 + -lnspr4 \ 1.149 + $(NULL) 1.150 +endif 1.151 + 1.152 +else # USE_STATIC_LIBS 1.153 +# can't do this in manifest.mn because OS_ARCH isn't defined there. 1.154 +ifeq ($(OS_ARCH), WINNT) 1.155 + 1.156 +# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) 1.157 +EXTRA_LIBS += \ 1.158 + $(DIST)/lib/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) \ 1.159 + $(DIST)/lib/$(IMPORT_LIB_PREFIX)nssutil3$(IMPORT_LIB_SUFFIX) \ 1.160 + $(DIST)/lib/$(IMPORT_LIB_PREFIX)smime3$(IMPORT_LIB_SUFFIX) \ 1.161 + $(DIST)/lib/$(IMPORT_LIB_PREFIX)ssl3$(IMPORT_LIB_SUFFIX) \ 1.162 + $(DIST)/lib/$(IMPORT_LIB_PREFIX)nss3$(IMPORT_LIB_SUFFIX) \ 1.163 + $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4$(IMPORT_LIB_SUFFIX) \ 1.164 + $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4$(IMPORT_LIB_SUFFIX) \ 1.165 + $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4$(IMPORT_LIB_SUFFIX) \ 1.166 + $(NULL) 1.167 + 1.168 +# $(PROGRAM) has NO explicit dependencies on $(OS_LIBS) 1.169 +#OS_LIBS += \ 1.170 + wsock32.lib \ 1.171 + winmm.lib \ 1.172 + $(NULL) 1.173 +else 1.174 + 1.175 +# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) 1.176 +EXTRA_LIBS += \ 1.177 + $(DIST)/lib/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) \ 1.178 + $(NULL) 1.179 + 1.180 +ifeq ($(OS_ARCH), AIX) 1.181 +EXTRA_SHARED_LIBS += -brtl 1.182 +endif 1.183 + 1.184 +# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) 1.185 +# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX. 1.186 +EXTRA_SHARED_LIBS += \ 1.187 + -L$(DIST)/lib \ 1.188 + -lssl3 \ 1.189 + -lsmime3 \ 1.190 + -lnss3 \ 1.191 + -L$(NSSUTIL_LIB_DIR) \ 1.192 + -lnssutil3 \ 1.193 + -L$(NSPR_LIB_DIR) \ 1.194 + -lplc4 \ 1.195 + -lplds4 \ 1.196 + -lnspr4 \ 1.197 + $(NULL) 1.198 +endif 1.199 + 1.200 +ifdef SOFTOKEN_LIB_DIR 1.201 +ifdef NSS_USE_SYSTEM_FREEBL 1.202 +EXTRA_SHARED_LIBS += -L$(SOFTOKEN_LIB_DIR) -lsoftokn3 1.203 +endif 1.204 +endif 1.205 + 1.206 +endif # USE_STATIC_LIBS 1.207 + 1.208 +# If a platform has a system freebl, set USE_SYSTEM_FREEBL to 1 and 1.209 +# FREEBL_LIBS to the linker command-line arguments for the system nss-util 1.210 +# (for example, -lfreebl3 on fedora) in the platform's config file in coreconf. 1.211 +ifdef NSS_USE_SYSTEM_FREEBL 1.212 +FREEBL_LIBS = $(FREEBL_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) 1.213 +EXTRA_LIBS += $(FREEBL_LIBS) 1.214 +endif 1.215 + 1.216 +# If a platform has a system zlib, set USE_SYSTEM_ZLIB to 1 and 1.217 +# ZLIB_LIBS to the linker command-line arguments for the system zlib 1.218 +# (for example, -lz) in the platform's config file in coreconf. 1.219 +ifndef USE_SYSTEM_ZLIB 1.220 +ZLIB_LIBS = $(DIST)/lib/$(LIB_PREFIX)zlib.$(LIB_SUFFIX) 1.221 +endif 1.222 + 1.223 +JAR_LIBS = $(DIST)/lib/$(LIB_PREFIX)jar.$(LIB_SUFFIX)