3
# The contents of this file are subject to the Mozilla Public
4
# License Version 1.1 (the "License"); you may not use this file
5
# except in compliance with the License. You may obtain a copy of
6
# the License at http://www.mozilla.org/MPL/
8
# Software distributed under the License is distributed on an "AS
9
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10
# implied. See the License for the specific language governing
11
# rights and limitations under the License.
13
# The Original Code is the Netscape security libraries.
15
# The Initial Developer of the Original Code is Netscape
16
# Communications Corporation. Portions created by Netscape are
17
# Copyright (C) 1994-2000 Netscape Communications Corporation. All
22
# Alternatively, the contents of this file may be used under the
23
# terms of the GNU General Public License Version 2 or later (the
24
# "GPL"), in which case the provisions of the GPL are applicable
25
# instead of those above. If you wish to allow use of your
26
# version of this file only under the terms of the GPL and not to
27
# allow others to use your version of this file under the MPL,
28
# indicate your decision by deleting the provisions above and
29
# replace them with the notice and other provisions required by
30
# the GPL. If you do not delete the provisions above, a recipient
31
# may use your version of this file under either the MPL or the
35
#######################################################################
36
# (1) Include initial platform-independent assignments (MANDATORY). #
37
#######################################################################
41
#######################################################################
42
# (2) Include "global" configuration information. (OPTIONAL) #
43
#######################################################################
45
include $(CORE_DEPTH)/coreconf/config.mk
47
#######################################################################
48
# (3) Include "component" configuration information. (OPTIONAL) #
49
#######################################################################
53
#######################################################################
54
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
55
#######################################################################
57
ifeq ($(OS_TARGET),WINCE)
58
DIRS = lib # omit cmd since wince has no command line shell
61
#######################################################################
62
# (5) Execute "global" rules. (OPTIONAL) #
63
#######################################################################
65
include $(CORE_DEPTH)/coreconf/rules.mk
67
#######################################################################
68
# (6) Execute "component" rules. (OPTIONAL) #
69
#######################################################################
73
#######################################################################
74
# (7) Execute "local" rules. (OPTIONAL). #
75
#######################################################################
77
nss_build_all: build_coreconf build_nspr build_dbm all
80
cd $(CORE_DEPTH)/coreconf ; $(MAKE)
82
NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME)/config.status
83
NSPR_CONFIGURE = $(CORE_DEPTH)/../nsprpub/configure
86
# Translate coreconf build options to NSPR configure options.
90
NSPR_CONFIGURE_OPTS += --disable-debug --enable-optimize
93
NSPR_CONFIGURE_OPTS += --enable-64bit
95
ifeq ($(OS_TARGET),WIN95)
96
NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
99
NSPR_CONFIGURE_OPTS += --enable-debug-rtl
102
NSPR_COMPILERS = CC=gcc CXX=g++
106
# Some pwd commands on Windows (for example, the pwd
107
# command in Cygwin) return a pathname that begins
108
# with a (forward) slash. When such a pathname is
109
# passed to Windows build tools (for example, cl), it
110
# is mistaken as a command-line option. If that is the case,
111
# we use a relative pathname as NSPR's prefix on Windows.
115
ifeq (,$(filter-out WIN%,$(OS_TARGET)))
116
ifeq (,$(findstring :,$(shell pwd)))
120
ifeq ($(USEABSPATH),"YES")
121
NSPR_PREFIX = $(shell pwd)/../../dist/$(OBJDIR_NAME)
123
NSPR_PREFIX = $$(topsrcdir)/../dist/$(OBJDIR_NAME)
126
$(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE)
127
$(NSINSTALL) -D $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME)
128
cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; \
129
$(NSPR_COMPILERS) sh ../configure \
130
$(NSPR_CONFIGURE_OPTS) \
131
--with-dist-prefix='$(NSPR_PREFIX)' \
132
--with-dist-includedir='$(NSPR_PREFIX)/include'
134
build_nspr: $(NSPR_CONFIG_STATUS)
135
cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE)
138
cd $(CORE_DEPTH)/dbm ; $(MAKE) export libs
143
ifeq (,$(filter-out WIN%,$(OS_TARGET)))
144
$(NSINSTALL) -D $(DIST)/include/nspr
145
cp $(DIST)/../include/nspr/*.h $(DIST)/include/nspr
146
cp $(DIST)/../include/* $(DIST)/include
148
cp $(DIST)/../WIN32_O.OBJ/lib/* $(DIST)/lib
150
cp $(DIST)/../WIN32_D.OBJ/lib/* $(DIST)/lib
152
mv $(DIST)/lib/dbm32.lib $(DIST)/lib/dbm.lib
154
ifeq ($(OS_TARGET),OS2)
155
cp -rf $(DIST)/../include $(DIST)
156
cp -rf $(DIST)/../lib $(DIST)
157
cp -f $(DIST)/lib/libmozdbm_s.$(LIB_SUFFIX) $(DIST)/lib/libdbm.$(LIB_SUFFIX)
159
$(NSINSTALL) -L ../../dist include $(DIST)
160
$(NSINSTALL) -L ../../dist lib $(DIST)
161
cp $(DIST)/lib/libmozdbm_s.$(LIB_SUFFIX) $(DIST)/lib/libdbm.$(LIB_SUFFIX)
165
nss_RelEng_bld: build_coreconf import all
168
$(MAKE) -C pkg publish