1 # -*- Mode: makefile -*-
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 Mozilla Communicator client code, released
19 # The Initial Developer of the Original Code is
20 # Netscape Communications Corporation.
21 # Portions created by the Initial Developer are Copyright (C) 1998-1999
22 # the Initial Developer. All Rights Reserved.
26 # Alternatively, the contents of this file may be used under the terms of
27 # either of the GNU General Public License Version 2 or later (the "GPL"),
28 # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 # in which case the provisions of the GPL or the LGPL are applicable instead
30 # of those above. If you wish to allow use of your version of this file only
31 # under the terms of either the GPL or the LGPL, and not to allow others to
32 # use your version of this file under the terms of the MPL, indicate your
33 # decision by deleting the provisions above and replace them with the notice
34 # and other provisions required by the GPL or the LGPL. If you do not delete
35 # the provisions above, a recipient may use your version of this file under
36 # the terms of any one of the MPL, the GPL or the LGPL.
38 # ***** END LICENSE BLOCK *****
42 OBJDIR
= $(OBJDIR_NAME
)
49 NSPR_LOCAL
= $(MOZ_DEPTH
)/dist/$(OBJDIR
)/nspr
50 NSPR_DIST
= $(MOZ_DEPTH
)/dist/$(OBJDIR
)
51 NSPR_OBJDIR
= $(OBJDIR
)
52 ifeq ($(OS_ARCH
), SunOS
)
53 NSPR_OBJDIR
:= $(subst _sparc
,,$(NSPR_OBJDIR
))
55 ifeq ($(OS_ARCH
), Linux
)
56 LINUX_REL
:= $(shell uname
-r
)
57 ifneq (,$(findstring 2.0,$(LINUX_REL
)))
58 NSPR_OBJDIR
:= $(subst _All
,2.0_x86_glibc_PTH
,$(NSPR_OBJDIR
))
60 NSPR_OBJDIR
:= $(subst _All
,2.2_x86_glibc_PTH
,$(NSPR_OBJDIR
))
63 ifeq ($(OS_ARCH
), AIX
)
64 NSPR_OBJDIR
:= $(subst 4.1,4.2,$(NSPR_OBJDIR
))
66 ifeq ($(OS_CONFIG
), IRIX6.2
)
67 NSPR_OBJDIR
:= $(subst 6.2,6.2_n32_PTH
,$(NSPR_OBJDIR
))
69 ifeq ($(OS_CONFIG
), IRIX6.5
)
70 NSPR_OBJDIR
:= $(subst 6.5,6.5_n32_PTH
,$(NSPR_OBJDIR
))
72 ifeq ($(OS_ARCH
), WINNT
)
73 ifeq ($(OBJDIR
), WIN32_D.OBJ
)
74 NSPR_OBJDIR
= WINNT4.0_DBG.OBJ
76 ifeq ($(OBJDIR
), WIN32_O.OBJ
)
77 NSPR_OBJDIR
= WINNT4.0_OPT.OBJ
80 NSPR_SHARED
= /share
/builds
/components
/nspr20
/$(NSPR_VERSION
)/$(NSPR_OBJDIR
)
81 ifeq ($(OS_ARCH
), WINNT
)
82 NSPR_SHARED
= nspr20
/$(NSPR_VERSION
)/$(NSPR_OBJDIR
)
84 NSPR_VERSIONFILE
= $(NSPR_LOCAL
)/Version
85 NSPR_CURVERSION
:= $(shell cat
$(NSPR_VERSIONFILE
) 2>/dev
/null
)
88 @echo
"Grabbing NSPR component..."
89 ifeq ($(NSPR_VERSION
), $(NSPR_CURVERSION
))
90 @echo
"No need, NSPR is up to date in this tree (ver=$(NSPR_VERSION))."
92 mkdir
-p
$(NSPR_LOCAL
)
94 ifneq ($(OS_ARCH
), WINNT
)
95 cp
$(NSPR_SHARED
)/*.jar
$(NSPR_LOCAL
)
97 sh
$(MOZ_DEPTH
)/..
/reltools
/compftp.sh
$(NSPR_SHARED
) $(NSPR_LOCAL
) *.jar
99 unzip
-o
$(NSPR_LOCAL
)/mdbinary.jar
-d
$(NSPR_DIST
)
100 mkdir
-p
$(NSPR_DIST
)/include
101 unzip
-o
$(NSPR_LOCAL
)/mdheader.jar
-d
$(NSPR_DIST
)/include
102 rm -rf
$(NSPR_DIST
)/META-INF
103 rm -rf
$(NSPR_DIST
)/include/META-INF
104 echo
$(NSPR_VERSION
) > $(NSPR_VERSIONFILE
)
107 SHIP_DIST
= $(MOZ_DEPTH
)/dist/$(OBJDIR
)
108 SHIP_DIR
= $(SHIP_DIST
)/SHIP
110 SHIP_LIBS
= libjs.
$(SO_SUFFIX
) libjs.a
111 ifeq ($(OS_ARCH
), WINNT
)
112 SHIP_LIBS
= js32.dll js32.lib
114 SHIP_LIBS
+= $(LCJAR
)
115 SHIP_LIBS
:= $(addprefix $(SHIP_DIST
)/lib
/, $(SHIP_LIBS
))
117 SHIP_INCS
= js
*.h prmjtime.h resource.h
*.msg
*.tbl
118 SHIP_INCS
:= $(addprefix $(SHIP_DIST
)/include/, $(SHIP_INCS
))
121 ifeq ($(OS_ARCH
), WINNT
)
122 SHIP_BINS
:= $(addsuffix .exe
, $(SHIP_BINS
))
124 SHIP_BINS
:= $(addprefix $(SHIP_DIST
)/bin
/, $(SHIP_BINS
))
127 JSREFJAR
= jsref_opt.jar
130 JSREFJAR
= jsref_idg.jar
132 JSREFJAR
= jsref_dbg.jar
137 mkdir
-p
$(SHIP_DIR
)/$(LIBDIR
)
138 mkdir
-p
$(SHIP_DIR
)/include
139 mkdir
-p
$(SHIP_DIR
)/bin
140 cp
$(SHIP_LIBS
) $(SHIP_DIR
)/$(LIBDIR
)
141 cp
$(SHIP_INCS
) $(SHIP_DIR
)/include
142 cp
$(SHIP_BINS
) $(SHIP_DIR
)/bin
144 zip
-r
$(JSREFJAR
) bin lib
include
146 cp
$(SHIP_DIR
)/$(JSREFJAR
) $(BUILD_SHIP
)
150 shipSource
: $(SHIP_DIR
)/jsref_src.lst .FORCE
152 cd
$(MOZ_DEPTH
)/..
; \
153 zip
$(CWD
)/$(SHIP_DIR
)/jsref_src.jar
-@
< $(CWD
)/$(SHIP_DIR
)/jsref_src.lst
155 cp
$(SHIP_DIR
)/jsref_src.jar
$(BUILD_SHIP
)
158 JSREFSRCDIRS
:= $(shell cat
$(DEPTH
)/SpiderMonkey.rsp
)
159 $(SHIP_DIR
)/jsref_src.lst
: .FORCE
163 for d in
$(JSREFSRCDIRS
); do \
164 cd
$(MOZ_DEPTH
)/..
; \
165 ls
-1 -d
$$d | grep
-v CVS | grep
-v \.OBJ
>> $(CWD
)/$@
; \