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
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.
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 #######################################################################
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
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
86 cd
$(CORE_DEPTH
)/coreconf
; $(MAKE
)
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.
99 NSPR_CONFIGURE_OPTS
+= --disable-debug
--enable-optimize
102 NSPR_CONFIGURE_OPTS
+= --enable-64bit
104 ifeq ($(OS_TARGET
),WIN95
)
105 NSPR_CONFIGURE_OPTS
+= --enable-win32-target
=WIN95
108 NSPR_CONFIGURE_OPTS
+= --enable-debug-rtl
111 NSPR_COMPILERS
= CC
=gcc CXX
=g
++
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.
124 ifeq (,$(filter-out WIN
%,$(OS_TARGET
)))
125 ifeq (,$(findstring :,$(shell pwd
)))
129 ifeq ($(USEABSPATH
),"YES")
130 NSPR_PREFIX
= $(shell pwd
)/..
/..
/dist/$(OBJDIR_NAME
)
132 NSPR_PREFIX
= $$(topsrcdir
)/..
/dist/$(OBJDIR_NAME
)
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
150 cd
$(CORE_DEPTH
)/dbm
; $(MAKE
) export libs
153 cd
$(CORE_DEPTH
)/dbm
; $(MAKE
) clobber
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
161 cp
$(DIST
)/..
/WIN32_O.OBJ
/lib
/* $(DIST
)/lib
163 cp
$(DIST
)/..
/WIN32_D.OBJ
/lib
/* $(DIST
)/lib
165 mv
$(DIST
)/lib
/dbm32.lib
$(DIST
)/lib
/dbm.lib
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
)
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
)
178 nss_RelEng_bld
: build_coreconf import build_dbm
all
181 $(MAKE
) -C pkg publish