2 # ***** BEGIN LICENSE BLOCK *****
3 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
8 # http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
15 # The Original Code is the Netscape security libraries.
17 # The Initial Developer of the Original Code is
18 # Netscape Communications Corporation.
19 # Portions created by the Initial Developer are Copyright (C) 1994-2000
20 # the Initial Developer. All Rights Reserved.
24 # Alternatively, the contents of this file may be used under the terms of
25 # either the GNU General Public License Version 2 or later (the "GPL"), or
26 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
38 # set RPATH-type linker instructions here so they can be used in the shared
39 # version and in the mixed (static nss libs/shared NSPR libs) version.
41 ifeq ($(OS_ARCH
), SunOS
)
42 ifeq ($(BUILD_SUN_PKG
), 1)
44 EXTRA_SHARED_LIBS
+= -R
'$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
46 EXTRA_SHARED_LIBS
+= -R
'$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps'
49 EXTRA_SHARED_LIBS
+= -R
'$$ORIGIN/../lib'
53 ifeq ($(OS_ARCH
), Linux
)
55 EXTRA_SHARED_LIBS
+= -Wl
,-rpath
,'$$ORIGIN/../lib64:$$ORIGIN/../lib'
57 EXTRA_SHARED_LIBS
+= -Wl
,-rpath
,'$$ORIGIN/../lib'
61 ifeq ($(OS_ARCH
), HP-UX
)
62 ifeq ($(OS_TEST
), ia64
)
63 EXTRA_SHARED_LIBS
+= -Wl
,+b
,'$$ORIGIN/../lib'
67 EXTRA_SHARED_LIBS
+= \
68 -Wl
,+b
,'$$ORIGIN/../../lib/pa20_64:$$ORIGIN/../../lib/64:$$ORIGIN/../lib'
70 EXTRA_SHARED_LIBS
+= -Wl
,+b
,'$$ORIGIN/../lib'
79 # can't do this in manifest.mn because OS_ARCH isn't defined there.
80 ifeq ($(OS_ARCH
), WINNT
)
82 DEFINES
+= -DNSS_USE_STATIC_LIBS
83 # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
84 CRYPTOLIB
=$(DIST
)/lib
/$(LIB_PREFIX
)freebl.
$(LIB_SUFFIX
)
85 ifdef MOZILLA_SECURITY_BUILD
86 CRYPTOLIB
=$(DIST
)/lib
/crypto.lib
88 ifdef MOZILLA_BSAFE_BUILD
89 CRYPTOLIB
+=$(DIST
)/lib
/bsafe
$(BSAFEVER
).lib
90 CRYPTOLIB
+=$(DIST
)/lib
/freebl.lib
94 $(DIST
)/lib
/$(LIB_PREFIX
)pkixcertsel.
$(LIB_SUFFIX
) \
95 $(DIST
)/lib
/$(LIB_PREFIX
)pkixchecker.
$(LIB_SUFFIX
) \
96 $(DIST
)/lib
/$(LIB_PREFIX
)pkixparams.
$(LIB_SUFFIX
) \
97 $(DIST
)/lib
/$(LIB_PREFIX
)pkixresults.
$(LIB_SUFFIX
) \
98 $(DIST
)/lib
/$(LIB_PREFIX
)pkixtop.
$(LIB_SUFFIX
) \
99 $(DIST
)/lib
/$(LIB_PREFIX
)pkixutil.
$(LIB_SUFFIX
) \
100 $(DIST
)/lib
/$(LIB_PREFIX
)pkixcrlsel.
$(LIB_SUFFIX
) \
101 $(DIST
)/lib
/$(LIB_PREFIX
)pkixstore.
$(LIB_SUFFIX
) \
102 $(DIST
)/lib
/$(LIB_PREFIX
)pkixpki.
$(LIB_SUFFIX
) \
103 $(DIST
)/lib
/$(LIB_PREFIX
)pkixsystem.
$(LIB_SUFFIX
) \
104 $(DIST
)/lib
/$(LIB_PREFIX
)pkixmodule.
$(LIB_SUFFIX
)
107 $(DIST
)/lib
/$(LIB_PREFIX
)smime.
$(LIB_SUFFIX
) \
108 $(DIST
)/lib
/$(LIB_PREFIX
)ssl.
$(LIB_SUFFIX
) \
109 $(DIST
)/lib
/$(LIB_PREFIX
)nss.
$(LIB_SUFFIX
) \
110 $(DIST
)/lib
/$(LIB_PREFIX
)ssl.
$(LIB_SUFFIX
) \
111 $(DIST
)/lib
/$(LIB_PREFIX
)sectool.
$(LIB_SUFFIX
) \
112 $(DIST
)/lib
/$(LIB_PREFIX
)pkcs12.
$(LIB_SUFFIX
) \
113 $(DIST
)/lib
/$(LIB_PREFIX
)pkcs7.
$(LIB_SUFFIX
) \
114 $(DIST
)/lib
/$(LIB_PREFIX
)certhi.
$(LIB_SUFFIX
) \
115 $(DIST
)/lib
/$(LIB_PREFIX
)cryptohi.
$(LIB_SUFFIX
) \
116 $(DIST
)/lib
/$(LIB_PREFIX
)pk11wrap.
$(LIB_SUFFIX
) \
117 $(DIST
)/lib
/$(LIB_PREFIX
)certdb.
$(LIB_SUFFIX
) \
118 $(DIST
)/lib
/$(LIB_PREFIX
)softokn.
$(LIB_SUFFIX
) \
120 $(DIST
)/lib
/$(LIB_PREFIX
)nssutil.
$(LIB_SUFFIX
) \
121 $(DIST
)/lib
/$(LIB_PREFIX
)nsspki.
$(LIB_SUFFIX
) \
122 $(DIST
)/lib
/$(LIB_PREFIX
)nssdev.
$(LIB_SUFFIX
) \
123 $(DIST
)/lib
/$(LIB_PREFIX
)nssb.
$(LIB_SUFFIX
) \
125 $(DIST
)/lib
/$(LIB_PREFIX
)dbm.
$(LIB_SUFFIX
) \
126 $(DIST
)/lib
/$(LIB_PREFIX
)sqlite3.
$(LIB_SUFFIX
) \
127 $(NSPR_LIB_DIR
)/$(NSPR31_LIB_PREFIX
)plc4.
$(LIB_SUFFIX
) \
128 $(NSPR_LIB_DIR
)/$(NSPR31_LIB_PREFIX
)plds4.
$(LIB_SUFFIX
) \
129 $(NSPR_LIB_DIR
)/$(NSPR31_LIB_PREFIX
)nspr4.
$(LIB_SUFFIX
) \
132 # $(PROGRAM) has NO explicit dependencies on $(OS_LIBS)
139 # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
140 CRYPTOLIB
=$(DIST
)/lib
/$(LIB_PREFIX
)freebl.
$(LIB_SUFFIX
)
141 ifdef MOZILLA_SECURITY_BUILD
142 CRYPTOLIB
=$(DIST
)/lib
/$(LIB_PREFIX
)crypto.
$(LIB_SUFFIX
)
144 ifdef MOZILLA_BSAFE_BUILD
145 CRYPTOLIB
+=$(DIST
)/lib
/$(LIB_PREFIX
)bsafe.
$(LIB_SUFFIX
)
146 CRYPTOLIB
+=$(DIST
)/lib
/$(LIB_PREFIX
)freebl.
$(LIB_SUFFIX
)
150 $(DIST
)/lib
/$(LIB_PREFIX
)pkixtop.
$(LIB_SUFFIX
) \
151 $(DIST
)/lib
/$(LIB_PREFIX
)pkixutil.
$(LIB_SUFFIX
) \
152 $(DIST
)/lib
/$(LIB_PREFIX
)pkixsystem.
$(LIB_SUFFIX
) \
153 $(DIST
)/lib
/$(LIB_PREFIX
)pkixcrlsel.
$(LIB_SUFFIX
) \
154 $(DIST
)/lib
/$(LIB_PREFIX
)pkixmodule.
$(LIB_SUFFIX
) \
155 $(DIST
)/lib
/$(LIB_PREFIX
)pkixstore.
$(LIB_SUFFIX
) \
156 $(DIST
)/lib
/$(LIB_PREFIX
)pkixparams.
$(LIB_SUFFIX
) \
157 $(DIST
)/lib
/$(LIB_PREFIX
)pkixchecker.
$(LIB_SUFFIX
) \
158 $(DIST
)/lib
/$(LIB_PREFIX
)pkixpki.
$(LIB_SUFFIX
) \
159 $(DIST
)/lib
/$(LIB_PREFIX
)pkixtop.
$(LIB_SUFFIX
) \
160 $(DIST
)/lib
/$(LIB_PREFIX
)pkixresults.
$(LIB_SUFFIX
) \
161 $(DIST
)/lib
/$(LIB_PREFIX
)pkixcertsel.
$(LIB_SUFFIX
)
164 $(DIST
)/lib
/$(LIB_PREFIX
)smime.
$(LIB_SUFFIX
) \
165 $(DIST
)/lib
/$(LIB_PREFIX
)ssl.
$(LIB_SUFFIX
) \
166 $(DIST
)/lib
/$(LIB_PREFIX
)nss.
$(LIB_SUFFIX
) \
167 $(DIST
)/lib
/$(LIB_PREFIX
)ssl.
$(LIB_SUFFIX
) \
168 $(DIST
)/lib
/$(LIB_PREFIX
)sectool.
$(LIB_SUFFIX
) \
169 $(DIST
)/lib
/$(LIB_PREFIX
)pkcs12.
$(LIB_SUFFIX
) \
170 $(DIST
)/lib
/$(LIB_PREFIX
)pkcs7.
$(LIB_SUFFIX
) \
171 $(DIST
)/lib
/$(LIB_PREFIX
)certhi.
$(LIB_SUFFIX
) \
172 $(DIST
)/lib
/$(LIB_PREFIX
)pk11wrap.
$(LIB_SUFFIX
) \
173 $(DIST
)/lib
/$(LIB_PREFIX
)cryptohi.
$(LIB_SUFFIX
) \
174 $(DIST
)/lib
/$(LIB_PREFIX
)certhi.
$(LIB_SUFFIX
) \
175 $(DIST
)/lib
/$(LIB_PREFIX
)nsspki.
$(LIB_SUFFIX
) \
176 $(DIST
)/lib
/$(LIB_PREFIX
)pk11wrap.
$(LIB_SUFFIX
) \
177 $(DIST
)/lib
/$(LIB_PREFIX
)softokn.
$(LIB_SUFFIX
) \
178 $(DIST
)/lib
/$(LIB_PREFIX
)certdb.
$(LIB_SUFFIX
) \
179 $(DIST
)/lib
/$(LIB_PREFIX
)nsspki.
$(LIB_SUFFIX
) \
180 $(DIST
)/lib
/$(LIB_PREFIX
)nssdev.
$(LIB_SUFFIX
) \
181 $(DIST
)/lib
/$(LIB_PREFIX
)nssb.
$(LIB_SUFFIX
) \
183 $(DIST
)/lib
/$(LIB_PREFIX
)nssutil.
$(LIB_SUFFIX
) \
184 $(DIST
)/lib
/$(LIB_PREFIX
)dbm.
$(LIB_SUFFIX
) \
186 $(DIST
)/lib
/$(LIB_PREFIX
)nss.
$(LIB_SUFFIX
) \
187 $(DIST
)/lib
/$(LIB_PREFIX
)pk11wrap.
$(LIB_SUFFIX
) \
188 $(DIST
)/lib
/$(LIB_PREFIX
)certhi.
$(LIB_SUFFIX
) \
191 ifeq ($(OS_ARCH
), AIX
)
192 EXTRA_SHARED_LIBS
+= -brtl
195 # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
196 # $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
197 EXTRA_SHARED_LIBS
+= \
207 ifeq ($(OS_TARGET
), SunOS
)
211 else # USE_STATIC_LIBS
212 # can't do this in manifest.mn because OS_ARCH isn't defined there.
213 ifeq ($(OS_ARCH
), WINNT
)
215 # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
217 $(DIST
)/lib
/$(LIB_PREFIX
)sectool.
$(LIB_SUFFIX
) \
218 $(DIST
)/lib
/$(IMPORT_LIB_PREFIX
)nssutil3
$(IMPORT_LIB_SUFFIX
) \
219 $(DIST
)/lib
/$(IMPORT_LIB_PREFIX
)smime3
$(IMPORT_LIB_SUFFIX
) \
220 $(DIST
)/lib
/$(IMPORT_LIB_PREFIX
)ssl3
$(IMPORT_LIB_SUFFIX
) \
221 $(DIST
)/lib
/$(IMPORT_LIB_PREFIX
)nss3
$(IMPORT_LIB_SUFFIX
) \
222 $(NSPR_LIB_DIR
)/$(NSPR31_LIB_PREFIX
)plc4
$(IMPORT_LIB_SUFFIX
) \
223 $(NSPR_LIB_DIR
)/$(NSPR31_LIB_PREFIX
)plds4
$(IMPORT_LIB_SUFFIX
) \
224 $(NSPR_LIB_DIR
)/$(NSPR31_LIB_PREFIX
)nspr4
$(IMPORT_LIB_SUFFIX
) \
227 # $(PROGRAM) has NO explicit dependencies on $(OS_LIBS)
234 # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
236 $(DIST
)/lib
/$(LIB_PREFIX
)sectool.
$(LIB_SUFFIX
) \
239 ifeq ($(OS_ARCH
), AIX
)
240 EXTRA_SHARED_LIBS
+= -brtl
243 # If GNU ld is used, we must use the -rpath-link option to tell
244 # the linker where to find libsoftokn3.so, an implicit dependency
246 ifeq (,$(filter-out BSD_OS FreeBSD Linux NetBSD
, $(OS_ARCH
)))
247 EXTRA_SHARED_LIBS
+= -Wl
,-rpath-link
,$(DIST
)/lib
250 ifeq ($(OS_ARCH
), SunOS
)
253 EXTRA_SHARED_LIBS
+= -Wl
,-rpath-link
,$(DIST
)/lib
258 ifeq ($(OS_ARCH
), Darwin
)
259 EXTRA_SHARED_LIBS
+= -dylib_file @executable_path
/libsoftokn3.dylib
:$(DIST
)/lib
/libsoftokn3.dylib
263 # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
264 # $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
265 EXTRA_SHARED_LIBS
+= \
278 endif # USE_STATIC_LIBS
280 # If a platform has a system zlib, set USE_SYSTEM_ZLIB to 1 and
281 # ZLIB_LIBS to the linker command-line arguments for the system zlib
282 # (for example, -lz) in the platform's config file in coreconf.
283 ifndef USE_SYSTEM_ZLIB
284 ZLIB_LIBS
= $(DIST
)/lib
/$(LIB_PREFIX
)zlib.
$(LIB_SUFFIX
)
287 JAR_LIBS
= $(DIST
)/lib
/$(LIB_PREFIX
)jar.
$(LIB_SUFFIX
) \