Backout bug 440714, it failed on Mac OS X
[wine-gecko.git] / security / nss / Makefile
blob37e912ef127f0fd357e2635983b6afa79999ea21
1 #! gmake
3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
14 # License.
16 # The Original Code is the Netscape security libraries.
18 # The Initial Developer of the Original Code is
19 # Netscape Communications Corporation.
20 # Portions created by the Initial Developer are Copyright (C) 1994-2000
21 # the Initial Developer. All Rights Reserved.
23 # Contributor(s):
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 #######################################################################
40 # (1) Include initial platform-independent assignments (MANDATORY). #
41 #######################################################################
43 include manifest.mn
45 #######################################################################
46 # (2) Include "global" configuration information. (OPTIONAL) #
47 #######################################################################
49 include $(CORE_DEPTH)/coreconf/config.mk
51 #######################################################################
52 # (3) Include "component" configuration information. (OPTIONAL) #
53 #######################################################################
57 #######################################################################
58 # (4) Include "local" platform-dependent assignments (OPTIONAL). #
59 #######################################################################
61 ifeq ($(OS_TARGET),WINCE)
62 DIRS = lib # omit cmd since wince has no command line shell
63 endif
65 #######################################################################
66 # (5) Execute "global" rules. (OPTIONAL) #
67 #######################################################################
69 include $(CORE_DEPTH)/coreconf/rules.mk
71 #######################################################################
72 # (6) Execute "component" rules. (OPTIONAL) #
73 #######################################################################
77 #######################################################################
78 # (7) Execute "local" rules. (OPTIONAL). #
79 #######################################################################
81 nss_build_all: build_coreconf build_nspr build_dbm all
83 nss_clean_all: clobber_coreconf clobber_nspr clobber_dbm clobber
85 build_coreconf:
86 cd $(CORE_DEPTH)/coreconf ; $(MAKE)
88 clobber_coreconf:
89 cd $(CORE_DEPTH)/coreconf ; $(MAKE) clobber
91 NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME)/config.status
92 NSPR_CONFIGURE = $(CORE_DEPTH)/../nsprpub/configure
95 # Translate coreconf build options to NSPR configure options.
98 ifdef BUILD_OPT
99 NSPR_CONFIGURE_OPTS += --disable-debug --enable-optimize
100 endif
101 ifdef USE_64
102 NSPR_CONFIGURE_OPTS += --enable-64bit
103 endif
104 ifeq ($(OS_TARGET),WIN95)
105 NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
106 endif
107 ifdef USE_DEBUG_RTL
108 NSPR_CONFIGURE_OPTS += --enable-debug-rtl
109 endif
110 ifdef NS_USE_GCC
111 NSPR_COMPILERS = CC=gcc CXX=g++
112 endif
115 # Some pwd commands on Windows (for example, the pwd
116 # command in Cygwin) return a pathname that begins
117 # with a (forward) slash. When such a pathname is
118 # passed to Windows build tools (for example, cl), it
119 # is mistaken as a command-line option. If that is the case,
120 # we use a relative pathname as NSPR's prefix on Windows.
123 USEABSPATH="YES"
124 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
125 ifeq (,$(findstring :,$(shell pwd)))
126 USEABSPATH="NO"
127 endif
128 endif
129 ifeq ($(USEABSPATH),"YES")
130 NSPR_PREFIX = $(shell pwd)/../../dist/$(OBJDIR_NAME)
131 else
132 NSPR_PREFIX = $$(topsrcdir)/../dist/$(OBJDIR_NAME)
133 endif
135 $(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE)
136 $(NSINSTALL) -D $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME)
137 cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; \
138 $(NSPR_COMPILERS) sh ../configure \
139 $(NSPR_CONFIGURE_OPTS) \
140 --with-dist-prefix='$(NSPR_PREFIX)' \
141 --with-dist-includedir='$(NSPR_PREFIX)/include'
143 build_nspr: $(NSPR_CONFIG_STATUS)
144 cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE)
146 clobber_nspr: $(NSPR_CONFIG_STATUS)
147 cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE) clobber
149 build_dbm:
150 cd $(CORE_DEPTH)/dbm ; $(MAKE) export libs
152 clobber_dbm:
153 cd $(CORE_DEPTH)/dbm ; $(MAKE) clobber
155 moz_import::
156 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
157 $(NSINSTALL) -D $(DIST)/include/nspr
158 cp $(DIST)/../include/nspr/*.h $(DIST)/include/nspr
159 cp $(DIST)/../include/* $(DIST)/include
160 ifdef BUILD_OPT
161 cp $(DIST)/../WIN32_O.OBJ/lib/* $(DIST)/lib
162 else
163 cp $(DIST)/../WIN32_D.OBJ/lib/* $(DIST)/lib
164 endif
165 mv $(DIST)/lib/dbm32.lib $(DIST)/lib/dbm.lib
166 else
167 ifeq ($(OS_TARGET),OS2)
168 cp -rf $(DIST)/../include $(DIST)
169 cp -rf $(DIST)/../lib $(DIST)
170 cp -f $(DIST)/lib/libmozdbm_s.$(LIB_SUFFIX) $(DIST)/lib/libdbm.$(LIB_SUFFIX)
171 else
172 $(NSINSTALL) -L ../../dist include $(DIST)
173 $(NSINSTALL) -L ../../dist lib $(DIST)
174 cp $(DIST)/lib/libmozdbm_s.$(LIB_SUFFIX) $(DIST)/lib/libdbm.$(LIB_SUFFIX)
175 endif
176 endif
178 nss_RelEng_bld: build_coreconf import build_dbm all
180 package:
181 $(MAKE) -C pkg publish