~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/security/nss/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! gmake
 
2
#
 
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/
 
7
 
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.
 
12
 
13
# The Original Code is the Netscape security libraries.
 
14
 
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
 
18
# Rights Reserved.
 
19
 
20
# Contributor(s):
 
21
 
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
 
32
# GPL.
 
33
#
 
34
 
 
35
#######################################################################
 
36
# (1) Include initial platform-independent assignments (MANDATORY).   #
 
37
#######################################################################
 
38
 
 
39
include manifest.mn
 
40
 
 
41
#######################################################################
 
42
# (2) Include "global" configuration information. (OPTIONAL)          #
 
43
#######################################################################
 
44
 
 
45
include $(CORE_DEPTH)/coreconf/config.mk
 
46
 
 
47
#######################################################################
 
48
# (3) Include "component" configuration information. (OPTIONAL)       #
 
49
#######################################################################
 
50
 
 
51
 
 
52
 
 
53
#######################################################################
 
54
# (4) Include "local" platform-dependent assignments (OPTIONAL).      #
 
55
#######################################################################
 
56
 
 
57
ifeq ($(OS_TARGET),WINCE)
 
58
DIRS    = lib   # omit cmd since wince has no command line shell
 
59
endif
 
60
 
 
61
#######################################################################
 
62
# (5) Execute "global" rules. (OPTIONAL)                              #
 
63
#######################################################################
 
64
 
 
65
include $(CORE_DEPTH)/coreconf/rules.mk
 
66
 
 
67
#######################################################################
 
68
# (6) Execute "component" rules. (OPTIONAL)                           #
 
69
#######################################################################
 
70
 
 
71
 
 
72
 
 
73
#######################################################################
 
74
# (7) Execute "local" rules. (OPTIONAL).                              #
 
75
#######################################################################
 
76
 
 
77
nss_build_all: build_coreconf build_nspr build_dbm all
 
78
 
 
79
build_coreconf:
 
80
        cd $(CORE_DEPTH)/coreconf ;  $(MAKE)
 
81
 
 
82
NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME)/config.status
 
83
NSPR_CONFIGURE = $(CORE_DEPTH)/../nsprpub/configure
 
84
 
 
85
#
 
86
# Translate coreconf build options to NSPR configure options.
 
87
#
 
88
 
 
89
ifdef BUILD_OPT
 
90
NSPR_CONFIGURE_OPTS += --disable-debug --enable-optimize
 
91
endif
 
92
ifdef USE_64
 
93
NSPR_CONFIGURE_OPTS += --enable-64bit
 
94
endif
 
95
ifeq ($(OS_TARGET),WIN95)
 
96
NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
 
97
endif
 
98
ifdef USE_DEBUG_RTL
 
99
NSPR_CONFIGURE_OPTS += --enable-debug-rtl
 
100
endif
 
101
ifdef NS_USE_GCC
 
102
NSPR_COMPILERS = CC=gcc CXX=g++
 
103
endif
 
104
 
 
105
#
 
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.
 
112
#
 
113
 
 
114
USEABSPATH="YES"
 
115
ifeq (,$(filter-out WIN%,$(OS_TARGET)))
 
116
ifeq (,$(findstring :,$(shell pwd)))
 
117
USEABSPATH="NO"
 
118
endif
 
119
endif
 
120
ifeq ($(USEABSPATH),"YES")
 
121
NSPR_PREFIX = $(shell pwd)/../../dist/$(OBJDIR_NAME)
 
122
else
 
123
NSPR_PREFIX = $$(topsrcdir)/../dist/$(OBJDIR_NAME)
 
124
endif
 
125
 
 
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'
 
133
 
 
134
build_nspr: $(NSPR_CONFIG_STATUS)
 
135
        cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE)
 
136
 
 
137
build_dbm:
 
138
        cd $(CORE_DEPTH)/dbm ; $(MAKE) export libs
 
139
 
 
140
        
 
141
 
 
142
moz_import::
 
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
 
147
ifdef BUILD_OPT
 
148
        cp $(DIST)/../WIN32_O.OBJ/lib/* $(DIST)/lib
 
149
else
 
150
        cp $(DIST)/../WIN32_D.OBJ/lib/* $(DIST)/lib
 
151
endif
 
152
        mv $(DIST)/lib/dbm32.lib $(DIST)/lib/dbm.lib
 
153
else
 
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)
 
158
else
 
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)
 
162
endif
 
163
endif
 
164
 
 
165
nss_RelEng_bld: build_coreconf import all
 
166
 
 
167
package:
 
168
        $(MAKE) -C pkg publish