Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
michael@0 | 1 | # |
michael@0 | 2 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 5 | |
michael@0 | 6 | ifeq ($(BUILD_SUN_PKG), 1) |
michael@0 | 7 | |
michael@0 | 8 | # set RPATH-type linker instructions here so they can be used in the shared |
michael@0 | 9 | # version and in the mixed (static nss libs/shared NSPR libs) version. |
michael@0 | 10 | |
michael@0 | 11 | ifeq ($(OS_ARCH), SunOS) |
michael@0 | 12 | ifeq ($(USE_64), 1) |
michael@0 | 13 | EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64' |
michael@0 | 14 | else |
michael@0 | 15 | EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps' |
michael@0 | 16 | endif |
michael@0 | 17 | endif |
michael@0 | 18 | |
michael@0 | 19 | ifeq ($(OS_ARCH), Linux) |
michael@0 | 20 | ifeq ($(USE_64), 1) |
michael@0 | 21 | EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib' |
michael@0 | 22 | else |
michael@0 | 23 | EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib' |
michael@0 | 24 | endif |
michael@0 | 25 | endif |
michael@0 | 26 | |
michael@0 | 27 | endif # BUILD_SUN_PKG |
michael@0 | 28 | |
michael@0 | 29 | ifdef NSS_DISABLE_DBM |
michael@0 | 30 | DBMLIB = $(NULL) |
michael@0 | 31 | else |
michael@0 | 32 | DBMLIB = $(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) |
michael@0 | 33 | endif |
michael@0 | 34 | |
michael@0 | 35 | ifdef USE_STATIC_LIBS |
michael@0 | 36 | |
michael@0 | 37 | DEFINES += -DNSS_USE_STATIC_LIBS |
michael@0 | 38 | # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) |
michael@0 | 39 | ifndef NSS_USE_SYSTEM_FREEBL |
michael@0 | 40 | CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) |
michael@0 | 41 | SOFTOKENLIB=$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) |
michael@0 | 42 | else |
michael@0 | 43 | # Use the system installed freebl static library and set softoken one to empty. |
michael@0 | 44 | # Some tools need to link statically with freebl but none with softoken. Only |
michael@0 | 45 | # the softoken shared library, not the static one, is installed in the system. |
michael@0 | 46 | CRYPTOLIB=$(FREEBL_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) |
michael@0 | 47 | SOFTOKENLIB= |
michael@0 | 48 | EXTRA_SHARED_LIBS += \ |
michael@0 | 49 | -L$(SOFTOKEN_LIB_DIR) \ |
michael@0 | 50 | -lsoftokn3 \ |
michael@0 | 51 | $(NULL) |
michael@0 | 52 | endif |
michael@0 | 53 | |
michael@0 | 54 | PKIXLIB = \ |
michael@0 | 55 | $(DIST)/lib/$(LIB_PREFIX)pkixtop.$(LIB_SUFFIX) \ |
michael@0 | 56 | $(DIST)/lib/$(LIB_PREFIX)pkixutil.$(LIB_SUFFIX) \ |
michael@0 | 57 | $(DIST)/lib/$(LIB_PREFIX)pkixsystem.$(LIB_SUFFIX) \ |
michael@0 | 58 | $(DIST)/lib/$(LIB_PREFIX)pkixcrlsel.$(LIB_SUFFIX) \ |
michael@0 | 59 | $(DIST)/lib/$(LIB_PREFIX)pkixmodule.$(LIB_SUFFIX) \ |
michael@0 | 60 | $(DIST)/lib/$(LIB_PREFIX)pkixstore.$(LIB_SUFFIX) \ |
michael@0 | 61 | $(DIST)/lib/$(LIB_PREFIX)pkixparams.$(LIB_SUFFIX) \ |
michael@0 | 62 | $(DIST)/lib/$(LIB_PREFIX)pkixchecker.$(LIB_SUFFIX) \ |
michael@0 | 63 | $(DIST)/lib/$(LIB_PREFIX)pkixpki.$(LIB_SUFFIX) \ |
michael@0 | 64 | $(DIST)/lib/$(LIB_PREFIX)pkixtop.$(LIB_SUFFIX) \ |
michael@0 | 65 | $(DIST)/lib/$(LIB_PREFIX)pkixresults.$(LIB_SUFFIX) \ |
michael@0 | 66 | $(DIST)/lib/$(LIB_PREFIX)pkixcertsel.$(LIB_SUFFIX) |
michael@0 | 67 | |
michael@0 | 68 | # can't do this in manifest.mn because OS_ARCH isn't defined there. |
michael@0 | 69 | ifeq ($(OS_ARCH), WINNT) |
michael@0 | 70 | |
michael@0 | 71 | EXTRA_LIBS += \ |
michael@0 | 72 | $(DIST)/lib/$(LIB_PREFIX)smime.$(LIB_SUFFIX) \ |
michael@0 | 73 | $(DIST)/lib/$(LIB_PREFIX)ssl.$(LIB_SUFFIX) \ |
michael@0 | 74 | $(DIST)/lib/$(LIB_PREFIX)nss.$(LIB_SUFFIX) \ |
michael@0 | 75 | $(DIST)/lib/$(LIB_PREFIX)ssl.$(LIB_SUFFIX) \ |
michael@0 | 76 | $(DIST)/lib/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) \ |
michael@0 | 77 | $(DIST)/lib/$(LIB_PREFIX)pkcs12.$(LIB_SUFFIX) \ |
michael@0 | 78 | $(DIST)/lib/$(LIB_PREFIX)pkcs7.$(LIB_SUFFIX) \ |
michael@0 | 79 | $(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \ |
michael@0 | 80 | $(DIST)/lib/$(LIB_PREFIX)cryptohi.$(LIB_SUFFIX) \ |
michael@0 | 81 | $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ |
michael@0 | 82 | $(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \ |
michael@0 | 83 | $(SOFTOKENLIB) \ |
michael@0 | 84 | $(CRYPTOLIB) \ |
michael@0 | 85 | $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ |
michael@0 | 86 | $(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \ |
michael@0 | 87 | $(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \ |
michael@0 | 88 | $(PKIXLIB) \ |
michael@0 | 89 | $(DBMLIB) \ |
michael@0 | 90 | $(DIST)/lib/$(LIB_PREFIX)$(SQLITE_LIB_NAME).$(LIB_SUFFIX) \ |
michael@0 | 91 | $(DIST)/lib/$(LIB_PREFIX)nssutil3.$(LIB_SUFFIX) \ |
michael@0 | 92 | $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \ |
michael@0 | 93 | $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \ |
michael@0 | 94 | $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \ |
michael@0 | 95 | $(NULL) |
michael@0 | 96 | |
michael@0 | 97 | # $(PROGRAM) has NO explicit dependencies on $(OS_LIBS) |
michael@0 | 98 | #OS_LIBS += \ |
michael@0 | 99 | wsock32.lib \ |
michael@0 | 100 | winmm.lib \ |
michael@0 | 101 | $(NULL) |
michael@0 | 102 | else |
michael@0 | 103 | |
michael@0 | 104 | EXTRA_LIBS += \ |
michael@0 | 105 | $(DIST)/lib/$(LIB_PREFIX)smime.$(LIB_SUFFIX) \ |
michael@0 | 106 | $(DIST)/lib/$(LIB_PREFIX)ssl.$(LIB_SUFFIX) \ |
michael@0 | 107 | $(DIST)/lib/$(LIB_PREFIX)nss.$(LIB_SUFFIX) \ |
michael@0 | 108 | $(DIST)/lib/$(LIB_PREFIX)ssl.$(LIB_SUFFIX) \ |
michael@0 | 109 | $(DIST)/lib/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) \ |
michael@0 | 110 | $(DIST)/lib/$(LIB_PREFIX)pkcs12.$(LIB_SUFFIX) \ |
michael@0 | 111 | $(DIST)/lib/$(LIB_PREFIX)pkcs7.$(LIB_SUFFIX) \ |
michael@0 | 112 | $(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \ |
michael@0 | 113 | $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ |
michael@0 | 114 | $(DIST)/lib/$(LIB_PREFIX)cryptohi.$(LIB_SUFFIX) \ |
michael@0 | 115 | $(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \ |
michael@0 | 116 | $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ |
michael@0 | 117 | $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ |
michael@0 | 118 | $(SOFTOKENLIB) \ |
michael@0 | 119 | $(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \ |
michael@0 | 120 | $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ |
michael@0 | 121 | $(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \ |
michael@0 | 122 | $(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \ |
michael@0 | 123 | $(CRYPTOLIB) \ |
michael@0 | 124 | $(DBMLIB) \ |
michael@0 | 125 | $(PKIXLIB) \ |
michael@0 | 126 | $(DIST)/lib/$(LIB_PREFIX)nss.$(LIB_SUFFIX) \ |
michael@0 | 127 | $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ |
michael@0 | 128 | $(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \ |
michael@0 | 129 | $(NULL) |
michael@0 | 130 | |
michael@0 | 131 | ifeq ($(OS_ARCH), AIX) |
michael@0 | 132 | EXTRA_SHARED_LIBS += -brtl |
michael@0 | 133 | endif |
michael@0 | 134 | |
michael@0 | 135 | # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) |
michael@0 | 136 | # $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX. |
michael@0 | 137 | EXTRA_SHARED_LIBS += \ |
michael@0 | 138 | -L$(DIST)/lib \ |
michael@0 | 139 | -l$(SQLITE_LIB_NAME) \ |
michael@0 | 140 | -L$(NSSUTIL_LIB_DIR) \ |
michael@0 | 141 | -lnssutil3 \ |
michael@0 | 142 | -L$(NSPR_LIB_DIR) \ |
michael@0 | 143 | -lplc4 \ |
michael@0 | 144 | -lplds4 \ |
michael@0 | 145 | -lnspr4 \ |
michael@0 | 146 | $(NULL) |
michael@0 | 147 | endif |
michael@0 | 148 | |
michael@0 | 149 | else # USE_STATIC_LIBS |
michael@0 | 150 | # can't do this in manifest.mn because OS_ARCH isn't defined there. |
michael@0 | 151 | ifeq ($(OS_ARCH), WINNT) |
michael@0 | 152 | |
michael@0 | 153 | # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) |
michael@0 | 154 | EXTRA_LIBS += \ |
michael@0 | 155 | $(DIST)/lib/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) \ |
michael@0 | 156 | $(DIST)/lib/$(IMPORT_LIB_PREFIX)nssutil3$(IMPORT_LIB_SUFFIX) \ |
michael@0 | 157 | $(DIST)/lib/$(IMPORT_LIB_PREFIX)smime3$(IMPORT_LIB_SUFFIX) \ |
michael@0 | 158 | $(DIST)/lib/$(IMPORT_LIB_PREFIX)ssl3$(IMPORT_LIB_SUFFIX) \ |
michael@0 | 159 | $(DIST)/lib/$(IMPORT_LIB_PREFIX)nss3$(IMPORT_LIB_SUFFIX) \ |
michael@0 | 160 | $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4$(IMPORT_LIB_SUFFIX) \ |
michael@0 | 161 | $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4$(IMPORT_LIB_SUFFIX) \ |
michael@0 | 162 | $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4$(IMPORT_LIB_SUFFIX) \ |
michael@0 | 163 | $(NULL) |
michael@0 | 164 | |
michael@0 | 165 | # $(PROGRAM) has NO explicit dependencies on $(OS_LIBS) |
michael@0 | 166 | #OS_LIBS += \ |
michael@0 | 167 | wsock32.lib \ |
michael@0 | 168 | winmm.lib \ |
michael@0 | 169 | $(NULL) |
michael@0 | 170 | else |
michael@0 | 171 | |
michael@0 | 172 | # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) |
michael@0 | 173 | EXTRA_LIBS += \ |
michael@0 | 174 | $(DIST)/lib/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) \ |
michael@0 | 175 | $(NULL) |
michael@0 | 176 | |
michael@0 | 177 | ifeq ($(OS_ARCH), AIX) |
michael@0 | 178 | EXTRA_SHARED_LIBS += -brtl |
michael@0 | 179 | endif |
michael@0 | 180 | |
michael@0 | 181 | # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) |
michael@0 | 182 | # $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX. |
michael@0 | 183 | EXTRA_SHARED_LIBS += \ |
michael@0 | 184 | -L$(DIST)/lib \ |
michael@0 | 185 | -lssl3 \ |
michael@0 | 186 | -lsmime3 \ |
michael@0 | 187 | -lnss3 \ |
michael@0 | 188 | -L$(NSSUTIL_LIB_DIR) \ |
michael@0 | 189 | -lnssutil3 \ |
michael@0 | 190 | -L$(NSPR_LIB_DIR) \ |
michael@0 | 191 | -lplc4 \ |
michael@0 | 192 | -lplds4 \ |
michael@0 | 193 | -lnspr4 \ |
michael@0 | 194 | $(NULL) |
michael@0 | 195 | endif |
michael@0 | 196 | |
michael@0 | 197 | ifdef SOFTOKEN_LIB_DIR |
michael@0 | 198 | ifdef NSS_USE_SYSTEM_FREEBL |
michael@0 | 199 | EXTRA_SHARED_LIBS += -L$(SOFTOKEN_LIB_DIR) -lsoftokn3 |
michael@0 | 200 | endif |
michael@0 | 201 | endif |
michael@0 | 202 | |
michael@0 | 203 | endif # USE_STATIC_LIBS |
michael@0 | 204 | |
michael@0 | 205 | # If a platform has a system freebl, set USE_SYSTEM_FREEBL to 1 and |
michael@0 | 206 | # FREEBL_LIBS to the linker command-line arguments for the system nss-util |
michael@0 | 207 | # (for example, -lfreebl3 on fedora) in the platform's config file in coreconf. |
michael@0 | 208 | ifdef NSS_USE_SYSTEM_FREEBL |
michael@0 | 209 | FREEBL_LIBS = $(FREEBL_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) |
michael@0 | 210 | EXTRA_LIBS += $(FREEBL_LIBS) |
michael@0 | 211 | endif |
michael@0 | 212 | |
michael@0 | 213 | # If a platform has a system zlib, set USE_SYSTEM_ZLIB to 1 and |
michael@0 | 214 | # ZLIB_LIBS to the linker command-line arguments for the system zlib |
michael@0 | 215 | # (for example, -lz) in the platform's config file in coreconf. |
michael@0 | 216 | ifndef USE_SYSTEM_ZLIB |
michael@0 | 217 | ZLIB_LIBS = $(DIST)/lib/$(LIB_PREFIX)zlib.$(LIB_SUFFIX) |
michael@0 | 218 | endif |
michael@0 | 219 | |
michael@0 | 220 | JAR_LIBS = $(DIST)/lib/$(LIB_PREFIX)jar.$(LIB_SUFFIX) |