Bug 435531 ? problem saving login when form or existing login is password-only. r...
[wine-gecko.git] / security / manager / Makefile.in
blob86119f712729c3703f6b396d793069f6b9563f62
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
13 # License.
15 # The Original Code is mozilla.org code.
17 # The Initial Developer of the Original Code is
18 # Netscape Communications Corporation.
19 # Portions created by the Initial Developer are Copyright (C) 1998
20 # the Initial Developer. All Rights Reserved.
22 # Contributor(s):
23 # Brian Ryner <bryner@brianryner.com>
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
37 # ***** END LICENSE BLOCK *****
39 DEPTH = ../..
40 topsrcdir = @top_srcdir@
41 srcdir = @srcdir@
42 VPATH = @srcdir@
44 include $(DEPTH)/config/autoconf.mk
46 MODULE = psm
48 PACKAGE_FILE = psm.pkg
50 ifndef MOZ_NATIVE_NSS
51 PACKAGE_VARS += \
52 NSS3_LIB \
53 NSSUTIL3_LIB \
54 SMIME3_LIB \
55 SSL3_LIB \
56 SOFTOKEN3_LIB \
57 SOFTOKEN3_CHK \
58 NSSDBM3_LIB \
59 LOADABLE_ROOT_MODULE \
60 HAVE_FREEBL_LIBS \
61 HAVE_FREEBL_LIBS_32 \
62 HAVE_FREEBL_LIBS_32INT64 \
63 HAVE_FREEBL_LIBS_64 \
64 $(NULL)
66 LOADABLE_ROOT_MODULE = $(DLL_PREFIX)nssckbi$(DLL_SUFFIX)
67 endif
69 NSS3_LIB = $(DLL_PREFIX)nss3$(DLL_SUFFIX)
70 NSSUTIL3_LIB = $(DLL_PREFIX)nssutil3$(DLL_SUFFIX)
71 SMIME3_LIB = $(DLL_PREFIX)smime3$(DLL_SUFFIX)
72 SSL3_LIB = $(DLL_PREFIX)ssl3$(DLL_SUFFIX)
73 SOFTOKEN3_LIB = $(DLL_PREFIX)softokn3$(DLL_SUFFIX)
74 SOFTOKEN3_CHK = $(DLL_PREFIX)softokn3.chk
75 NSSDBM3_LIB = $(DLL_PREFIX)nssdbm3$(DLL_SUFFIX)
77 ifndef MOZ_NATIVE_NSS
78 ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))
79 SDK_LIBS = \
80 $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
81 $(DIST)/lib/$(LIB_PREFIX)smime3.$(IMPORT_LIB_SUFFIX) \
82 $(DIST)/lib/$(LIB_PREFIX)ssl3.$(IMPORT_LIB_SUFFIX) \
83 $(DIST)/lib/$(LIB_PREFIX)nss3.$(IMPORT_LIB_SUFFIX) \
84 $(DIST)/lib/$(LIB_PREFIX)nssutil3.$(IMPORT_LIB_SUFFIX) \
85 $(DIST)/lib/$(LIB_PREFIX)softokn3.$(IMPORT_LIB_SUFFIX) \
86 $(NULL)
87 else
88 SDK_LIBS = \
89 $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \
90 $(DIST)/lib/$(LIB_PREFIX)smime.$(LIB_SUFFIX) \
91 $(DIST)/lib/$(LIB_PREFIX)ssl.$(LIB_SUFFIX) \
92 $(DIST)/lib/$(LIB_PREFIX)nss.$(LIB_SUFFIX) \
93 $(DIST)/lib/$(LIB_PREFIX)nssutil.$(LIB_SUFFIX) \
94 $(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
95 $(NULL)
96 endif
97 endif
99 # Default
100 HAVE_FREEBL_LIBS = 1
102 # 32-bit HP-UX PA-RISC
103 ifeq ($(OS_ARCH), HP-UX)
104 ifneq ($(OS_TEST), ia64)
105 ifndef HAVE_64BIT_OS
106 HAVE_FREEBL_LIBS =
107 HAVE_FREEBL_LIBS_32 = 1
108 endif
109 endif
110 endif
112 # SunOS SPARC
113 ifeq ($(OS_ARCH), SunOS)
114 ifneq (86,$(findstring 86,$(OS_TEST)))
115 ifdef HAVE_64BIT_OS
116 HAVE_FREEBL_LIBS =
117 HAVE_FREEBL_LIBS_64 = 1
118 else
119 HAVE_FREEBL_LIBS =
120 HAVE_FREEBL_LIBS_32 = 1
121 HAVE_FREEBL_LIBS_32INT64 = 1
122 endif
123 endif
124 endif
126 ifdef HAVE_FREEBL_LIBS
127 FREEBL_LIB = $(DLL_PREFIX)freebl3$(DLL_SUFFIX)
128 FREEBL_CHK = $(DLL_PREFIX)freebl3.chk
129 endif
130 ifdef HAVE_FREEBL_LIBS_32
131 FREEBL_32INT_LIB = libfreebl_32int_3$(DLL_SUFFIX)
132 FREEBL_32INT_CHK = libfreebl_32int_3.chk
133 FREEBL_32FPU_LIB = libfreebl_32fpu_3$(DLL_SUFFIX)
134 FREEBL_32FPU_CHK = libfreebl_32fpu_3.chk
135 endif
136 ifdef HAVE_FREEBL_LIBS_32INT64
137 FREEBL_32INT64_LIB = libfreebl_32int64_3$(DLL_SUFFIX)
138 FREEBL_32INT64_CHK = libfreebl_32int64_3.chk
139 endif
140 ifdef HAVE_FREEBL_LIBS_64
141 FREEBL_64INT_LIB = libfreebl_64int_3$(DLL_SUFFIX)
142 FREEBL_64INT_CHK = libfreebl_64int_3.chk
143 FREEBL_64FPU_LIB = libfreebl_64fpu_3$(DLL_SUFFIX)
144 FREEBL_64FPU_CHK = libfreebl_64fpu_3.chk
145 endif
147 ABS_DIST := $(shell cd $(DIST) && pwd)
148 ifeq ($(HOST_OS_ARCH),WINNT)
149 ifdef CYGDRIVE_MOUNT
150 ABS_DIST := $(shell cygpath -w $(ABS_DIST) | sed -e 's|\\|/|g')
151 endif
152 ifneq (,$(filter mingw%,$(host_os)))
153 ABS_DIST := $(shell cd $(DIST) && pwd -W)
154 endif
155 endif
156 NSPR_INCLUDE_DIR = $(firstword $(filter -I%,$(NSPR_CFLAGS)))
157 ifneq (,$(strip $(NSPR_INCLUDE_DIR)))
158 NSPR_INCLUDE_DIR := $(subst -I,,$(subst -I$(DIST),-I$(ABS_DIST),$(NSPR_INCLUDE_DIR)))
159 else
160 NSPR_INCLUDE_DIR = $(ABS_DIST)/include/nspr
161 endif
162 NSPR_LIB_DIR = $(firstword $(filter -L%,$(NSPR_LIBS)))
163 ifneq (,$(strip $(NSPR_LIB_DIR)))
164 NSPR_LIB_DIR := $(subst -L,,$(subst -L$(DIST),-L$(ABS_DIST),$(NSPR_LIB_DIR)))
165 else
166 NSPR_LIB_DIR = $(ABS_DIST)/lib
167 endif
168 # Can't pass this in DEFAULT_GMAKE_FLAGS because that overrides
169 # definitions in NSS, so just export it into the sub-make's environment.
170 ifeq (WINNT_1,$(OS_TARGET)_$(MOZ_MEMORY))
171 export DLLFLAGS
172 endif
173 # NSS makefiles are not safe for parallel execution.
174 DEFAULT_GMAKE_FLAGS = MAKE="$(MAKE) -j1" -j1
175 DEFAULT_GMAKE_FLAGS += CC="$(CC)"
176 DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(ABS_DIST)
177 DEFAULT_GMAKE_FLAGS += DIST=$(ABS_DIST)
178 DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR=$(NSPR_INCLUDE_DIR)
179 DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR)
180 DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1
181 DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1
182 DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1
183 ABS_topsrcdir := $(shell cd $(topsrcdir); pwd)
184 ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
185 DEFAULT_GMAKE_FLAGS += BUILD_TREE=$(MOZ_BUILD_ROOT)
186 endif
187 ifndef MOZ_DEBUG
188 DEFAULT_GMAKE_FLAGS += BUILD_OPT=1 OPT_CODE_SIZE=1
189 endif
190 ifdef GNU_CC
191 DEFAULT_GMAKE_FLAGS += NS_USE_GCC=1 NS_USE_NATIVE=
192 else
193 DEFAULT_GMAKE_FLAGS += NS_USE_GCC= NS_USE_NATIVE=1
194 endif
195 ifdef USE_N32
196 # It is not really necessary to specify USE_PTHREADS=1. USE_PTHREADS
197 # merely adds _PTH to coreconf's OBJDIR name.
198 DEFAULT_GMAKE_FLAGS += USE_N32=1 USE_PTHREADS=1
199 endif
200 ifdef HAVE_64BIT_OS
201 DEFAULT_GMAKE_FLAGS += USE_64=1
202 endif
203 ifeq ($(OS_ARCH),WINNT)
204 DEFAULT_GMAKE_FLAGS += OS_TARGET=WIN95
205 ifdef MOZ_DEBUG
206 ifndef MOZ_NO_DEBUG_RTL
207 DEFAULT_GMAKE_FLAGS += USE_DEBUG_RTL=1
208 endif
209 endif
210 endif # WINNT
211 ifeq ($(OS_ARCH),OS2)
212 ifdef MOZ_OS2_HIGH_MEMORY
213 DEFAULT_GMAKE_FLAGS += MOZ_OS2_HIGH_MEMORY=1
214 endif
215 endif # OS2
216 # OS_CFLAGS needs to be passed on down.
217 ifeq ($(OS_ARCH),OpenVMS)
218 DEFAULT_GMAKE_FLAGS += XCFLAGS="$(OS_CFLAGS)"
219 endif
220 ifeq ($(OS_ARCH),Darwin)
221 # Make nsinstall use absolute symlinks by default when building NSS
222 # for Mozilla on Mac OS X. (Bugzilla bug 193164)
223 ifndef NSDISTMODE
224 DEFAULT_GMAKE_FLAGS += NSDISTMODE=absolute_symlink
225 endif
226 ifdef MACOS_SDK_DIR
227 DEFAULT_GMAKE_FLAGS += MACOS_SDK_DIR=$(MACOS_SDK_DIR)
228 endif
229 endif
230 ifdef CROSS_COMPILE
231 DEFAULT_GMAKE_FLAGS += \
232 NSINSTALL="$(NSINSTALL)" \
233 NATIVE_CC="$(HOST_CC)" \
234 CC="$(CC)" \
235 CCC="$(CXX)" \
236 LINK="$(LD)" \
237 AS="$(AS)" \
238 AR='$(AR) $(AR_FLAGS:$@=$$@)' \
239 RANLIB="$(RANLIB)" \
240 RC="$(RC) $(RCFLAGS)" \
241 OS_ARCH="$(OS_ARCH)" \
242 CPU_ARCH="$(TARGET_CPU)" \
243 $(NULL)
244 SKIP_CHK=1
245 endif
246 SUBMAKEFILES = boot/Makefile ssl/Makefile pki/Makefile locales/Makefile
248 include $(topsrcdir)/config/rules.mk
250 # Attempt to properly handle NSS' refusal to implement a dependency system
251 export:: .nss.cleaned
253 .nss.cleaned: .nss.checkout
254 ifndef MOZ_NATIVE_NSS
255 $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean
256 $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean
257 ifndef SKIP_CHK
258 $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) clean
259 $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) clean
260 endif
261 touch $@
262 endif
264 GARBAGE += .nss.cleaned
266 .nss.checkout:
267 ifndef MOZ_NATIVE_NSS
268 touch $(srcdir)/$@
269 endif
271 dependclean export packages chrome::
272 $(MAKE) -C boot $@
273 $(MAKE) -C ssl $@
274 $(MAKE) -C locales $@
275 ifdef MOZ_XUL
276 $(MAKE) -C pki $@
277 endif
279 libs::
280 ifndef MOZ_NATIVE_NSS
281 $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS)
282 $(MAKE) -C $(topsrcdir)/security/dbm $(DEFAULT_GMAKE_FLAGS)
283 $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS)
284 ifndef SKIP_CHK
285 $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS)
286 $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS)
287 endif
288 $(INSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DIST)/bin
289 ifndef SKIP_CHK
290 $(INSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(DIST)/bin
291 endif
292 $(INSTALL) -m 755 $(DIST)/lib/$(SOFTOKEN3_LIB) $(DIST)/bin
293 $(INSTALL) -m 755 $(DIST)/lib/$(NSSDBM3_LIB) $(DIST)/bin
294 $(INSTALL) -m 755 $(DIST)/lib/$(NSS3_LIB) $(DIST)/bin
295 $(INSTALL) -m 755 $(DIST)/lib/$(NSSUTIL3_LIB) $(DIST)/bin
296 $(INSTALL) -m 755 $(DIST)/lib/$(SSL3_LIB) $(DIST)/bin
297 $(INSTALL) -m 755 $(DIST)/lib/$(SMIME3_LIB) $(DIST)/bin
298 $(INSTALL) -m 755 $(SDK_LIBS) $(DIST)/sdk/lib
299 ifdef HAVE_FREEBL_LIBS
300 ifndef SKIP_CHK
301 $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_CHK) $(DIST)/bin
302 endif
303 $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_LIB) $(DIST)/bin
304 endif
305 ifdef HAVE_FREEBL_LIBS_32
306 ifndef SKIP_CHK
307 $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT_CHK) $(DIST)/bin
308 $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32FPU_CHK) $(DIST)/bin
309 endif
310 $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT_LIB) $(DIST)/bin
311 $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32FPU_LIB) $(DIST)/bin
312 endif
313 ifdef HAVE_FREEBL_LIBS_32INT64
314 ifndef SKIP_CHK
315 $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT64_CHK) $(DIST)/bin
316 endif
317 $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT64_LIB) $(DIST)/bin
318 endif
319 ifdef HAVE_FREEBL_LIBS_64
320 ifndef SKIP_CHK
321 $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_64INT_CHK) $(DIST)/bin
322 $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_64FPU_CHK) $(DIST)/bin
323 endif
324 $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_64INT_LIB) $(DIST)/bin
325 $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_64FPU_LIB) $(DIST)/bin
326 endif
327 endif
328 ifndef MOZ_NATIVE_NSS
329 # NSS installs headers to dist/public and we want them in dist/include
330 $(NSINSTALL) -D $(DIST)/include/nss
331 (cd $(DIST)/public/nss && tar $(TAR_CREATE_FLAGS) - .) | \
332 (cd $(DIST)/include/nss && tar -xf -)
333 (cd $(DIST)/public/nss && tar $(TAR_CREATE_FLAGS) - .) | \
334 (cd $(DIST)/sdk/include && tar -xf -)
335 endif
336 $(MAKE) -C boot $@
337 $(MAKE) -C ssl $@
338 $(MAKE) -C locales $@
339 ifdef MOZ_XUL
340 $(MAKE) -C pki $@
341 endif
343 check::
344 $(MAKE) -C ssl $@
346 install::
347 ifndef MOZ_NATIVE_NSS
348 $(SYSINSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DESTDIR)$(mozappdir)
349 ifndef SKIP_CHK
350 $(SYSINSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(DESTDIR)$(mozappdir)
351 endif
352 $(SYSINSTALL) -m 755 $(DIST)/lib/$(SOFTOKEN3_LIB) $(DESTDIR)$(mozappdir)
353 $(SYSINSTALL) -m 755 $(DIST)/lib/$(NSSDBM3_LIB) $(DESTDIR)$(mozappdir)
354 $(SYSINSTALL) -m 755 $(DIST)/lib/$(NSS3_LIB) $(DESTDIR)$(mozappdir)
355 $(SYSINSTALL) -m 755 $(DIST)/lib/$(NSSUTIL3_LIB) $(DESTDIR)$(mozappdir)
356 $(SYSINSTALL) -m 755 $(DIST)/lib/$(SSL3_LIB) $(DESTDIR)$(mozappdir)
357 $(SYSINSTALL) -m 755 $(DIST)/lib/$(SMIME3_LIB) $(DESTDIR)$(mozappdir)
358 ifdef HAVE_FREEBL_LIBS
359 ifndef SKIP_CHK
360 $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_CHK) $(DESTDIR)$(mozappdir)
361 endif
362 $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_LIB) $(DESTDIR)$(mozappdir)
363 endif
364 ifdef HAVE_FREEBL_LIBS_32
365 ifndef SKIP_CHK
366 $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT_CHK) $(DESTDIR)$(mozappdir)
367 $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_32FPU_CHK) $(DESTDIR)$(mozappdir)
368 endif
369 $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT_LIB) $(DESTDIR)$(mozappdir)
370 $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_32FPU_LIB) $(DESTDIR)$(mozappdir)
371 endif
372 ifdef HAVE_FREEBL_LIBS_32INT64
373 ifndef SKIP_CHK
374 $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT64_CHK) $(DESTDIR)$(mozappdir)
375 endif
376 $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT64_LIB) $(DESTDIR)$(mozappdir)
377 endif
378 ifdef HAVE_FREEBL_LIBS_64
379 ifndef SKIP_CHK
380 $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_64INT_CHK) $(DESTDIR)$(mozappdir)
381 $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_64FPU_CHK) $(DESTDIR)$(mozappdir)
382 endif
383 $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_64INT_LIB) $(DESTDIR)$(mozappdir)
384 $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_64FPU_LIB) $(DESTDIR)$(mozappdir)
385 endif
386 endif
387 $(MAKE) -C boot $@
388 $(MAKE) -C ssl $@
389 $(MAKE) -C locales $@
390 ifdef MOZ_XUL
391 $(MAKE) -C pki $@
392 endif
394 clean clobber clobber_all realclean distclean depend::
395 $(MAKE) -C boot $@
396 $(MAKE) -C ssl $@
397 $(MAKE) -C locales $@
398 ifdef MOZ_XUL
399 $(MAKE) -C pki $@
400 endif
401 ifndef MOZ_NATIVE_NSS
402 $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean
403 $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean
404 ifndef SKIP_CHK
405 $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) clean
406 $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) clean
407 endif
408 endif
410 echo-requires-recursive::
411 $(MAKE) -C boot $@
412 $(MAKE) -C ssl $@
413 $(MAKE) -C pki $@
414 $(MAKE) -C locales $@